32 #ifndef CORE_BASIS_TETCUBICHMT_H
33 #define CORE_BASIS_TETCUBICHMT_H 1
70 template<
class VECTOR>
71 inline void get_weights(
const VECTOR& coords,
double *w)
const
74 template<
class VECTOR>
79 template <
class ElemData,
class VECTOR>
85 return (T)(w[0] * cd.node0() +
86 w[1] * this->
derivs_[cd.node0_index()][0] +
87 w[2] * this->
derivs_[cd.node0_index()][1] +
88 w[3] * this->
derivs_[cd.node0_index()][2] +
90 w[5] * this->
derivs_[cd.node1_index()][0] +
91 w[6] * this->
derivs_[cd.node1_index()][1] +
92 w[7] * this->
derivs_[cd.node1_index()][2] +
94 w[9] * this->
derivs_[cd.node2_index()][0] +
95 w[10] * this->
derivs_[cd.node2_index()][1] +
96 w[11] * this->
derivs_[cd.node2_index()][2] +
98 w[13] * this->
derivs_[cd.node3_index()][0] +
99 w[14] * this->
derivs_[cd.node3_index()][1] +
100 w[15] * this->
derivs_[cd.node3_index()][2]);
104 template <
class ElemData,
class VECTOR1,
class VECTOR2>
105 void derivate(
const VECTOR1 &coords,
const ElemData &cd,
106 VECTOR2 &derivs)
const
113 derivs[0]=
static_cast<typename VECTOR2::value_type
>(
115 w[1] * this->
derivs_[cd.node0_index()][0] +
116 w[2] * this->
derivs_[cd.node0_index()][1] +
117 w[3] * this->
derivs_[cd.node0_index()][2] +
119 w[5] * this->
derivs_[cd.node1_index()][0] +
120 w[6] * this->
derivs_[cd.node1_index()][1] +
121 w[7] * this->
derivs_[cd.node1_index()][2] +
123 w[9] * this->
derivs_[cd.node2_index()][0] +
124 w[10] * this->
derivs_[cd.node2_index()][1] +
125 w[11] * this->
derivs_[cd.node2_index()][2] +
127 w[13] * this->
derivs_[cd.node3_index()][0] +
128 w[14] * this->
derivs_[cd.node3_index()][1] +
129 w[15] * this->
derivs_[cd.node3_index()][2]);
131 derivs[1]=
static_cast<typename VECTOR2::value_type
>(
133 w[17] * this->
derivs_[cd.node0_index()][0] +
134 w[18] * this->
derivs_[cd.node0_index()][1] +
135 w[19] * this->
derivs_[cd.node0_index()][2] +
137 w[21] * this->
derivs_[cd.node1_index()][0] +
138 w[22] * this->
derivs_[cd.node1_index()][1] +
139 w[23] * this->
derivs_[cd.node1_index()][2] +
141 w[25] * this->
derivs_[cd.node2_index()][0] +
142 w[26] * this->
derivs_[cd.node2_index()][1] +
143 w[27] * this->
derivs_[cd.node2_index()][2] +
145 w[29] * this->
derivs_[cd.node3_index()][0] +
146 w[30] * this->
derivs_[cd.node3_index()][1] +
147 w[31] * this->
derivs_[cd.node3_index()][2]);
149 derivs[2]=
static_cast<typename VECTOR2::value_type
>(
151 w[33] * this->
derivs_[cd.node0_index()][0] +
152 w[34] * this->
derivs_[cd.node0_index()][1] +
153 w[35] * this->
derivs_[cd.node0_index()][2] +
155 w[37] * this->
derivs_[cd.node1_index()][0] +
156 w[38] * this->
derivs_[cd.node1_index()][1] +
157 w[39] * this->
derivs_[cd.node1_index()][2] +
159 w[41] * this->
derivs_[cd.node2_index()][0] +
160 w[42] * this->
derivs_[cd.node2_index()][1] +
161 w[43] * this->
derivs_[cd.node2_index()][2] +
163 w[45] * this->
derivs_[cd.node3_index()][0] +
164 w[46] * this->
derivs_[cd.node3_index()][1] +
165 w[47] * this->
derivs_[cd.node3_index()][2]);
169 template <
class ElemData,
class VECTOR>
171 const ElemData &cd)
const
174 return CL.
get_coords(
this, coords, value, cd);
178 template <
class ElemData>
181 return get_arc3d_length<CrvGaussian2<double> >(
this, edge, cd);
185 template <
class ElemData>
186 double get_area(
const unsigned face,
const ElemData &cd)
const
188 return get_area3<TriGaussian3<double> >(
this, face, cd);
192 template <
class ElemData>
198 static const std::string
type_name(
int n = -1);
212 ASSERT((n >= -1) && n <= 1);
220 static const std::string nm(
"TetCubicHmt");
240 std::string(__FILE__),
254 Pio(stream, this->derivs_);
Class with weights and coordinates for 3rd order Gaussian integration.
Definition: TetLinearLgn.h:341
double get_area(const unsigned face, const ElemData &cd) const
get area
Definition: TetCubicHmt.h:186
void get_weights(const VECTOR &coords, double *w) const
Definition: TetCubicHmt.h:71
Class for describing unit geometry of TetLinearLgn.
Definition: TetLinearLgn.h:47
Definition: Persistent.h:89
T value_type
Definition: TetCubicHmt.h:63
Definition: TypeDescription.h:45
std::vector< const TypeDescription * > td_vec
Definition: TypeDescription.h:56
Definition: TetElementWeights.h:36
static const std::string type_name(int n=-1)
Definition: TetCubicHmt.h:210
#define ASSERT(condition)
Definition: Assert.h:110
Definition: TetLinearLgn.h:205
virtual int begin_class(const std::string &name, int current_version)
Definition: Persistent.cc:143
TetCubicHmtUnitElement()
Definition: TetCubicHmt.h:44
static int polynomial_order()
Definition: TetCubicHmt.h:68
double get_volume(const ElemData &cd) const
get volume
Definition: TetCubicHmt.h:193
const string find_type_name(float *)
Definition: TypeName.cc:63
void get_derivate_weights(const VECTOR &coords, double *w) const
Definition: TetCubicHmt.h:75
bool get_coords(VECTOR &coords, const T &value, const ElemData &cd) const
get parametric coordinate for value within the element
Definition: TetCubicHmt.h:170
Class for describing unit geometry of TetCubicHmt.
Definition: TetCubicHmt.h:42
const int TETCUBICHMT_VERSION
Definition: TetCubicHmt.h:247
const char * name[]
Definition: BoostGraphExampleTests.cc:87
static int dofs()
return degrees of freedom
Definition: TetCubicHmt.h:48
TetCubicHmt()
Definition: TetCubicHmt.h:65
Class for creating geometrical approximations of Tet meshes.
Definition: TetLinearLgn.h:112
static const std::string make_template_id(const std::string &templateName, const std::string &templateParam)
Definition: TypeName.h:62
virtual ~TetCubicHmt()
Definition: TetCubicHmt.h:66
void get_cubic_derivate_weights(const VECTOR &coords, double *w) const
get derivative weight factors at parametric coordinate
Definition: TetElementWeights.h:146
virtual ~TetCubicHmtUnitElement()
Definition: TetCubicHmt.h:45
void Pio(Piostream &stream, Array1< T > &array)
Definition: Array1.h:65
T interpolate(const VECTOR &coords, const ElemData &cd) const
get value at parametric coordinate
Definition: TetCubicHmt.h:80
Definition: TetSamplingSchemes.h:42
std::vector< std::vector< T > > derivs_
Definition: Basis.h:160
virtual void end_class()
Definition: Persistent.cc:178
void get_cubic_weights(const VECTOR &coords, double *w) const
Definition: TetElementWeights.h:123
int n
Definition: eab.py:9
double get_arc_length(const unsigned edge, const ElemData &cd) const
get arc length for edge
Definition: TetCubicHmt.h:179
void derivate(const VECTOR1 &coords, const ElemData &cd, VECTOR2 &derivs) const
get first derivative at parametric coordinate
Definition: TetCubicHmt.h:105
double get_volume3(const ElemBasis *pEB, const ElemData &cd)
Definition: Locate.h:179
virtual void io(Piostream &str)
Definition: TetCubicHmt.h:250
bool get_coords(const ElemBasis *pEB, VECTOR &coords, const T &value, const ElemData &cd) const
find coodinate in interpolation for given value
Definition: TetLinearLgn.h:214
Definition: TypeDescription.h:49
const TypeDescription * get_type_description(Core::Basis::ConstantBasis< T > *)
Definition: Constant.h:209
Definition: TetCubicHmt.h:55