Example #1
0
T3::Scalar T3::Axisymmetric::operator*(const T3::Vector& x) const {
    Scalar dx;
    dx += at(0)(x[0]);

    Field dxu = at(1)(x[1]);
    PFOR(i,x.N[0]) FOR(j,x.N[1]) dxu(i,j,0) /= at(0)(i);
    dx += dxu;
    
    Field xu = x[0];
    PFOR(i,x.N[0]) FOR(j,x.N[1]) xu(i,j,0) /= at(0)(i) / 2.;
    dx += xu;
    
    xu = x[1];
    PFOR(i,x.N[0]) FOR(j,x.N[1]) xu(i,j,0) /= at(0)(i) * sin( at(1)(j) ) / cos( at(1)(j) );
    dx += xu;
    
    dx.parent = x.parent;
    dx.fix();
    return dx;
}
Example #2
0
T3::Scalar T3::Axisymmetric::Lap(const T3::Scalar& x) const {
    Scalar dx;
    dx += at(0).two(x);
    
    Field dux = at(1).two(x);
    PFOR(i,x.N[0]) FOR(j,x.N[1]) dux(i,j,0) /= at(0)(i)*at(0)(i);
    dx += dux;
    
    dux = at(0)(x);
    PFOR(i,x.N[0]) FOR(j,x.N[1]) dux(i,j,0) /= at(0)(i)/2;
    dx += dux;
    
    dux = at(1)(x);
    PFOR(i,x.N[0]) FOR(j,x.N[1]) dux(i,j,0) /= at(0)(i)*at(0)(i)*sin(at(1)(j))/cos(at(1)(j));
    dx += dux;
    
    dx.parent = parent;
    dx.fix();
    return dx;
}