32 #ifndef CORE_BASIS_HEXTRICUBICHMT_H
33 #define CORE_BASIS_HEXTRICUBICHMT_H 1
47 static int dofs() {
return 64; }
69 template<
class VECTOR>
70 inline void get_weights(
const VECTOR& coords,
double *w)
const
73 template<
class VECTOR>
78 template <
class ElemData,
class VECTOR>
84 return (T)(w[0] * cd.node0() +
85 w[1] * this->
derivs_[cd.node0_index()][0] +
86 w[2] * this->
derivs_[cd.node0_index()][1] +
87 w[3] * this->
derivs_[cd.node0_index()][2] +
88 w[4] * this->
derivs_[cd.node0_index()][3] +
89 w[5] * this->
derivs_[cd.node0_index()][4] +
90 w[6] * this->
derivs_[cd.node0_index()][5] +
91 w[7] * this->
derivs_[cd.node0_index()][6] +
93 w[9] * this->
derivs_[cd.node1_index()][0] +
94 w[10] * this->
derivs_[cd.node1_index()][1] +
95 w[11] * this->
derivs_[cd.node1_index()][2] +
96 w[12] * this->
derivs_[cd.node1_index()][3] +
97 w[13] * this->
derivs_[cd.node1_index()][4] +
98 w[14] * this->
derivs_[cd.node1_index()][5] +
99 w[15] * this->
derivs_[cd.node1_index()][6] +
101 w[17] * this->
derivs_[cd.node2_index()][0] +
102 w[18] * this->
derivs_[cd.node2_index()][1] +
103 w[19] * this->
derivs_[cd.node2_index()][2] +
104 w[20] * this->
derivs_[cd.node2_index()][3] +
105 w[21] * this->
derivs_[cd.node2_index()][4] +
106 w[22] * this->
derivs_[cd.node2_index()][5] +
107 w[23] * this->
derivs_[cd.node2_index()][6] +
109 w[25] * this->
derivs_[cd.node3_index()][0] +
110 w[26] * this->
derivs_[cd.node3_index()][1] +
111 w[27] * this->
derivs_[cd.node3_index()][2] +
112 w[28] * this->
derivs_[cd.node3_index()][3] +
113 w[29] * this->
derivs_[cd.node3_index()][4] +
114 w[30] * this->
derivs_[cd.node3_index()][5] +
115 w[31] * this->
derivs_[cd.node3_index()][6] +
117 w[33] * this->
derivs_[cd.node4_index()][0] +
118 w[34] * this->
derivs_[cd.node4_index()][1] +
119 w[35] * this->
derivs_[cd.node4_index()][2] +
120 w[36] * this->
derivs_[cd.node4_index()][3] +
121 w[37] * this->
derivs_[cd.node4_index()][4] +
122 w[38] * this->
derivs_[cd.node4_index()][5] +
123 w[39] * this->
derivs_[cd.node4_index()][6] +
125 w[41] * this->
derivs_[cd.node5_index()][0] +
126 w[42] * this->
derivs_[cd.node5_index()][1] +
127 w[43] * this->
derivs_[cd.node5_index()][2] +
128 w[44] * this->
derivs_[cd.node5_index()][3] +
129 w[45] * this->
derivs_[cd.node5_index()][4] +
130 w[46] * this->
derivs_[cd.node5_index()][5] +
131 w[47] * this->
derivs_[cd.node5_index()][6] +
133 w[49] * this->
derivs_[cd.node6_index()][0] +
134 w[50] * this->
derivs_[cd.node6_index()][1] +
135 w[51] * this->
derivs_[cd.node6_index()][2] +
136 w[52] * this->
derivs_[cd.node6_index()][3] +
137 w[53] * this->
derivs_[cd.node6_index()][4] +
138 w[54] * this->
derivs_[cd.node6_index()][5] +
139 w[55] * this->
derivs_[cd.node6_index()][6] +
141 w[57] * this->
derivs_[cd.node7_index()][0] +
142 w[58] * this->
derivs_[cd.node7_index()][1] +
143 w[59] * this->
derivs_[cd.node7_index()][2] +
144 w[60] * this->
derivs_[cd.node7_index()][3] +
145 w[61] * this->
derivs_[cd.node7_index()][4] +
146 w[62] * this->
derivs_[cd.node7_index()][5] +
147 w[63] * this->
derivs_[cd.node7_index()][6]);
151 template <
class ElemData,
class VECTOR1,
class VECTOR2>
152 void derivate(
const VECTOR1 &coords,
const ElemData &cd,
153 VECTOR2 &derivs)
const
160 derivs[0]=
static_cast<typename VECTOR2::value_type
>(
162 w[1] * this->
derivs_[cd.node0_index()][0] +
163 w[2] * this->
derivs_[cd.node0_index()][1] +
164 w[3] * this->
derivs_[cd.node0_index()][2] +
165 w[4] * this->
derivs_[cd.node0_index()][3] +
166 w[5] * this->
derivs_[cd.node0_index()][4] +
167 w[6] * this->
derivs_[cd.node0_index()][5] +
168 w[7] * this->
derivs_[cd.node0_index()][6] +
170 w[9] * this->
derivs_[cd.node1_index()][0] +
171 w[10] * this->
derivs_[cd.node1_index()][1] +
172 w[11] * this->
derivs_[cd.node1_index()][2] +
173 w[12] * this->
derivs_[cd.node1_index()][3] +
174 w[13] * this->
derivs_[cd.node1_index()][4] +
175 w[14] * this->
derivs_[cd.node1_index()][5] +
176 w[15] * this->
derivs_[cd.node1_index()][6] +
178 w[17] * this->
derivs_[cd.node2_index()][0] +
179 w[18] * this->
derivs_[cd.node2_index()][1] +
180 w[19] * this->
derivs_[cd.node2_index()][2] +
181 w[20] * this->
derivs_[cd.node2_index()][3] +
182 w[21] * this->
derivs_[cd.node2_index()][4] +
183 w[22] * this->
derivs_[cd.node2_index()][5] +
184 w[23] * this->
derivs_[cd.node2_index()][6] +
186 w[25] * this->
derivs_[cd.node3_index()][0] +
187 w[26] * this->
derivs_[cd.node3_index()][1] +
188 w[27] * this->
derivs_[cd.node3_index()][2] +
189 w[28] * this->
derivs_[cd.node3_index()][3] +
190 w[29] * this->
derivs_[cd.node3_index()][4] +
191 w[30] * this->
derivs_[cd.node3_index()][5] +
192 w[31] * this->
derivs_[cd.node3_index()][6] +
194 w[33] * this->
derivs_[cd.node4_index()][0] +
195 w[34] * this->
derivs_[cd.node4_index()][1] +
196 w[35] * this->
derivs_[cd.node4_index()][2] +
197 w[36] * this->
derivs_[cd.node4_index()][3] +
198 w[37] * this->
derivs_[cd.node4_index()][4] +
199 w[38] * this->
derivs_[cd.node4_index()][5] +
200 w[39] * this->
derivs_[cd.node4_index()][6] +
202 w[41] * this->
derivs_[cd.node5_index()][0] +
203 w[42] * this->
derivs_[cd.node5_index()][1] +
204 w[43] * this->
derivs_[cd.node5_index()][2] +
205 w[44] * this->
derivs_[cd.node5_index()][3] +
206 w[45] * this->
derivs_[cd.node5_index()][4] +
207 w[46] * this->
derivs_[cd.node5_index()][5] +
208 w[47] * this->
derivs_[cd.node5_index()][6] +
210 w[49] * this->
derivs_[cd.node6_index()][0] +
211 w[50] * this->
derivs_[cd.node6_index()][1] +
212 w[51] * this->
derivs_[cd.node6_index()][2] +
213 w[52] * this->
derivs_[cd.node6_index()][3] +
214 w[53] * this->
derivs_[cd.node6_index()][4] +
215 w[54] * this->
derivs_[cd.node6_index()][5] +
216 w[55] * this->
derivs_[cd.node6_index()][6] +
218 w[57] * this->
derivs_[cd.node7_index()][0] +
219 w[58] * this->
derivs_[cd.node7_index()][1] +
220 w[59] * this->
derivs_[cd.node7_index()][2] +
221 w[60] * this->
derivs_[cd.node7_index()][3] +
222 w[61] * this->
derivs_[cd.node7_index()][4] +
223 w[62] * this->
derivs_[cd.node7_index()][5] +
224 w[63] * this->
derivs_[cd.node7_index()][6]);
228 static_cast<typename VECTOR2::value_type
>(
230 w[65] * this->
derivs_[cd.node0_index()][0] +
231 w[66] * this->
derivs_[cd.node0_index()][1] +
232 w[67] * this->
derivs_[cd.node0_index()][2] +
233 w[68] * this->
derivs_[cd.node0_index()][3] +
234 w[69] * this->
derivs_[cd.node0_index()][4] +
235 w[70] * this->
derivs_[cd.node0_index()][5] +
236 w[71] * this->
derivs_[cd.node0_index()][6] +
238 w[73] * this->
derivs_[cd.node1_index()][0] +
239 w[74] * this->
derivs_[cd.node1_index()][1] +
240 w[75] * this->
derivs_[cd.node1_index()][2] +
241 w[76] * this->
derivs_[cd.node1_index()][3] +
242 w[77] * this->
derivs_[cd.node1_index()][4] +
243 w[78] * this->
derivs_[cd.node1_index()][5] +
244 w[79] * this->
derivs_[cd.node1_index()][6] +
246 w[81] * this->
derivs_[cd.node2_index()][0] +
247 w[82] * this->
derivs_[cd.node2_index()][1] +
248 w[83] * this->
derivs_[cd.node2_index()][2] +
249 w[84] * this->
derivs_[cd.node2_index()][3] +
250 w[85] * this->
derivs_[cd.node2_index()][4] +
251 w[86] * this->
derivs_[cd.node2_index()][5] +
252 w[87] * this->
derivs_[cd.node2_index()][6] +
254 w[89] * this->
derivs_[cd.node3_index()][0] +
255 w[90] * this->
derivs_[cd.node3_index()][1] +
256 w[91] * this->
derivs_[cd.node3_index()][2] +
257 w[92] * this->
derivs_[cd.node3_index()][3] +
258 w[93] * this->
derivs_[cd.node3_index()][4] +
259 w[94] * this->
derivs_[cd.node3_index()][5] +
260 w[95] * this->
derivs_[cd.node3_index()][6] +
262 w[97] * this->
derivs_[cd.node4_index()][0] +
263 w[98] * this->
derivs_[cd.node4_index()][1] +
264 w[99] * this->
derivs_[cd.node4_index()][2] +
265 w[100] * this->
derivs_[cd.node4_index()][3] +
266 w[101] * this->
derivs_[cd.node4_index()][4] +
267 w[102] * this->
derivs_[cd.node4_index()][5] +
268 w[103] * this->
derivs_[cd.node4_index()][6] +
269 w[104] * cd.node5() +
270 w[105] * this->
derivs_[cd.node5_index()][0] +
271 w[106] * this->
derivs_[cd.node5_index()][1] +
272 w[107] * this->
derivs_[cd.node5_index()][2] +
273 w[108] * this->
derivs_[cd.node5_index()][3] +
274 w[109] * this->
derivs_[cd.node5_index()][4] +
275 w[110] * this->
derivs_[cd.node5_index()][5] +
276 w[111] * this->
derivs_[cd.node5_index()][6] +
277 w[112] * cd.node6() +
278 w[113] * this->
derivs_[cd.node6_index()][0] +
279 w[114] * this->
derivs_[cd.node6_index()][1] +
280 w[115] * this->
derivs_[cd.node6_index()][2] +
281 w[116] * this->
derivs_[cd.node6_index()][3] +
282 w[117] * this->
derivs_[cd.node6_index()][4] +
283 w[118] * this->
derivs_[cd.node6_index()][5] +
284 w[119] * this->
derivs_[cd.node6_index()][6] +
285 w[120] * cd.node7() +
286 w[121] * this->
derivs_[cd.node7_index()][0] +
287 w[122] * this->
derivs_[cd.node7_index()][1] +
288 w[123] * this->
derivs_[cd.node7_index()][2] +
289 w[124] * this->
derivs_[cd.node7_index()][3] +
290 w[125] * this->
derivs_[cd.node7_index()][4] +
291 w[126] * this->
derivs_[cd.node7_index()][5] +
292 w[127] * this->
derivs_[cd.node7_index()][6]);
297 static_cast<typename VECTOR2::value_type
>(
298 w[128] * cd.node0() +
299 w[129] * this->
derivs_[cd.node0_index()][0] +
300 w[130] * this->
derivs_[cd.node0_index()][1] +
301 w[131] * this->
derivs_[cd.node0_index()][2] +
302 w[132] * this->
derivs_[cd.node0_index()][3] +
303 w[133] * this->
derivs_[cd.node0_index()][4] +
304 w[134] * this->
derivs_[cd.node0_index()][5] +
305 w[135] * this->
derivs_[cd.node0_index()][6] +
306 w[136] * cd.node1() +
307 w[137] * this->
derivs_[cd.node1_index()][0] +
308 w[138] * this->
derivs_[cd.node1_index()][1] +
309 w[139] * this->
derivs_[cd.node1_index()][2] +
310 w[140] * this->
derivs_[cd.node1_index()][3] +
311 w[141] * this->
derivs_[cd.node1_index()][4] +
312 w[142] * this->
derivs_[cd.node1_index()][5] +
313 w[143] * this->
derivs_[cd.node1_index()][6] +
314 w[144] * cd.node2() +
315 w[145] * this->
derivs_[cd.node2_index()][0] +
316 w[146] * this->
derivs_[cd.node2_index()][1] +
317 w[147] * this->
derivs_[cd.node2_index()][2] +
318 w[148] * this->
derivs_[cd.node2_index()][3] +
319 w[149] * this->
derivs_[cd.node2_index()][4] +
320 w[150] * this->
derivs_[cd.node2_index()][5] +
321 w[151] * this->
derivs_[cd.node2_index()][6] +
322 w[152] * cd.node3() +
323 w[153] * this->
derivs_[cd.node3_index()][0] +
324 w[154] * this->
derivs_[cd.node3_index()][1] +
325 w[155] * this->
derivs_[cd.node3_index()][2] +
326 w[156] * this->
derivs_[cd.node3_index()][3] +
327 w[157] * this->
derivs_[cd.node3_index()][4] +
328 w[158] * this->
derivs_[cd.node3_index()][5] +
329 w[159] * this->
derivs_[cd.node3_index()][6] +
330 w[160] * cd.node4() +
331 w[161] * this->
derivs_[cd.node4_index()][0] +
332 w[162] * this->
derivs_[cd.node4_index()][1] +
333 w[163] * this->
derivs_[cd.node4_index()][2] +
334 w[164] * this->
derivs_[cd.node4_index()][3] +
335 w[165] * this->
derivs_[cd.node4_index()][4] +
336 w[166] * this->
derivs_[cd.node4_index()][5] +
337 w[167] * this->
derivs_[cd.node4_index()][6] +
338 w[168] * cd.node5() +
339 w[169] * this->
derivs_[cd.node5_index()][0] +
340 w[170] * this->
derivs_[cd.node5_index()][1] +
341 w[171] * this->
derivs_[cd.node5_index()][2] +
342 w[172] * this->
derivs_[cd.node5_index()][3] +
343 w[173] * this->
derivs_[cd.node5_index()][4] +
344 w[174] * this->
derivs_[cd.node5_index()][5] +
345 w[175] * this->
derivs_[cd.node5_index()][6] +
346 w[176] * cd.node6() +
347 w[177] * this->
derivs_[cd.node6_index()][0] +
348 w[178] * this->
derivs_[cd.node6_index()][1] +
349 w[179] * this->
derivs_[cd.node6_index()][2] +
350 w[180] * this->
derivs_[cd.node6_index()][3] +
351 w[181] * this->
derivs_[cd.node6_index()][4] +
352 w[182] * this->
derivs_[cd.node6_index()][5] +
353 w[183] * this->
derivs_[cd.node6_index()][6] +
354 w[184] * cd.node7() +
355 w[185] * this->
derivs_[cd.node7_index()][0] +
356 w[186] * this->
derivs_[cd.node7_index()][1] +
357 w[187] * this->
derivs_[cd.node7_index()][2] +
358 w[188] * this->
derivs_[cd.node7_index()][3] +
359 w[189] * this->
derivs_[cd.node7_index()][4] +
360 w[190] * this->
derivs_[cd.node7_index()][5] +
361 w[191] * this->
derivs_[cd.node7_index()][6]);
367 template <
class ElemData,
class VECTOR>
369 const ElemData &cd)
const
372 return CL.
get_coords(
this, coords, value, cd);
376 template <
class ElemData>
379 return get_arc3d_length<CrvGaussian2<double> >(
this, edge, cd);
383 template <
class ElemData>
384 double get_area(
const unsigned face,
const ElemData &cd)
const
386 return get_area3<QuadGaussian3<double> >(
this, face, cd);
390 template <
class ElemData>
396 static const std::string
type_name(
int n = -1);
407 ASSERT((n >= -1) && n <= 1);
415 static const std::string nm(
"HexTricubicHmt");
438 std::string(__FILE__),
452 Pio(stream, this->derivs_);
void get_cubic_derivate_weights(const VECTOR &coords, unsigned int elem, double *w) const
get derivative weight factors at parametric coordinate
Definition: HexElementsWeights.h:262
T interpolate(const VECTOR &coords, const ElemData &cd) const
get value at parametric coordinate
Definition: HexTricubicHmt.h:79
double get_arc_length(const unsigned edge, const ElemData &cd) const
get arc length for edge
Definition: HexTricubicHmt.h:377
const int HEXTRICUBICHMT_VERSION
Definition: HexTricubicHmt.h:445
Definition: HexElementsWeights.h:36
Definition: Persistent.h:89
static int polynomial_order()
Definition: HexTricubicHmt.h:67
static int dofs()
return degrees of freedom
Definition: HexTricubicHmt.h:47
Definition: TypeDescription.h:45
std::vector< const TypeDescription * > td_vec
Definition: TypeDescription.h:56
Class for creating geometrical approximations of Hex meshes.
Definition: HexTrilinearLgn.h:112
double get_volume(const ElemData &cd) const
get volume
Definition: HexTricubicHmt.h:391
void get_weights(const VECTOR &coords, double *w) const
Definition: HexTricubicHmt.h:70
Definition: HexTricubicHmt.h:54
#define ASSERT(condition)
Definition: Assert.h:110
virtual void io(Piostream &str)
Definition: HexTricubicHmt.h:448
virtual int begin_class(const std::string &name, int current_version)
Definition: Persistent.cc:143
const string find_type_name(float *)
Definition: TypeName.cc:63
Class with weights and coordinates for 3rd order Gaussian integration.
Definition: HexTrilinearLgn.h:331
const char * name[]
Definition: BoostGraphExampleTests.cc:87
double get_area(const unsigned face, const ElemData &cd) const
get area
Definition: HexTricubicHmt.h:384
static const std::string make_template_id(const std::string &templateName, const std::string &templateParam)
Definition: TypeName.h:62
bool get_coords(VECTOR &coords, const T &value, const ElemData &cd) const
get parametric coordinate for value within the element
Definition: HexTricubicHmt.h:368
void get_cubic_weights(const VECTOR &coords, unsigned int elem, double *w) const
Definition: HexElementsWeights.h:184
HexTricubicHmtUnitElement()
Definition: HexTricubicHmt.h:44
void get_derivate_weights(const VECTOR &coords, double *w) const
Definition: HexTricubicHmt.h:74
void Pio(Piostream &stream, Array1< T > &array)
Definition: Array1.h:65
std::vector< std::vector< T > > derivs_
Definition: Basis.h:160
virtual ~HexTricubicHmtUnitElement()
Definition: HexTricubicHmt.h:45
virtual void end_class()
Definition: Persistent.cc:178
void derivate(const VECTOR1 &coords, const ElemData &cd, VECTOR2 &derivs) const
get first derivative at parametric coordinate
Definition: HexTricubicHmt.h:152
Definition: HexSamplingSchemes.h:43
Definition: HexTrilinearLgn.h:197
int n
Definition: eab.py:9
static const std::string type_name(int n=-1)
Definition: HexTricubicHmt.h:405
bool get_coords(const ElemBasis *pEB, VECTOR &coords, const T &value, const ElemData &cd) const
find value in interpolation for given value
Definition: HexTrilinearLgn.h:206
HexTricubicHmt()
Definition: HexTricubicHmt.h:64
double get_volume3(const ElemBasis *pEB, const ElemData &cd)
Definition: Locate.h:179
virtual ~HexTricubicHmt()
Definition: HexTricubicHmt.h:65
Class for describing unit geometry of HexTrilinearLgn.
Definition: HexTrilinearLgn.h:49
Definition: TypeDescription.h:49
Class for describing unit geometry of HexTricubicHmt.
Definition: HexTricubicHmt.h:42
T value_type
Definition: HexTricubicHmt.h:62
const TypeDescription * get_type_description(Core::Basis::ConstantBasis< T > *)
Definition: Constant.h:209