40 |
private: |
private: |
41 |
const Hexahedron& __H; |
const Hexahedron& __H; |
42 |
|
|
43 |
TinyVector<3>& __a; |
TinyVector<3, real_t>& __a; |
44 |
TinyVector<3>& __b; |
TinyVector<3, real_t>& __b; |
45 |
TinyVector<3>& __c; |
TinyVector<3, real_t>& __c; |
46 |
TinyVector<3>& __d; |
TinyVector<3, real_t>& __d; |
47 |
TinyVector<3>& __e; |
TinyVector<3, real_t>& __e; |
48 |
TinyVector<3>& __f; |
TinyVector<3, real_t>& __f; |
49 |
TinyVector<3>& __g; |
TinyVector<3, real_t>& __g; |
50 |
TinyVector<3>& __h; |
TinyVector<3, real_t>& __h; |
51 |
|
|
52 |
TinyVector<8, TinyVector<3> > __vertices; |
TinyVector<8, TinyVector<3, real_t> > __vertices; |
53 |
|
|
54 |
inline void __dx(const TinyVector<3, real_t>& X, |
public: |
55 |
TinyVector<3>& __result) const |
|
56 |
|
inline void dx(const TinyVector<3, real_t>& X, |
57 |
|
TinyVector<3, real_t>& __result) const |
58 |
{ |
{ |
59 |
__dx(X[0], X[1], X[2], __result); |
dx(X[0], X[1], X[2], __result); |
60 |
} |
} |
61 |
|
|
62 |
void __dx(const real_t& x, const real_t& y, const real_t& z, |
inline void dx(const real_t& x, const real_t& y, const real_t& z, |
63 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
64 |
{ |
{ |
65 |
__result = __b; |
__result = __b; |
66 |
__result += y*__e; |
__result += y*__e; |
68 |
__result += y*z*__h; |
__result += y*z*__h; |
69 |
} |
} |
70 |
|
|
71 |
inline void __dy(const TinyVector<3, real_t>& X, |
inline void dy(const TinyVector<3, real_t>& X, |
72 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
73 |
{ |
{ |
74 |
__dy(X[0], X[1], X[2], __result); |
dy(X[0], X[1], X[2], __result); |
75 |
} |
} |
76 |
|
|
77 |
void __dy(const real_t& x, const real_t& y, const real_t& z, |
inline void dy(const real_t& x, const real_t& y, const real_t& z, |
78 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
79 |
{ |
{ |
80 |
__result = __c; |
__result = __c; |
81 |
__result += x*__e; |
__result += x*__e; |
83 |
__result += x*z*__h; |
__result += x*z*__h; |
84 |
} |
} |
85 |
|
|
86 |
inline void __dz(const TinyVector<3, real_t>& X, |
inline void dz(const TinyVector<3, real_t>& X, |
87 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
88 |
{ |
{ |
89 |
__dz(X[0], X[1], X[2], __result); |
dz(X[0], X[1], X[2], __result); |
90 |
} |
} |
91 |
|
|
92 |
void __dz(const real_t& x, const real_t& y, const real_t& z, |
inline void dz(const real_t& x, const real_t& y, const real_t& z, |
93 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
94 |
{ |
{ |
95 |
__result = __d; |
__result = __d; |
96 |
__result += x*__f; |
__result += x*__f; |
98 |
__result += x*y*__h; |
__result += x*y*__h; |
99 |
} |
} |
100 |
|
|
101 |
public: |
inline void value(const TinyVector<3, real_t>& X, |
102 |
inline void value(const TinyVector<3>& X, |
TinyVector<3, real_t>& __result) const |
|
TinyVector<3>& __result) const |
|
103 |
{ |
{ |
104 |
value(X[0],X[1],X[2],__result); |
value(X[0],X[1],X[2],__result); |
105 |
} |
} |
106 |
|
|
107 |
void value(const real_t& x, const real_t& y, const real_t& z, |
inline void value(const real_t& x, const real_t& y, const real_t& z, |
108 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
109 |
{ |
{ |
110 |
__result = __a; |
__result = __a; |
111 |
__result += x*__b; |
__result += x*__b; |
119 |
|
|
120 |
/*! Computes Xhat, the point which transformed is (x,y,z) |
/*! Computes Xhat, the point which transformed is (x,y,z) |
121 |
returns false if no Xhat is found... |
returns false if no Xhat is found... |
122 |
*/ |
*/ |
123 |
bool invertT(const real_t& x, const real_t& y, const real_t& z, |
bool invertT(const real_t& x, const real_t& y, const real_t& z, |
124 |
TinyVector<3>& Xhat) const; |
TinyVector<3, real_t>& Xhat) const; |
125 |
|
|
126 |
/*! Computes the integrale of the function f on an element using |
/*! Computes the integrale of the function f on an element using |
127 |
the reference element |
the reference element |
128 |
*/ |
*/ |
129 |
const real_t integrate(const UserFunction& f) const; |
const real_t integrate(const UserFunction& f) const; |
130 |
|
|
131 |
const size_t numberOfQuadratureVertices() const; |
const size_t numberOfQuadratureVertices() const; |
132 |
|
|
133 |
const TinyVector<3> quadratureVertex(const int i) const; |
const TinyVector<3, real_t> quadratureVertex(const int i) const; |
134 |
|
|
135 |
const real_t quadratureWeight(const int i) const; |
const real_t quadratureWeight(const int i) const; |
136 |
|
|
145 |
__g(__vertices[6]), |
__g(__vertices[6]), |
146 |
__h(__vertices[7]) |
__h(__vertices[7]) |
147 |
{ |
{ |
148 |
TinyVector<8,TinyVector<3> > jCoefs; |
TinyVector<8,TinyVector<3, real_t> > jCoefs; |
149 |
|
|
150 |
jCoefs[0]=H(0).Vector3(); |
jCoefs[0]=H(0).Vector3(); |
151 |
jCoefs[1]=H(1).Vector3() - jCoefs[0]; |
jCoefs[1]=H(1).Vector3() - jCoefs[0]; |
204 |
ConformTransformationQ1HexahedraJacobian(const ConformTransformationQ1Hexahedra& T) |
ConformTransformationQ1HexahedraJacobian(const ConformTransformationQ1Hexahedra& T) |
205 |
: __T(T) |
: __T(T) |
206 |
{ |
{ |
207 |
const TinyVector<8, TinyVector<3> >& IntegrationVertices |
const TinyVector<8, TinyVector<3, real_t> >& IntegrationVertices |
208 |
= QuadratureFormulaQ1Hexahedra3D::instance().vertices(); |
= QuadratureFormulaQ1Hexahedra3D::instance().vertices(); |
209 |
|
|
210 |
__jacobian = 0; |
__jacobian = 0; |
211 |
|
|
212 |
TinyVector<8, TinyVector<3> > dxPhi; |
TinyVector<8, TinyVector<3, real_t> > dxPhi; |
213 |
TinyVector<8, TinyVector<3> > dyPhi; |
TinyVector<8, TinyVector<3, real_t> > dyPhi; |
214 |
TinyVector<8, TinyVector<3> > dzPhi; |
TinyVector<8, TinyVector<3, real_t> > dzPhi; |
215 |
|
|
216 |
for (size_t i=0; i<8; ++i) { |
for (size_t i=0; i<8; ++i) { |
217 |
__T.__dx(IntegrationVertices[i][0], |
__T.dx(IntegrationVertices[i][0], |
218 |
IntegrationVertices[i][1], |
IntegrationVertices[i][1], |
219 |
IntegrationVertices[i][2],dxPhi[i]); |
IntegrationVertices[i][2],dxPhi[i]); |
220 |
__T.__dy(IntegrationVertices[i][0], |
__T.dy(IntegrationVertices[i][0], |
221 |
IntegrationVertices[i][1], |
IntegrationVertices[i][1], |
222 |
IntegrationVertices[i][2],dyPhi[i]); |
IntegrationVertices[i][2],dyPhi[i]); |
223 |
__T.__dz(IntegrationVertices[i][0], |
__T.dz(IntegrationVertices[i][0], |
224 |
IntegrationVertices[i][1], |
IntegrationVertices[i][1], |
225 |
IntegrationVertices[i][2],dzPhi[i]); |
IntegrationVertices[i][2],dzPhi[i]); |
226 |
for (size_t j=0; j<3; ++j) { |
for (size_t j=0; j<3; ++j) { |
227 |
__jacobian(0,j) += dxPhi[i][j]; |
__jacobian(0,j) += dxPhi[i][j]; |
228 |
__jacobian(1,j) += dyPhi[i][j]; |
__jacobian(1,j) += dyPhi[i][j]; |
229 |
__jacobian(2,j) += dzPhi[i][j]; |
__jacobian(2,j) += dzPhi[i][j]; |
230 |
} |
} |
231 |
} |
} |
232 |
|
|
233 |
__jacobian *= 1/8.; |
__jacobian *= 1/8.; |
234 |
|
|
235 |
TinyVector<3, TinyVector<3> > I; |
TinyVector<3, TinyVector<3, real_t> > I; |
236 |
for (size_t i=0; i<3; ++i) { |
for (size_t i=0; i<3; ++i) { |
237 |
for (size_t j=0; j<3; ++j) |
for (size_t j=0; j<3; ++j) |
238 |
I[i][j] = (i==j)?1:0; |
I[i][j] = (i==j)?1:0; |
239 |
} |
} |
240 |
|
|
241 |
TinyVector<3, TinyVector<3> > J; |
TinyVector<3, TinyVector<3, real_t> > J; |
242 |
__det = ::gaussPivot(__jacobian,I,J); |
__det = ::gaussPivot(__jacobian,I,J); |
243 |
|
|
244 |
for (size_t i=0; i<3; ++i) { |
for (size_t i=0; i<3; ++i) { |
259 |
private: |
private: |
260 |
const CartesianHexahedron& __CH; |
const CartesianHexahedron& __CH; |
261 |
|
|
262 |
const TinyVector<3> __a; |
const TinyVector<3, real_t> __a; |
263 |
const TinyVector<3> __h; |
const TinyVector<3, real_t> __h; |
264 |
|
|
265 |
public: |
public: |
266 |
|
inline void dx(const TinyVector<3, real_t>& X, |
267 |
|
TinyVector<3, real_t>& __result) const |
268 |
|
{ |
269 |
|
dx(X[0], X[1], X[2], __result); |
270 |
|
} |
271 |
|
|
272 |
|
inline void dx(const real_t& x, const real_t& y, const real_t& z, |
273 |
|
TinyVector<3, real_t>& __result) const |
274 |
|
{ |
275 |
|
__result[0] = __h[0]; |
276 |
|
__result[1] = 0; |
277 |
|
__result[2] = 0; |
278 |
|
} |
279 |
|
|
280 |
|
inline void dy(const TinyVector<3, real_t>& X, |
281 |
|
TinyVector<3, real_t>& __result) const |
282 |
|
{ |
283 |
|
dy(X[0], X[1], X[2], __result); |
284 |
|
} |
285 |
|
|
286 |
|
inline void dy(const real_t& x, const real_t& y, const real_t& z, |
287 |
|
TinyVector<3, real_t>& __result) const |
288 |
|
{ |
289 |
|
__result[0] = 0; |
290 |
|
__result[1] = __h[1]; |
291 |
|
__result[2] = 0; |
292 |
|
} |
293 |
|
|
294 |
|
inline void dz(const TinyVector<3, real_t>& X, |
295 |
|
TinyVector<3, real_t>& __result) const |
296 |
|
{ |
297 |
|
dz(X[0], X[1], X[2], __result); |
298 |
|
} |
299 |
|
|
300 |
|
inline void dz(const real_t& x, const real_t& y, const real_t& z, |
301 |
|
TinyVector<3, real_t>& __result) const |
302 |
|
{ |
303 |
|
__result[0] = 0; |
304 |
|
__result[1] = 0; |
305 |
|
__result[2] = __h[2]; |
306 |
|
} |
307 |
|
|
308 |
//! computes the value at X (X is inside the reference element). |
//! computes the value at X (X is inside the reference element). |
309 |
inline void value(const TinyVector<3>& X, |
inline void value(const TinyVector<3, real_t>& X, |
310 |
TinyVector<3>& result) const |
TinyVector<3, real_t>& result) const |
311 |
{ |
{ |
312 |
value(X[0],X[1],X[2],result); |
value(X[0],X[1],X[2],result); |
313 |
} |
} |
314 |
|
|
315 |
//! computes the value at (x,y,z) ((x,y,z) is inside the reference element). |
//! computes the value at (x,y,z) ((x,y,z) is inside the reference element). |
316 |
inline void value(const real_t& x, const real_t& y, const real_t& z, |
inline void value(const real_t& x, const real_t& y, const real_t& z, |
317 |
TinyVector<3>& result) const |
TinyVector<3, real_t>& result) const |
318 |
{ |
{ |
319 |
result = __a; |
result = __a; |
320 |
result[0] += __h[0]*x; |
result[0] += __h[0]*x; |
323 |
} |
} |
324 |
|
|
325 |
//! Computes Xhat, the point which transformed is X |
//! Computes Xhat, the point which transformed is X |
326 |
inline bool invertT(const TinyVector<3>& X, |
inline bool invertT(const TinyVector<3, real_t>& X, |
327 |
TinyVector<3>& Xhat) const |
TinyVector<3, real_t>& Xhat) const |
328 |
{ |
{ |
329 |
return invertT(X[0],X[1],X[2], Xhat); |
return invertT(X[0],X[1],X[2], Xhat); |
330 |
} |
} |
331 |
|
|
332 |
//! Computes Xhat, the point which transformed is (x,y,z) |
//! Computes Xhat, the point which transformed is (x,y,z) |
333 |
inline bool invertT(const real_t& x, const real_t& y, const real_t& z, |
inline bool invertT(const real_t& x, const real_t& y, const real_t& z, |
334 |
TinyVector<3>& Xhat) const |
TinyVector<3, real_t>& Xhat) const |
335 |
{ |
{ |
336 |
Xhat[0] = (x-__a[0])/__h[0]; |
Xhat[0] = (x-__a[0])/__h[0]; |
337 |
Xhat[1] = (y-__a[1])/__h[1]; |
Xhat[1] = (y-__a[1])/__h[1]; |
341 |
|
|
342 |
/*! Computes the integrale of the function f on an element using |
/*! Computes the integrale of the function f on an element using |
343 |
the reference element |
the reference element |
344 |
*/ |
*/ |
345 |
const real_t integrate(const UserFunction& f) const; |
const real_t integrate(const UserFunction& f) const; |
346 |
|
|
347 |
const size_t numberOfQuadratureVertices() const; |
const size_t numberOfQuadratureVertices() const; |
348 |
|
|
349 |
const TinyVector<3> quadratureVertex(const int i) const; |
const TinyVector<3, real_t> quadratureVertex(const int i) const; |
350 |
|
|
351 |
const real_t quadratureWeight(const int i) const; |
const real_t quadratureWeight(const int i) const; |
352 |
|
|
374 |
|
|
375 |
real_t __det; |
real_t __det; |
376 |
|
|
377 |
void __dx(const real_t& x, const real_t& y, const real_t& z, |
void dx(const real_t& x, const real_t& y, const real_t& z, |
378 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
379 |
{ |
{ |
380 |
__result = __T.__h[0]*x; |
__result = __T.__h[0]*x; |
381 |
} |
} |
382 |
|
|
383 |
void __dy(const real_t& x, const real_t& y, const real_t& z, |
void dy(const real_t& x, const real_t& y, const real_t& z, |
384 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
385 |
{ |
{ |
386 |
__result = __T.__h[1]*y; |
__result = __T.__h[1]*y; |
387 |
} |
} |
388 |
|
|
389 |
void __dz(const real_t& x, const real_t& y, const real_t& z, |
void dz(const real_t& x, const real_t& y, const real_t& z, |
390 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
391 |
{ |
{ |
392 |
__result = __T.__h[2]*z; |
__result = __T.__h[2]*z; |
393 |
} |
} |
444 |
private: |
private: |
445 |
const Triangle& __T; |
const Triangle& __T; |
446 |
|
|
447 |
const TinyVector<3> __a; |
const TinyVector<3, real_t> __a; |
448 |
const TinyVector<3> __b_a; // (b-a) vector |
const TinyVector<3, real_t> __b_a; // (b-a) vector |
449 |
const TinyVector<3> __c_a; // (c-a) vector |
const TinyVector<3, real_t> __c_a; // (c-a) vector |
450 |
|
|
451 |
public: |
public: |
452 |
//! computes the value at X (X is inside the reference element). |
//! computes the value at X (X is inside the reference element). |
453 |
inline void value(const TinyVector<3>& X, |
inline void value(const TinyVector<3, real_t>& X, |
454 |
TinyVector<3>& result) const |
TinyVector<3, real_t>& result) const |
455 |
{ |
{ |
456 |
value(X[0],X[1],X[2],result); |
value(X[0],X[1],X[2],result); |
457 |
} |
} |
458 |
|
|
459 |
//! computes the value at (x,y,z) ((x,y,z) is inside the reference element). |
//! computes the value at (x,y,z) ((x,y,z) is inside the reference element). |
460 |
inline void value(const real_t& x, const real_t& y, const real_t& z, |
inline void value(const real_t& x, const real_t& y, const real_t& z, |
461 |
TinyVector<3>& result) const |
TinyVector<3, real_t>& result) const |
462 |
{ |
{ |
463 |
result = __a; |
result = __a; |
464 |
result += __b_a*x; |
result += __b_a*x; |
466 |
} |
} |
467 |
|
|
468 |
//! Computes Xhat, the point which transformed is X |
//! Computes Xhat, the point which transformed is X |
469 |
inline bool invertT(const TinyVector<3>& X, |
inline bool invertT(const TinyVector<3, real_t>& X, |
470 |
TinyVector<3>& Xhat) const |
TinyVector<3, real_t>& Xhat) const |
471 |
{ |
{ |
472 |
return invertT(X[0],X[1],X[2], Xhat); |
return invertT(X[0],X[1],X[2], Xhat); |
473 |
} |
} |
474 |
|
|
475 |
//! Computes Xhat, the point which transformed is (x,y,z) |
//! Computes Xhat, the point which transformed is (x,y,z) |
476 |
inline bool invertT(const real_t& x, const real_t& y, const real_t& z, |
inline bool invertT(const real_t& x, const real_t& y, const real_t& z, |
477 |
TinyVector<3>& Xhat) const |
TinyVector<3, real_t>& Xhat) const |
478 |
{ |
{ |
479 |
// Use least square to solve the linear system |
// Use least square to solve the linear system |
480 |
fferr(2) << __FILE__ << ':' << __LINE__ << ": Not implemented\n"; |
fferr(2) << __FILE__ << ':' << __LINE__ << ": Not implemented\n"; |
484 |
|
|
485 |
/*! Computes the integrale of the function f on an element using |
/*! Computes the integrale of the function f on an element using |
486 |
the reference element |
the reference element |
487 |
*/ |
*/ |
488 |
const real_t integrate(const UserFunction& f) const; |
const real_t integrate(const UserFunction& f) const; |
489 |
|
|
490 |
const size_t numberOfQuadratureVertices() const; |
const size_t numberOfQuadratureVertices() const; |
491 |
|
|
492 |
const TinyVector<3> quadratureVertex(const int i) const; |
const TinyVector<3, real_t> quadratureVertex(const int i) const; |
493 |
|
|
494 |
const real_t quadratureWeight(const int i) const; |
const real_t quadratureWeight(const int i) const; |
495 |
|
|
516 |
|
|
517 |
real_t __det; |
real_t __det; |
518 |
|
|
519 |
void __dx(const real_t& x, const real_t& y, const real_t& z, |
void dx(const real_t& x, const real_t& y, const real_t& z, |
520 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
521 |
{ |
{ |
522 |
// __result = __T.__h[0]*x; |
// __result = __T.__h[0]*x; |
523 |
} |
} |
524 |
|
|
525 |
void __dy(const real_t& x, const real_t& y, const real_t& z, |
void dy(const real_t& x, const real_t& y, const real_t& z, |
526 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
527 |
{ |
{ |
528 |
// __result = __T.__h[1]*y; |
// __result = __T.__h[1]*y; |
529 |
} |
} |
530 |
|
|
531 |
void __dz(const real_t& x, const real_t& y, const real_t& z, |
void dz(const real_t& x, const real_t& y, const real_t& z, |
532 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
533 |
{ |
{ |
534 |
// __result = __T.__h[2]*z; |
// __result = __T.__h[2]*z; |
535 |
} |
} |
536 |
|
|
537 |
|
|
564 |
{ |
{ |
565 |
fferr(2) << __FILE__ << ':' << __LINE__ << ": Not implemented\n"; |
fferr(2) << __FILE__ << ':' << __LINE__ << ": Not implemented\n"; |
566 |
std::exit(1); |
std::exit(1); |
567 |
// for (size_t i=0; i<3; ++i) |
// for (size_t i=0; i<3; ++i) |
568 |
// __invJacobian(i,i) = 1./(__T.__h[i]); |
// __invJacobian(i,i) = 1./(__T.__h[i]); |
569 |
|
|
570 |
// __det = __T.__h[0] * __T.__h[1] * __T.__h[2]; |
// __det = __T.__h[0] * __T.__h[1] * __T.__h[2]; |
571 |
|
|
572 |
} |
} |
573 |
|
|
581 |
private: |
private: |
582 |
const Quadrangle& __Q; |
const Quadrangle& __Q; |
583 |
|
|
584 |
const TinyVector<3> __a; |
const TinyVector<3, real_t> __a; |
585 |
const TinyVector<3> __b_a; // (b-a) vector |
const TinyVector<3, real_t> __b_a; // (b-a) vector |
586 |
const TinyVector<3> __d_a; // (d-a) vector |
const TinyVector<3, real_t> __d_a; // (d-a) vector |
587 |
const TinyVector<3> __ca_b_d; // (c+a-b-d) vector |
const TinyVector<3, real_t> __ca_b_d; // (c+a-b-d) vector |
588 |
|
|
589 |
public: |
public: |
590 |
//! computes the value at X (X is inside the reference element). |
//! computes the value at X (X is inside the reference element). |
591 |
inline void value(const TinyVector<3>& X, |
inline void value(const TinyVector<3, real_t>& X, |
592 |
TinyVector<3>& result) const |
TinyVector<3, real_t>& result) const |
593 |
{ |
{ |
594 |
value(X[0],X[1],X[2],result); |
value(X[0],X[1],X[2],result); |
595 |
} |
} |
596 |
|
|
597 |
//! computes the value at (x,y,z) ((x,y,z) is inside the reference element). |
//! computes the value at (x,y,z) ((x,y,z) is inside the reference element). |
598 |
inline void value(const real_t& x, const real_t& y, const real_t& z, |
inline void value(const real_t& x, const real_t& y, const real_t& z, |
599 |
TinyVector<3>& result) const |
TinyVector<3, real_t>& result) const |
600 |
{ |
{ |
601 |
result = __a; |
result = __a; |
602 |
result += __b_a*x; |
result += __b_a*x; |
605 |
} |
} |
606 |
|
|
607 |
//! Computes Xhat, the point which transformed is X |
//! Computes Xhat, the point which transformed is X |
608 |
inline bool invertT(const TinyVector<3>& X, |
inline bool invertT(const TinyVector<3, real_t>& X, |
609 |
TinyVector<3>& Xhat) const |
TinyVector<3, real_t>& Xhat) const |
610 |
{ |
{ |
611 |
return invertT(X[0],X[1],X[2], Xhat); |
return invertT(X[0],X[1],X[2], Xhat); |
612 |
} |
} |
613 |
|
|
614 |
//! Computes Xhat, the point which transformed is (x,y,z) |
//! Computes Xhat, the point which transformed is (x,y,z) |
615 |
inline bool invertT(const real_t& x, const real_t& y, const real_t& z, |
inline bool invertT(const real_t& x, const real_t& y, const real_t& z, |
616 |
TinyVector<3>& Xhat) const |
TinyVector<3, real_t>& Xhat) const |
617 |
{ |
{ |
618 |
// Use least square to solve the linear system |
// Use least square to solve the linear system |
619 |
fferr(2) << __FILE__ << ':' << __LINE__ << ": Not implemented\n"; |
fferr(2) << __FILE__ << ':' << __LINE__ << ": Not implemented\n"; |
623 |
|
|
624 |
/*! Computes the integrale of the function f on an element using |
/*! Computes the integrale of the function f on an element using |
625 |
the reference element |
the reference element |
626 |
*/ |
*/ |
627 |
const real_t integrate(const UserFunction& f) const; |
const real_t integrate(const UserFunction& f) const; |
628 |
|
|
629 |
const size_t numberOfQuadratureVertices() const; |
const size_t numberOfQuadratureVertices() const; |
630 |
|
|
631 |
const TinyVector<3> quadratureVertex(const int i) const; |
const TinyVector<3, real_t> quadratureVertex(const int i) const; |
632 |
|
|
633 |
const real_t quadratureWeight(const int i) const; |
const real_t quadratureWeight(const int i) const; |
634 |
|
|
656 |
|
|
657 |
real_t __det; |
real_t __det; |
658 |
|
|
659 |
void __dx(const real_t& x, const real_t& y, const real_t& z, |
void dx(const real_t& x, const real_t& y, const real_t& z, |
660 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
661 |
{ |
{ |
662 |
// __result = __T.__h[0]*x; |
// __result = __T.__h[0]*x; |
663 |
} |
} |
664 |
|
|
665 |
void __dy(const real_t& x, const real_t& y, const real_t& z, |
void dy(const real_t& x, const real_t& y, const real_t& z, |
666 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
667 |
{ |
{ |
668 |
// __result = __T.__h[1]*y; |
// __result = __T.__h[1]*y; |
669 |
} |
} |
670 |
|
|
671 |
void __dz(const real_t& x, const real_t& y, const real_t& z, |
void dz(const real_t& x, const real_t& y, const real_t& z, |
672 |
TinyVector<3>& __result) const |
TinyVector<3, real_t>& __result) const |
673 |
{ |
{ |
674 |
// __result = __T.__h[2]*z; |
// __result = __T.__h[2]*z; |
675 |
} |
} |
676 |
|
|
677 |
|
|
704 |
{ |
{ |
705 |
fferr(2) << __FILE__ << ':' << __LINE__ << ": Not implemented\n"; |
fferr(2) << __FILE__ << ':' << __LINE__ << ": Not implemented\n"; |
706 |
std::exit(1); |
std::exit(1); |
707 |
// for (size_t i=0; i<3; ++i) |
// for (size_t i=0; i<3; ++i) |
708 |
// __invJacobian(i,i) = 1./(__T.__h[i]); |
// __invJacobian(i,i) = 1./(__T.__h[i]); |
709 |
|
|
710 |
// __det = __T.__h[0] * __T.__h[1] * __T.__h[2]; |
// __det = __T.__h[0] * __T.__h[1] * __T.__h[2]; |
711 |
|
|
712 |
} |
} |
713 |
|
|