v0.16.0
Loading...
Searching...
No Matches
FaceElementForcesAndSourcesCore.cpp
Go to the documentation of this file.
1/** \file FaceElementForcesAndSourcesCore.cpp
2
3\brief Implementation of face element
4
5*/
6
8
9namespace MoFEM {
10
12 Interface &m_field)
13 : ForcesAndSourcesCore(m_field),
14 meshPositionsFieldName("MESH_NODE_POSITIONS"), aRea(elementMeasure) {}
15
19
20 auto type = numeredEntFiniteElementPtr->getEntType();
21
22 FTensor::Index<'i', 3> i;
23 FTensor::Index<'j', 3> j;
24 FTensor::Index<'k', 3> k;
25
26 auto get_ftensor_from_vec_3d = [](VectorDouble &v) {
28 &v[2]);
29 };
30
31 auto get_ftensor_n_diff = [&]() {
32 const auto &m = dataH1.dataOnEntities[MBVERTEX][0].getDiffN(NOBASE);
34 &m(0, 1));
35 };
36
37 auto get_ftensor_from_mat_3d = [](MatrixDouble &m) {
39 &m(0, 0), &m(0, 1), &m(0, 2));
40 };
41
42 if (type == MBTRI) {
43
44 const size_t nb_gauss_pts = gaussPts.size2();
45 normalsAtGaussPts.resize(nb_gauss_pts, 3);
46 tangentOneAtGaussPts.resize(nb_gauss_pts, 3);
47 tangentTwoAtGaussPts.resize(nb_gauss_pts, 3);
48
49 auto t_tan1 = get_ftensor_from_mat_3d(tangentOneAtGaussPts);
50 auto t_tan2 = get_ftensor_from_mat_3d(tangentTwoAtGaussPts);
51 auto t_normal = get_ftensor_from_mat_3d(normalsAtGaussPts);
52
53 auto t_n =
56 &tangentOne[2]);
58 &tangentTwo[2]);
59
60 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
61 t_normal(i) = t_n(i);
62 t_tan1(i) = t_t1(i);
63 t_tan2(i) = t_t2(i);
64 ++t_tan1;
65 ++t_tan2;
66 ++t_normal;
67 }
68
69 } else if (type == MBQUAD) {
70
71 EntityHandle ent = numeredEntFiniteElementPtr->getEnt();
72 CHKERR mField.get_moab().get_connectivity(ent, conn, num_nodes, true);
73 coords.resize(num_nodes * 3, false);
74 CHKERR mField.get_moab().get_coords(conn, num_nodes,
75 &*coords.data().begin());
76
77 const size_t nb_gauss_pts = gaussPts.size2();
78 normalsAtGaussPts.resize(nb_gauss_pts, 3);
79 tangentOneAtGaussPts.resize(nb_gauss_pts, 3);
80 tangentTwoAtGaussPts.resize(nb_gauss_pts, 3);
81 normalsAtGaussPts.clear();
84
85 auto t_t1 = get_ftensor_from_mat_3d(tangentOneAtGaussPts);
86 auto t_t2 = get_ftensor_from_mat_3d(tangentTwoAtGaussPts);
87 auto t_normal = get_ftensor_from_mat_3d(normalsAtGaussPts);
88
91
92 auto t_diff = get_ftensor_n_diff();
93 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
94 auto t_coords = get_ftensor_from_vec_3d(coords);
95 for (int nn = 0; nn != num_nodes; ++nn) {
96 t_t1(i) += t_coords(i) * t_diff(N0);
97 t_t2(i) += t_coords(i) * t_diff(N1);
98 ++t_diff;
99 ++t_coords;
100 }
101 t_normal(j) = FTensor::levi_civita(i, j, k) * t_t1(k) * t_t2(i);
102
103 ++t_t1;
104 ++t_t2;
105 ++t_normal;
106 }
107 } else {
108 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
109 "Element type not implemented");
110 }
111
113}
114
117
118 EntityHandle ent = numeredEntFiniteElementPtr->getEnt();
119 CHKERR mField.get_moab().get_connectivity(ent, conn, num_nodes, true);
120 coords.resize(num_nodes * 3, false);
121 CHKERR mField.get_moab().get_coords(conn, num_nodes, &*coords.data().begin());
122 nOrmal.resize(3, false);
123 tangentOne.resize(3, false);
124 tangentTwo.resize(3, false);
125
126 auto calc_normal = [&](const double *diff_ptr) {
129 &coords[0], &coords[1], &coords[2]);
131 &nOrmal[0], &nOrmal[1], &nOrmal[2]);
133 &tangentOne[0], &tangentOne[1], &tangentOne[2]);
135 &tangentTwo[0], &tangentTwo[1], &tangentTwo[2]);
137 diff_ptr, &diff_ptr[1]);
138
139 FTensor::Index<'i', 3> i;
140 FTensor::Index<'j', 3> j;
141 FTensor::Index<'k', 3> k;
142
145 t_t1(i) = 0;
146 t_t2(i) = 0;
147
148 for (int nn = 0; nn != num_nodes; ++nn) {
149 t_t1(i) += t_coords(i) * t_diff(N0);
150 t_t2(i) += t_coords(i) * t_diff(N1);
151 ++t_coords;
152 ++t_diff;
153 }
154 t_normal(j) = FTensor::levi_civita(i, j, k) * t_t1(k) * t_t2(i);
155 aRea = sqrt(t_normal(i) * t_normal(i));
157 };
158
159 const double *diff_ptr;
160 switch (numeredEntFiniteElementPtr->getEntType()) {
161 case MBTRI:
162 diff_ptr = Tools::diffShapeFunMBTRI.data();
163 CHKERR calc_normal(diff_ptr);
164 // FIXME: Normal should be divided not the area for triangle!!
165 aRea /= 2;
166 break;
167 case MBQUAD:
168 diff_ptr = Tools::diffShapeFunMBQUADAtCenter.data();
169 CHKERR calc_normal(diff_ptr);
170 break;
171 default:
172 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
173 "Element type not implemented");
174 }
175
177}
178
181 // Set integration points
182 int order_data = getMaxDataOrder();
183 int order_row = getMaxRowOrder();
184 int order_col = getMaxColOrder();
185
186 const auto type = numeredEntFiniteElementPtr->getEntType();
187
188 auto get_rule_by_type = [&]() {
189 switch (type) {
190 case MBQUAD:
191 return getRule(order_row + 1, order_col + 1, order_data + 1);
192 default:
193 return getRule(order_row, order_col, order_data);
194 }
195 };
196
197 const int rule = get_rule_by_type();
198
199 auto set_integration_pts_for_tri = [&]() {
201 const auto xiao_rule = IntRules::XiaoGimbutas::getTriangleRule(rule);
202 if (!xiao_rule) {
204 "Xiao--Gimbutas triangle rule is available for polynomial "
205 "orders 0 to %d; requested %d",
207 }
208 if (xiao_rule->numBarycentricCoordinates != 3) {
210 "wrong number of triangle barycentric coordinates");
211 }
212
213 const size_t nb_gauss_pts = xiao_rule->numPoints;
214 gaussPts.resize(3, nb_gauss_pts, false);
215 cblas_dcopy(nb_gauss_pts, &xiao_rule->points[1], 3, &gaussPts(0, 0), 1);
216 cblas_dcopy(nb_gauss_pts, &xiao_rule->points[2], 3, &gaussPts(1, 0), 1);
217 cblas_dcopy(nb_gauss_pts, xiao_rule->weights, 1, &gaussPts(2, 0), 1);
218 dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE).resize(nb_gauss_pts, 3,
219 false);
220 double *shape_ptr =
221 &*dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE).data().begin();
222 cblas_dcopy(3 * nb_gauss_pts, xiao_rule->points, 1, shape_ptr, 1);
223 dataH1.dataOnEntities[MBVERTEX][0].getDiffN(NOBASE).resize(3, 2, false);
224 std::copy(
226 dataH1.dataOnEntities[MBVERTEX][0].getDiffN(NOBASE).data().begin());
228 };
229
230 auto calc_base_for_tri = [&]() {
232 const size_t nb_gauss_pts = gaussPts.size2();
233 auto &base = dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE);
234 auto &diff_base = dataH1.dataOnEntities[MBVERTEX][0].getDiffN(NOBASE);
235 base.resize(nb_gauss_pts, 3, false);
236 diff_base.resize(3, 2, false);
237 CHKERR ShapeMBTRI(&*base.data().begin(), &gaussPts(0, 0), &gaussPts(1, 0),
238 nb_gauss_pts);
239 std::copy(
241 dataH1.dataOnEntities[MBVERTEX][0].getDiffN(NOBASE).data().begin());
243 };
244
245 auto calc_base_for_quad = [&]() {
247 const size_t nb_gauss_pts = gaussPts.size2();
248 auto &base = dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE);
249 auto &diff_base = dataH1.dataOnEntities[MBVERTEX][0].getDiffN(NOBASE);
250 base.resize(nb_gauss_pts, 4, false);
251 diff_base.resize(nb_gauss_pts, 8, false);
252 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
253 const double ksi = gaussPts(0, gg);
254 const double zeta = gaussPts(1, gg);
255 base(gg, 0) = N_MBQUAD0(ksi, zeta);
256 base(gg, 1) = N_MBQUAD1(ksi, zeta);
257 base(gg, 2) = N_MBQUAD2(ksi, zeta);
258 base(gg, 3) = N_MBQUAD3(ksi, zeta);
259 diff_base(gg, 0) = diffN_MBQUAD0x(zeta);
260 diff_base(gg, 1) = diffN_MBQUAD0y(ksi);
261 diff_base(gg, 2) = diffN_MBQUAD1x(zeta);
262 diff_base(gg, 3) = diffN_MBQUAD1y(ksi);
263 diff_base(gg, 4) = diffN_MBQUAD2x(zeta);
264 diff_base(gg, 5) = diffN_MBQUAD2y(ksi);
265 diff_base(gg, 6) = diffN_MBQUAD3x(zeta);
266 diff_base(gg, 7) = diffN_MBQUAD3y(ksi);
267 }
269 };
270
271 if (rule >= 0) {
272 switch (type) {
273 case MBTRI:
274 CHKERR set_integration_pts_for_tri();
275 break;
276 case MBQUAD:
278 rule);
279 CHKERR calc_base_for_quad();
280 break;
281 default:
282 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
283 "Element type not implemented: %d", type);
284 }
285
286 } else {
287 // If rule is negative, set user defined integration points
288 CHKERR setGaussPts(order_row, order_col, order_data);
289 const size_t nb_gauss_pts = gaussPts.size2();
290 if (nb_gauss_pts) {
291 switch (type) {
292 case MBTRI:
293 CHKERR calc_base_for_tri();
294 break;
295 case MBQUAD:
296 CHKERR calc_base_for_quad();
297 break;
298 default:
299 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
300 "Element type not implemented: %d", type);
301 }
302 }
303 }
305}
306
310 // Get spaces order/base and sense of entities.
311
313
314 auto type = numeredEntFiniteElementPtr->getEntType();
315 auto dim_type = CN::Dimension(type);
316
317 auto get_data_on_ents = [&](auto lower_dim, auto space) {
319 auto data = dataOnElement[space];
320 for (auto dd = dim_type; dd >= lower_dim; --dd) {
321 int nb_ents = moab::CN::NumSubEntities(type, dd);
322 for (int ii = 0; ii != nb_ents; ++ii) {
323 auto sub_ent_type = moab::CN::SubEntityType(type, dd, ii);
324 if ((dataH1.spacesOnEntities[sub_ent_type]).test(space)) {
325 auto &data_on_ent = data->dataOnEntities[sub_ent_type];
326 CHKERR getEntitySense(sub_ent_type, data_on_ent);
327 CHKERR getEntityDataOrder(sub_ent_type, space, data_on_ent);
328 data->spacesOnEntities[sub_ent_type].set(space);
329 }
330 }
331 }
333 };
334
335 CHKERR get_data_on_ents(1, H1); // H1
336 CHKERR get_data_on_ents(1, HCURL); // Hcurl
337 CHKERR get_data_on_ents(2, HDIV); // Hdiv
338 CHKERR get_data_on_ents(2, L2); // L2
339
341}
342
346
347 const size_t nb_nodes =
348 dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE).size2();
349 double *shape_functions =
350 &*dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE).data().begin();
351 const size_t nb_gauss_pts = gaussPts.size2();
352 coordsAtGaussPts.resize(nb_gauss_pts, 3, false);
353 for (int gg = 0; gg != nb_gauss_pts; ++gg)
354 for (int dd = 0; dd != 3; ++dd)
355 coordsAtGaussPts(gg, dd) = cblas_ddot(
356 nb_nodes, &shape_functions[nb_nodes * gg], 1, &coords[dd], 3);
357
359}
360
364 if (!(ptrFE = dynamic_cast<FaceElementForcesAndSourcesCore *>(ptr)))
365 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
366 "User operator and finite element do not work together");
368}
369
372
373 const auto type = numeredEntFiniteElementPtr->getEntType();
375 switch (type) {
376 case MBTRI:
378 boost::shared_ptr<BaseFunction>(new TriPolynomialBase());
379 break;
380 case MBQUAD:
382 boost::shared_ptr<BaseFunction>(new QuadPolynomialBase());
383 break;
384 default:
386 }
389 }
390
391 // Calculate normal and tangent vectors for face geometry
394
396 if (gaussPts.size2() == 0)
398
403
404 // Iterate over operators
406
408}
409
411FaceElementForcesAndSourcesCore::UserDataOperator::loopSideVolumes(
412 const string fe_name, VolumeElementForcesAndSourcesCoreOnSide &fe_method) {
413 return loopSide(fe_name, &fe_method, 3);
414}
415
419
420#ifndef NDEBUG
421 if (toElePtr->gaussPts.size1() != getGaussPts().size1()) {
422 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
423 "Inconsistent numer of weights %zu != %zu",
424 toElePtr->gaussPts.size1(), getGaussPts().size1());
425 }
426 if (toElePtr->gaussPts.size2() != getGaussPts().size2()) {
427 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
428 "Inconsistent numer of integtaion pts %zu != %zu",
429 toElePtr->gaussPts.size2(), getGaussPts().size2());
430 }
431#endif
432
433 // TODO: add support for quad element types
434 switch (getFEType()) {
435 case MBTRI:
436 break;
437 default:
438 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
439 "Element type not implemented");
440 }
441
442 auto get_ftensor_from_mat_3d = [](MatrixDouble &m) {
444 &m(0, 0), &m(0, 1), &m(0, 2));
445 };
446
447 // get local coordinates, i.e. local coordinates on child element using parent
448 // local coordinates
449 auto get_local_coords_triangle = [&]() {
450 std::array<double, 3> ksi0 = {0, 1, 0};
451 std::array<double, 3> ksi1 = {0, 0, 1};
452 std::array<double, 9> ref_shapes;
453 CHKERR Tools::shapeFunMBTRI<1>(ref_shapes.data(), ksi0.data(), ksi1.data(),
454 3);
455 auto &node_coords = getCoords();
456 auto &glob_coords = toElePtr->coords;
457 std::array<double, 6> local_coords;
459 &*node_coords.begin(), &*glob_coords.begin(), 3, local_coords.data());
460 return local_coords;
461 };
462
463 // get derivative of shape functions
464 auto get_diff_triangle = [&]() {
465 auto diff_ptr = Tools::diffShapeFunMBTRI.data();
467 diff_ptr, &diff_ptr[1]);
468 };
469
470 // get jacobian to map local coordinates of parent to child element
471 auto get_jac = [&](auto &&local_coords, auto &&t_diff) {
472 FTensor::Index<'I', 2> I;
473 FTensor::Index<'J', 2> J;
475 auto t_local_coords = getFTensor1FromPtr<2>(local_coords.data());
476 t_jac(I, J) = 0;
477 for (int nn = 0; nn != 3; ++nn) {
478 t_jac(I, J) += t_local_coords(I) * t_diff(J);
479 ++t_local_coords;
480 ++t_diff;
481 }
482 return t_jac;
483 };
484
485 // get tangent vectors tensor
486 auto t_mat_tangent = [&](auto &t1, auto &t2) {
488 &t1(0), &t1(1), &t1(2), &t2(0), &t2(1), &t2(2)};
489 };
490
491 // transform tangent vectors to child element tangents
492 auto transform = [&](auto &&t_mat_t, auto &&t_mat_out_t, auto &&t_inv_jac) {
493 FTensor::Index<'I', 2> I;
494 FTensor::Index<'J', 2> J;
495 FTensor::Index<'i', 3> i;
498 for (auto gg = 0; gg != getGaussPts().size2(); ++gg) {
500 t_mat_out_t(J, i) = t_mat_t(I, i) * t_inv_jac(I, J);
501 ++t_mat_t;
502 ++t_mat_out_t;
503 }
504 };
505
506 // calculate normal vector on child element
507 auto calc_normal = [&](auto &n, auto &t1, auto &t2) {
508 FTensor::Index<'i', 3> i;
509 FTensor::Index<'j', 3> j;
510 FTensor::Index<'k', 3> k;
511 auto t_t1 = get_ftensor_from_mat_3d(t1);
512 auto t_t2 = get_ftensor_from_mat_3d(t2);
513 auto t_n = get_ftensor_from_mat_3d(n);
514 for (auto gg = 0; gg != getGaussPts().size2(); ++gg) {
515 t_n(j) = FTensor::levi_civita(i, j, k) * t_t1(k) * t_t2(i);
516 ++t_t1;
517 ++t_t2;
518 ++t_n;
519 }
520 };
521
522 transform(
523
524 t_mat_tangent(getTangent1AtGaussPts(), getTangent2AtGaussPts()),
525 t_mat_tangent(toElePtr->tangentOneAtGaussPts,
526 toElePtr->tangentTwoAtGaussPts),
527 get_jac(get_local_coords_triangle(), get_diff_triangle())
528
529 );
530 calc_normal(toElePtr->normalsAtGaussPts, toElePtr->tangentOneAtGaussPts,
531 toElePtr->tangentTwoAtGaussPts);
532
534}
535
536} // namespace MoFEM
std::string type
static MoFEMErrorCode get_jac(EntitiesFieldData::EntData &col_data, int gg, MatrixDouble &jac_stress, MatrixDouble &jac)
@ NOBASE
Definition definitions.h:59
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ L2
field with C-1 continuity
Definition definitions.h:88
@ H1
continuous field
Definition definitions.h:85
@ HCURL
field with continuous tangents
Definition definitions.h:86
@ HDIV
field with continuous normal traction
Definition definitions.h:87
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define diffN_MBQUAD2y(x)
Definition fem_tools.h:66
#define diffN_MBQUAD1x(y)
Definition fem_tools.h:63
#define N_MBQUAD3(x, y)
quad shape function
Definition fem_tools.h:60
#define diffN_MBQUAD0x(y)
Definition fem_tools.h:61
#define diffN_MBQUAD1y(x)
Definition fem_tools.h:64
#define diffN_MBQUAD3y(x)
Definition fem_tools.h:68
#define diffN_MBQUAD0y(x)
Definition fem_tools.h:62
#define N_MBQUAD0(x, y)
quad shape function
Definition fem_tools.h:57
#define diffN_MBQUAD3x(y)
Definition fem_tools.h:67
#define diffN_MBQUAD2x(y)
Definition fem_tools.h:65
#define N_MBQUAD2(x, y)
quad shape function
Definition fem_tools.h:59
#define N_MBQUAD1(x, y)
quad shape function
Definition fem_tools.h:58
PetscErrorCode ShapeMBTRI(double *N, const double *X, const double *Y, const int G_DIM)
calculate shape functions on triangle
Definition fem_tools.c:182
FTensor::Index< 'i', SPACE_DIM > i
const double v
phase velocity of light in medium (cm/ns)
const double n
refractive index of diffusive medium
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
const Rule * getTriangleRule(const int order)
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
constexpr IntegrationType I
FTensor::Index< 'm', 3 > m
virtual moab::Interface & get_moab()=0
virtual MPI_Comm & get_comm() const =0
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
std::array< std::bitset< LASTSPACE >, MBMAXTYPE > spacesOnEntities
spaces on entity types
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
Shared pointer to finite element database structure.
virtual MoFEMErrorCode calculateAreaAndNormal()
Calculate element area and normal of the face.
MoFEMErrorCode operator()()
Main operator function executed for each loop iteration.
virtual MoFEMErrorCode getSpaceBaseAndOrderOnElement()
Determine approximation space and order of base functions.
virtual MoFEMErrorCode calculateAreaAndNormalAtIntegrationPts()
Calculate element area and normal of the face at integration points.
virtual MoFEMErrorCode setIntegrationPts()
Set integration points.
virtual MoFEMErrorCode calculateCoordinatesAtGaussPts()
Calculate coordinate at integration points.
virtual MoFEMErrorCode setPtrFE(ForcesAndSourcesCore *ptr)
structure to get information from mofem into EntitiesFieldData
int getMaxRowOrder() const
Get max order of approximation for field in rows.
MoFEMErrorCode calHierarchicalBaseFunctionsOnElement()
Calculate base functions.
MoFEMErrorCode loopOverOperators()
Iterate user data operators.
MoFEMErrorCode getEntityDataOrder(const EntityType type, const FieldSpace space, boost::ptr_vector< EntitiesFieldData::EntData > &data) const
Get the entity data order.
virtual MoFEMErrorCode setGaussPts(int order_row, int order_col, int order_data)
set user specific integration rule
int getMaxDataOrder() const
Get max order of approximation for data fields.
auto & getElementPolynomialBase()
Get the Entity Polynomial Base object.
MoFEMErrorCode getSpacesAndBaseOnEntities(EntitiesFieldData &data) const
Get field approximation space and base on entities.
MatrixDouble coordsAtGaussPts
coordinated at gauss points
int getMaxColOrder() const
Get max order of approximation for field in columns.
const std::array< boost::shared_ptr< EntitiesFieldData >, LASTSPACE > dataOnElement
Entity data on element entity rows fields.
MatrixDouble gaussPts
Matrix of integration points.
EntityType lastEvaluatedElementEntityType
Last evaluated type of element entity.
virtual int getRule(int order_row, int order_col, int order_data)
another variant of getRule
MoFEMErrorCode createDataOnElement(EntityType type)
Create a entity data on element object.
MoFEMErrorCode getEntitySense(const EntityType type, boost::ptr_vector< EntitiesFieldData::EntData > &data) const
get sense (orientation) of entity
MoFEMErrorCode calBernsteinBezierBaseFunctionsOnElement()
Calculate Bernstein-Bezier base.
Copy geometry-related data from one element to other.
Calculate base functions on triangle.
static MoFEMErrorCode outerProductOfEdgeIntegrationPtsForQuad(MatrixDouble &pts, const int edge0, const int edge1)
Definition Tools.cpp:613
static constexpr std::array< double, 8 > diffShapeFunMBQUADAtCenter
Definition Tools.hpp:212
static constexpr std::array< double, 6 > diffShapeFunMBTRI
Definition Tools.hpp:104
static MoFEMErrorCode getLocalCoordinatesOnReferenceThreeNodeTri(const double *elem_coords, const double *glob_coords, const int nb_nodes, double *local_coords)
Get the local coordinates on reference three node tri object.
Definition Tools.cpp:188
Calculate base functions on triangle.
double zeta
Viscous hardening.
Definition plastic.cpp:131