v0.15.5
Loading...
Searching...
No Matches
Projection10NodeCoordsOnField.cpp
Go to the documentation of this file.
1/** \file Projection10NodeCoordsOnField.cpp
2 * \brief Project displacements/coordinates from 10 node tetrahedra on
3 * hierarchical approximation base.
4 */
5
6
7
8namespace MoFEM {
9
11 Interface &m_field, std::string field_name, int verb)
12 : mField(m_field), fieldName(field_name), vErbose(verb) {}
13
16 auto field_ptr = mField.get_field_structure(fieldName);
17 if (field_ptr->getApproxBase() == AINSWORTH_BERNSTEIN_BEZIER_BASE) {
18 MOFEM_TAG_AND_LOG("WORLD", Sev::warning, "Projection10NodeCoordsOnField")
19 << "Only working well for first order AINSWORTH_BERNSTEIN_BEZIER_BASE!";
20 MOFEM_LOG_CHANNEL("WORLD");
21 }
23}
24
27
28 if (dofPtr == NULL) {
29 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
30 }
31 if (dofPtr->getName() != fieldName)
33 if (dofPtr->getEntType() == MBVERTEX) {
34 EntityHandle node = dofPtr->getEnt();
35 coords.resize(3);
36 CHKERR mField.get_moab().get_coords(&node, 1, &*coords.data().begin());
37 dofPtr->getFieldData() = coords[dofPtr->getDofCoeffIdx()];
38 if (vErbose > 0) {
39 MOFEM_TAG_AND_LOG_C("SELF", Sev::noisy, "Projection10NodeCoordsOnField",
40 "val = %6.7e\n", dofPtr->getFieldData());
41 MOFEM_LOG_CHANNEL("SELF");
42 }
43
45 }
46 if (dofPtr->getEntType() != MBEDGE) {
48 }
49 if (dofPtr->getEntDofIdx() != dofPtr->getDofCoeffIdx()) {
51 }
52 EntityHandle edge = dofPtr->getEnt();
53 if (type_from_handle(edge) != MBEDGE) {
54 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
55 "this method works only elements which are type of MBEDGE");
56 }
57 // coords
58 int num_nodes;
59 const EntityHandle *conn;
60 CHKERR mField.get_moab().get_connectivity(edge, conn, num_nodes, false);
61 if ((num_nodes != 2) && (num_nodes != 3)) {
62 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
63 "this method works only 4 node and 10 node tets");
64 }
65 coords.resize(num_nodes * 3);
66 CHKERR mField.get_moab().get_coords(conn, num_nodes, &*coords.data().begin());
67 aveMidCoord.resize(3);
68 midNodeCoord.resize(3);
69 for (int dd = 0; dd < 3; dd++) {
70 aveMidCoord[dd] = (coords[0 * 3 + dd] + coords[1 * 3 + dd]) * 0.5;
71 if (num_nodes == 3) {
72 midNodeCoord[dd] = coords[2 * 3 + dd];
73 } else {
74 midNodeCoord[dd] = aveMidCoord[dd];
75 }
76 }
77
78 const auto base = dofPtr->getApproxBase();
79 double edge_shape_function_val;
80 switch (base) {
82 edge_shape_function_val = 0.25;
83 break;
85 edge_shape_function_val = 0.25 * LOBATTO_PHI0(0);
86 break;
88 double L[3];
89 CHKERR Legendre_polynomials(2, 0, NULL, L, NULL, 1);
90 edge_shape_function_val = 0.125 * LOBATTO_PHI0(0);
91 }; break;
92 default:
93 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not yet implemented");
94 }
95
96 diffNodeCoord.resize(3);
97 ublas::noalias(diffNodeCoord) = midNodeCoord - aveMidCoord;
98 dOf.resize(3);
99 ublas::noalias(dOf) = diffNodeCoord / edge_shape_function_val;
100 if (dofPtr->getNbOfCoeffs() > 3) {
101 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
102 "this method works only fields which are rank 3 or lower");
103 }
104 dofPtr->getFieldData() = dOf[dofPtr->getDofCoeffIdx()];
105
107}
108
113
114// remove triangles which have at least free_edge_threshold edges which are on the outer boundary of the set
115static MoFEMErrorCode filterOuterTrisByEdges(moab::Interface &moab,
116 Range &tris,
117 const int free_edge_threshold = 1) {
119
120 if (tris.empty()) {
122 }
123
124 Range edges;
125 CHKERR moab.get_adjacencies(tris, 1, true, edges, moab::Interface::UNION);
126
127 std::unordered_map<EntityHandle, int> edge_adj_count;
128 edge_adj_count.reserve(edges.size());
129
130 for (auto edge : edges) {
131 Range adj_tris;
132 CHKERR moab.get_adjacencies(&edge, 1, 2, false, adj_tris,
133 moab::Interface::UNION);
134 adj_tris = intersect(adj_tris, tris);
135 edge_adj_count[edge] = static_cast<int>(adj_tris.size());
136 }
137
138 Range remove_tris;
139 for (auto tri : tris) {
140 Range tri_edges;
141 CHKERR moab.get_adjacencies(&tri, 1, 1, false, tri_edges,
142 moab::Interface::UNION);
143 int free_edges = 0;
144 for (auto edge : tri_edges) {
145 auto it = edge_adj_count.find(edge);
146 if (it != edge_adj_count.end() && it->second == 1) {
147 if (++free_edges >= free_edge_threshold) {
148 remove_tris.insert(tri);
149 break;
150 }
151 }
152 }
153 }
154
155 if (!remove_tris.empty()) {
156 tris = subtract(tris, remove_tris);
157 }
158
160}
161
162// remove triangles which have less than 2 adjacent triangles in the set, i.e. are on the outer boundary of the set
163static MoFEMErrorCode filterOuterTrisByTris(moab::Interface &moab,
164 Range &tris) {
166
167 if (tris.empty()) {
169 }
170
171 Range remove_tris;
172 for (auto tri : tris) {
173
174 Range adj_edges;
175 CHKERR moab.get_adjacencies(&tri, 1, 1, false, adj_edges,
176 moab::Interface::UNION);
177 Range adj_tris;
178 CHKERR moab.get_adjacencies(adj_edges, 2, false, adj_tris,
179 moab::Interface::UNION);
180 adj_tris = intersect(adj_tris, tris);
181 adj_tris.erase(tri);
182 if (adj_tris.size() <= 1) {
183 remove_tris.insert(tri);
184 }
185 }
186
187 if (!remove_tris.empty()) {
188 tris = subtract(tris, remove_tris);
189 }
190
192}
193
196 moab::Interface &fine_moab,
197 const Range &fine_tris,
198 std::string field_name,
199 double planar_angle_deg,
200 double max_disp_factor,
201 bool debug_surfaces,
202 int verb)
203 : mField(m_field), fineMoab(fine_moab), fineTris(fine_tris),
204 fieldName(field_name), vErbose(verb), fineTree(&fine_moab), fineRoot(0),
205 fineFeatureTree(&fine_moab), fineFeatureRoot(0),
206 planarAngleCos(std::cos(planar_angle_deg * 0.017453292519943295)),
207 maxDispFactor(max_disp_factor), debugSurfaces(debug_surfaces) {}
208
211
212 // Build coarse skin triangles from volume mesh.
213 Range coarse_vols;
214 CHKERR mField.get_moab().get_entities_by_dimension(0, 3, coarse_vols);
215 if (coarse_vols.empty()) {
216 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
217 "no 3d entities found in coarse mesh");
218 }
219
220 Skinner coarse_skinner(&mField.get_moab());
221 coarseSkinTris.clear();
222 CHKERR coarse_skinner.find_skin(0, coarse_vols, false, coarseSkinTris);
223 if (coarseSkinTris.empty()) {
224 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
225 "no skin triangles found in coarse mesh");
226 }
227
228 coarseSkinEdges.clear();
229 CHKERR mField.get_moab().get_adjacencies(coarseSkinTris, 1, false,
231 moab::Interface::UNION);
232
233 if (fineTris.empty()) {
234 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
235 "no surface triangles found in fine mesh");
236 }
237
238 auto tri_normal = [&](const EntityHandle tri,
241 const EntityHandle *conn;
242 int num_nodes;
243 double coords[9];
244 CHKERR fineMoab.get_connectivity(tri, conn, num_nodes, true);
245 CHKERR fineMoab.get_coords(conn, num_nodes, coords);
246
247 CHKERR mField.getInterface<Tools>()->getTriNormal(coords, &normal(0));
248 normal.normalize();
250 };
251
252 const double fine_planar_cos =
253 std::cos(std::acos(planarAngleCos) * 1e-6);
254
255 Range fine_edges;
256 CHKERR fineMoab.get_adjacencies(fineTris, 1, true, fine_edges,
257 moab::Interface::UNION);
258
259 if (debugSurfaces) {
260 CHKERR CutMeshInterface::SaveData(fineMoab)("fine_edge_features.vtk",
261 fine_edges);
262 }
263 fineFeatureTris.clear();
264 for (auto edge : fine_edges) {
265 Range adj_tris;
266 CHKERR fineMoab.get_adjacencies(&edge, 1, 2, false, adj_tris,
267 moab::Interface::UNION);
268 adj_tris = intersect(adj_tris, fineTris);
269 if (adj_tris.size() != 2) {
270 continue;
271 }
272
275 CHKERR tri_normal(adj_tris[0], n0);
276 CHKERR tri_normal(adj_tris[1], n1);
277 const double dot = n0(i) * n1(i);
278 if (std::abs(dot) < fine_planar_cos) {
279 fineFeatureTris.insert(adj_tris[0]);
280 fineFeatureTris.insert(adj_tris[1]);
281 }
282 }
283
285 if (fineFeatureTris.empty()) {
287 }
288 if (debugSurfaces) {
289 CHKERR CutMeshInterface::SaveData(fineMoab)("fine_tri_features.vtk",
291 }
292
293 // KD tree on fine surface for closest-point queries.
294 fineRoot = 0;
295 CHKERR fineTree.build_tree(fineTris, &fineRoot);
296 fineFeatureRoot = 0;
298
300}
301
304
305 if (entPtr == NULL) {
306 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
307 }
308 if (entPtr->getName() != fieldName)
310 if (entPtr->getEntType() != MBEDGE)
312
313 const EntityHandle edge = entPtr->getEnt();
314 if (coarseSkinEdges.find(edge) == coarseSkinEdges.end()) {
316 }
317
318 Range adj_tris;
319 CHKERR mField.get_moab().get_adjacencies(&edge, 1, 2, false, adj_tris,
320 moab::Interface::UNION);
321 adj_tris = intersect(adj_tris, coarseSkinTris);
322 if (adj_tris.size() != 2) {
323 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
324 "skin edge does not have exactly two adjacent triangles");
325 }
326
327 int num_nodes = 0;
328 const EntityHandle *conn = nullptr;
329 CHKERR mField.get_moab().get_connectivity(edge, conn, num_nodes, false);
330 if (num_nodes < 2) {
331 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
332 "edge connectivity has fewer than 2 nodes");
333 }
334
335 const auto base = entPtr->getApproxBase();
336 double edge_shape_function_val = 0.0;
337 switch (base) {
339 edge_shape_function_val = 0.25;
340 break;
342 edge_shape_function_val = 0.25 * LOBATTO_PHI0(0);
343 break;
345 double L[3];
346 CHKERR Legendre_polynomials(2, 0, NULL, L, NULL, 1);
347 edge_shape_function_val = 0.125 * LOBATTO_PHI0(0);
348 } break;
349 default:
350 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not yet implemented");
351 }
352
353 auto ent_data = entPtr->getEntFieldData();
354 auto t_ent_data = getFTensor1FromPtr<3>(&ent_data(0));
355 if (ent_data.size() != 3) {
356 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
357 "edge data size mismatch");
358 }
359 coords.resize(num_nodes * 3);
360 CHKERR mField.get_moab().get_coords(conn, num_nodes, &*coords.data().begin());
363 &coords[0], &coords[1], &coords[2]);
365 &coords[3], &coords[4], &coords[5]);
366 edge_vec(i) = t_n1(i) - t_n0(i);
367 const double h = edge_vec.l2();
368 if (h <= 0.0) {
369 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "zero-length edge");
370 }
371 aveMidCoord.resize(3);
372 midNodeCoord.resize(3);
373 auto t_ave_mid_coord = getFTensor1FromPtr<3>(&aveMidCoord(0));
374 auto t_mid_node_coord = getFTensor1FromPtr<3>(&midNodeCoord(0));
375 t_ave_mid_coord(i) = 0.5 * (t_n0(i) + t_n1(i));
376 t_mid_node_coord(i) =
377 t_ave_mid_coord(i) + edge_shape_function_val * t_ent_data(i);
378
379 auto tri_normal = [&](const EntityHandle tri,
380 FTensor::Tensor1<double, 3> &t_normal) {
382 CHKERR mField.getInterface<Tools>()->getTriNormal(tri, &t_normal(0));
383 t_normal.normalize();
385 };
386
389 CHKERR tri_normal(adj_tris[0], n0);
390 CHKERR tri_normal(adj_tris[1], n1);
391 const double dot = n0(i) * n1(i);
392
393 if (std::abs(dot) >= planarAngleCos) {
395 }
396
397 double closest_point[3] = {0.0, 0.0, 0.0};
398 EntityHandle closest_tri = 0;
399 const double query[3] = {midNodeCoord[0], midNodeCoord[1], midNodeCoord[2]};
400 CHKERR fineFeatureTree.closest_triangle(fineFeatureRoot, query, closest_point,
401 closest_tri);
402 if (!closest_tri) {
403 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
404 "no closest triangle found on fine mesh");
405 }
406
407 auto get_disp = [&](double _closest_point[3]) {
409 for (int ii = 0; ii < 3; ii++)
410 delta(ii) = _closest_point[ii] - midNodeCoord[ii];
411 return delta.l2();
412 };
413
414 double disp = get_disp(closest_point);
415
416 if (disp > maxDispFactor * h) {
417 // std::cout << "Fallback to full fine tree for edge " << edge << std::endl;
418 EntityHandle feature_tri = 0;
419 CHKERR fineTree.closest_triangle(fineRoot, query, closest_point,
420 feature_tri);
421 if (feature_tri) {
422 disp = get_disp(closest_point);
423 }
424 }
425
426 if (disp > maxDispFactor * h) {
427 MOFEM_LOG("SELF", Sev::warning) <<
428 "The displacement for edge " << edge
429 << " is too large: " << disp << " (max allowed (-max_midnode_disp_factor * h) "
430 << maxDispFactor * h << "). Using original mid-edge position.";
431
432 } else {
433 midNodeCoord[0] = closest_point[0];
434 midNodeCoord[1] = closest_point[1];
435 midNodeCoord[2] = closest_point[2];
436 }
437
438 diffNodeCoord.resize(3);
439 auto t_diff_node_coord = getFTensor1FromPtr<3>(&diffNodeCoord(0));
440 t_diff_node_coord(i) = t_mid_node_coord(i) - t_ave_mid_coord(i);
441 dOf.resize(3);
442 auto t_dof = getFTensor1FromPtr<3>(&dOf(0));
443 t_dof(i) = t_diff_node_coord(i) / edge_shape_function_val;
444 if (entPtr->getNbOfCoeffs() > 3) {
445 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
446 "this method works only fields which are rank 3 or lower");
447 }
448 ent_data[0] = dOf[0];
449 ent_data[1] = dOf[1];
450 ent_data[2] = dOf[2];
451
453}
454
459
461 std::string _fieldName,
462 bool set_nodes,
463 bool on_coords,
464 std::string on_tag)
465 : Projection10NodeCoordsOnField(m_field, _fieldName), setNodes(set_nodes),
466 onCoords(on_coords), onTag(on_tag), maxApproximationOrder(20) {}
467
469Field_multiIndex::index<FieldName_mi_tag>::type::iterator field_it;
472
475 if (!onCoords) {
476 if (onTag == "NoNE") {
477 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
478 "tag name not specified");
479 }
481 if (field_it == fieldsPtr->get<FieldName_mi_tag>().end()) {
482 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "field not found %s",
483 fieldName.c_str());
484 }
485 int field_rank = (*field_it)->getNbOfCoeffs();
486 VectorDouble def_VAL = ublas::zero_vector<double>(field_rank);
487 CHKERR mField.get_moab().tag_get_handle(
488 onTag.c_str(), field_rank, MB_TYPE_DOUBLE, th,
489 MB_TAG_CREAT | MB_TAG_SPARSE, &*def_VAL.data().begin());
491 }
492
493 L.resize(maxApproximationOrder + 1);
495 &*L.data().begin(), NULL, 3);
496 K.resize(10);
497 CHKERR LobattoKernel_polynomials(9, 0., NULL, &*K.data().begin(), NULL, 3);
498
500}
501
504 if (dofPtr->getName() != fieldName)
506 if (setNodes) {
507 if (dofPtr->getEntType() == MBVERTEX) {
508 EntityHandle node = dofPtr->getEnt();
509 if (onCoords) {
510 coords.resize(3);
511 CHKERR mField.get_moab().get_coords(&node, 1, &*coords.data().begin());
512 coords[dofPtr->getDofCoeffIdx()] = dofPtr->getFieldData();
513 CHKERR mField.get_moab().set_coords(&node, 1, &*coords.data().begin());
514 } else {
515 int field_rank = (*field_it)->getNbOfCoeffs();
516 if (field_rank != dofPtr->getNbOfCoeffs()) {
517 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
518 "data inconsistency");
519 }
520 double *tag_value;
521 int tag_size;
522 CHKERR mField.get_moab().tag_get_by_ptr(
523 th, &node, 1, (const void **)&tag_value, &tag_size);
524 if (tag_size != dofPtr->getNbOfCoeffs()) {
525 SETERRQ(PETSC_COMM_SELF, 1, "data inconsistency");
526 }
527 tag_value[dofPtr->getDofCoeffIdx()] = dofPtr->getFieldData();
528 }
529 }
531 }
532 if (dofPtr->getEntType() != MBEDGE) {
534 }
535 EntityHandle edge = dofPtr->getEnt();
536 if (type_from_handle(edge) != MBEDGE) {
537 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
538 "this method works only elements which are type of MBEDGE");
539 }
540
541 int num_nodes;
542 const EntityHandle *conn;
543 CHKERR mField.get_moab().get_connectivity(edge, conn, num_nodes, false);
544 if ((num_nodes != 2) && (num_nodes != 3)) {
545 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
546 "this method works only 4 node and 10 node tets");
547 }
548 if (num_nodes == 2) {
550 }
551
552 if (dofPtr->getDofOrder() >= maxApproximationOrder) {
553 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
554 "too big approximation order, increase constant "
555 "max_ApproximationOrder");
556 }
557 double approx_val = 0;
558 FieldApproximationBase base = dofPtr->getApproxBase();
559 switch (base) {
561 approx_val = 0.25 * L[dofPtr->getDofOrder() - 2] * dofPtr->getFieldData();
562 break;
564 approx_val = 0.25 * K[dofPtr->getDofOrder() - 2] * dofPtr->getFieldData();
565 break;
566 default:
567 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not yet implemented");
568 }
569
570 if (onCoords) {
571 coords.resize(num_nodes * 3);
572 CHKERR mField.get_moab().get_coords(conn, num_nodes,
573 &*coords.data().begin());
574 if (dofPtr->getEntDofIdx() == dofPtr->getDofCoeffIdx()) {
575 // add only one when higher order terms present
576 double ave_mid = (coords[3 * 0 + dofPtr->getDofCoeffIdx()] +
577 coords[3 * 1 + dofPtr->getDofCoeffIdx()]) *
578 0.5;
579 coords[2 * 3 + dofPtr->getDofCoeffIdx()] = ave_mid;
580 }
581 coords[2 * 3 + dofPtr->getDofCoeffIdx()] += approx_val;
582 CHKERR mField.get_moab().set_coords(&conn[2], 1, &coords[3 * 2]);
583 } else {
584 int tag_size;
585 double *tag_value[num_nodes];
586 CHKERR mField.get_moab().tag_get_by_ptr(
587 th, conn, num_nodes, (const void **)tag_value, &tag_size);
588 if (tag_size != dofPtr->getNbOfCoeffs()) {
589 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
590 }
591 if (dofPtr->getEntDofIdx() == dofPtr->getDofCoeffIdx()) {
592 // add only one when higher order terms present
593 double ave_mid = (tag_value[0][dofPtr->getDofCoeffIdx()] +
594 tag_value[1][dofPtr->getDofCoeffIdx()]) *
595 0.5;
596 tag_value[2][dofPtr->getDofCoeffIdx()] = ave_mid;
597 }
598 tag_value[2][dofPtr->getDofCoeffIdx()] += approx_val;
599 }
601}
602}; // namespace MoFEM
#define MOFEM_TAG_AND_LOG_C(channel, severity, tag, format,...)
Tag and log in channel.
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#define LOBATTO_PHI0(x)
Definitions taken from Hermes2d code.
FieldApproximationBase
approximation base
Definition definitions.h:58
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
Definition definitions.h:60
@ AINSWORTH_LOBATTO_BASE
Definition definitions.h:62
@ DEMKOWICZ_JACOBI_BASE
Definition definitions.h:66
@ AINSWORTH_BERNSTEIN_BEZIER_BASE
Definition definitions.h:64
#define MOAB_THROW(err)
Check error code of MoAB function and throw MoFEM exception.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
PetscErrorCode Legendre_polynomials(int p, double s, double *diff_s, double *L, double *diffL, int dim)
Calculate Legendre approximation basis.
PetscErrorCode LobattoKernel_polynomials(int p, double s, double *diff_s, double *L, double *diffL, const int dim)
Calculate Kernel Lobatto base functions.
virtual const Field * get_field_structure(const std::string &name, enum MoFEMTypes bh=MF_EXIST) const =0
get field structure
#define MOFEM_LOG(channel, severity)
Log.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
FTensor::Index< 'i', SPACE_DIM > i
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
UBlasVector< double > VectorDouble
Definition Types.hpp:68
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
auto type_from_handle(const EntityHandle h)
get type from entity handle
static MoFEMErrorCode filterOuterTrisByTris(moab::Interface &moab, Range &tris)
static MoFEMErrorCode filterOuterTrisByEdges(moab::Interface &moab, Range &tris, const int free_edge_threshold=1)
Field_multiIndex::index< FieldName_mi_tag >::type::iterator field_it
double h
constexpr auto field_name
static constexpr double delta
const Field_multiIndex * fieldsPtr
Raw pointer to fields multi-index container.
virtual moab::Interface & get_moab()=0
Deprecated interface functions.
boost::shared_ptr< DofEntity > dofPtr
Shared pointer to DOF entity data.
boost::shared_ptr< FieldEntity > entPtr
Shared pointer to field entity data.
MultiIndex Tag for field name.
MoFEMErrorCode postProcess()
Post-processing function executed at loop completion.
MoFEMErrorCode operator()()
Main operator function executed for each loop iteration.
MoFEMErrorCode preProcess()
Pre-processing function executed at loop initialization.
Projection10NodeCoordsFromFineSurfaceOnField(Interface &m_field, moab::Interface &fine_moab, const Range &fine_tris, std::string field_name, double planar_angle_deg=5.0, double max_disp_factor=0.5, bool debug_surfaces=false, int verb=0)
Projection of edge entities with one mid-node on hierarchical basis.
MoFEMErrorCode postProcess()
Post-processing function executed at loop completion.
MoFEMErrorCode operator()()
Main operator function executed for each loop iteration.
Projection10NodeCoordsOnField(Interface &m_field, std::string field_name, int verb=0)
MoFEMErrorCode preProcess()
Pre-processing function executed at loop initialization.
MoFEMErrorCode preProcess()
Pre-processing function executed at loop initialization.
ProjectionFieldOn10NodeTet(Interface &m_field, std::string _fieldName, bool set_nodes, bool on_coords, std::string on_tag="NoNE")
MoFEMErrorCode operator()()
Main operator function executed for each loop iteration.
Field_multiIndex::index< FieldName_mi_tag >::type::iterator field_it
Auxiliary tools.
Definition Tools.hpp:19
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.