112 ValueModeType mode,
TimeStep *tStep){
119 this->
xyz2ijk(coords,ijk,normXyz);
123 const int& i(ijk[0]);
const int& j(ijk[1]);
const int& k(ijk[2]);
124 int I(i+1), J(j+1), K(k+1);
125 const double& x(normXyz[0]);
const double& y(normXyz[1]);
const double& z(normXyz[2]);
126 double X(1-x), Y(1-y), Z(1-z);
128 X*Y*Z,x*Y*Z,x*y*Z,X*y*Z,
129 X*Y*z,x*Y*z,x*y*z,X*y*z
132 {i,j,k},{I,j,k},{I,J,k},{i,J,k},
133 {i,j,K},{I,j,K},{I,J,K},{i,J,K}
135 assert(fabs(weights[0]+weights[1]+weights[2]+weights[3]+weights[4]+weights[5]+weights[6]+weights[7]-1) < 1e-5);
136 for(
int p=0; p<8; p++){
138 ret+=weights[p]*this->
nodeValue3d(pts[p][0],pts[p][1],pts[p][2]);
143 const int& i(ijk[0]);
const int& j(ijk[1]);
int I(i+1);
int J(j+1);
144 const double& x(normXyz[0]);
const double y(normXyz[1]);
double X(1-x);
double Y(1-y);
145 double weights[]={X*Y,x*Y,X*y,x*y};
146 int pts[][2]={{i,j},{I,j},{i,J},{I,J}};
147 assert(fabs(weights[0]+weights[1]+weights[2]+weights[3]-1)<1e-5);
148 for(
int p=0; p<4; p++){
150 ret+=weights[p]*this->
nodeValue2d(pts[p][0],pts[p][1]);
155 OOFEM_ERROR(
"%s",(std::string(
"UniformGridField::evaluateAt: erroneous dimension of input coordinates (")+std::to_string(coords.
giveSize())+
", must be 2 or 3).").c_str());