24 #ifndef CSHAPEFUNCTION_FEM_C8
25 #define CSHAPEFUNCTION_FEM_C8
38 template<
typename T,
typename Timg>
47 this->class_name =
"Shape function : Finite Element Method 8 nodes";
51 virtual void init(CParameterNetCDF &fp)
56 virtual void exec(
const CImg<Timg> &box,
const std::vector<T> &x, CImgList<T> &N)
59 float ratio = box.height()*box.width()*box.depth();
63 N(dim,0) = (box.width()-x[0])*(box.height()-x[1])*(box.depth()-x[2])/ratio;
64 N(dim,1) = x[0]*(box.height()-x[1])*(box.depth()-x[2])/ratio;
65 N(dim,3) = x[0]*x[1]*(box.depth()-x[2])/ratio;
66 N(dim,2) = (box.width()-x[0])*x[1]*(box.depth()-x[2])/ratio;
68 N(dim,4) = (box.width()-x[0])*(box.height()-x[1])*x[2]/ratio;
69 N(dim,5) = x[0]*(box.height()-x[1])*x[2]/ratio;
70 N(dim,7) = x[0]*x[1]*x[2]/ratio;
71 N(dim,6) = (box.width()-x[0])*x[1]*x[2]/ratio;
This class implements C8P1 shape functions available for 3D cases.
Definition: CshapeFunction_FEM_C8.h:39
This class implements Q4P1 shape functions available for 2D cases.
Definition: CshapeFunction_FEM_Q4.h:39