v0.15.0
Loading...
Searching...
No Matches
EshelbianMonitor Struct Reference
Inheritance diagram for EshelbianMonitor:
[legend]
Collaboration diagram for EshelbianMonitor:
[legend]

Public Types

using Ele = ForcesAndSourcesCore
 
using VolEle = VolumeElementForcesAndSourcesCore
 
using VolOp = VolumeElementForcesAndSourcesCore::UserDataOperator
 
using SetPtsData = FieldEvaluatorInterface::SetPtsData
 
using PtsHashMap = std::map<std::string, std::array<double, 3>>
 
using FaceSideEle
 

Public Member Functions

 EshelbianMonitor (EshelbianCore &ep)
 
MoFEMErrorCode preProcess ()
 
MoFEMErrorCode operator() ()
 
MoFEMErrorCode postProcess ()
 

Public Attributes

EshelbianCoreeP
 
boost::shared_ptr< SetPtsDatadataFieldEval
 
boost::shared_ptr< VolElevolPostProcEnergy
 
boost::shared_ptr< doublegEnergy
 
PtsHashMap ptsHashMap
 
PetscBool writeRestart = PETSC_FALSE
 

Detailed Description

Definition at line 6 of file EshelbianMonitor.cpp.

Member Typedef Documentation

◆ Ele

using EshelbianMonitor::Ele = ForcesAndSourcesCore

Definition at line 8 of file EshelbianMonitor.cpp.

◆ FaceSideEle

Initial value:
PipelineManager::ElementsAndOpsByDim<SPACE_DIM>::FaceSideEle

Definition at line 13 of file EshelbianMonitor.cpp.

◆ PtsHashMap

using EshelbianMonitor::PtsHashMap = std::map<std::string, std::array<double, 3>>

Definition at line 12 of file EshelbianMonitor.cpp.

◆ SetPtsData

using EshelbianMonitor::SetPtsData = FieldEvaluatorInterface::SetPtsData

Definition at line 11 of file EshelbianMonitor.cpp.

◆ VolEle

using EshelbianMonitor::VolEle = VolumeElementForcesAndSourcesCore

Definition at line 9 of file EshelbianMonitor.cpp.

◆ VolOp

using EshelbianMonitor::VolOp = VolumeElementForcesAndSourcesCore::UserDataOperator

Definition at line 10 of file EshelbianMonitor.cpp.

Constructor & Destructor Documentation

◆ EshelbianMonitor()

EshelbianMonitor::EshelbianMonitor ( EshelbianCore & ep)
inline

Definition at line 23 of file EshelbianMonitor.cpp.

24 : eP(ep), dataFieldEval(ep.mField.getInterface<FieldEvaluatorInterface>()
25 ->getData<VolEle>()),
26 volPostProcEnergy(new VolEle(ep.mField)), gEnergy(new double) {
28 ep.mField.getInterface<FieldEvaluatorInterface>()->buildTree<SPACE_DIM>(
29 dataFieldEval, "EP"),
30 "build field evaluator tree");
31
32 auto no_rule = [](int, int, int) { return -1; };
33
34 auto set_element_for_field_eval = [&]() {
36 boost::shared_ptr<Ele> vol_ele(dataFieldEval->feMethodPtr.lock());
37 vol_ele->getRuleHook = no_rule;
38 vol_ele->getUserPolynomialBase() =
39 boost::make_shared<CGGUserPolynomialBase>();
41 vol_ele->getOpPtrVector(), {HDIV, H1, L2}, eP.materialH1Positions,
42 ep.frontAdjEdges);
43
44 auto piola_scale_ptr = boost::make_shared<double>(1.0);
45 vol_ele->getOpPtrVector().push_back(
46 eP.physicalEquations->returnOpSetScale(piola_scale_ptr,
48 vol_ele->getOpPtrVector().push_back(new OpCalculateHVecTensorField<3, 3>(
49 eP.piolaStress, eP.dataAtPts->getApproxPAtPts(), piola_scale_ptr));
50 vol_ele->getOpPtrVector().push_back(
51 new OpCalculateHTensorTensorField<3, 3>(
52 eP.bubbleField, eP.dataAtPts->getApproxPAtPts(), piola_scale_ptr,
53 SmartPetscObj<Vec>(), MBMAXTYPE));
55 vol_ele->getOpPtrVector().push_back(
56 eP.physicalEquations->returnOpCalculateStretchFromStress(
58 } else {
59 vol_ele->getOpPtrVector().push_back(
60 new OpCalculateTensor2SymmetricFieldValues<3>(
61 eP.stretchTensor, eP.dataAtPts->getLogStretchTensorAtPts(),
62 MBTET));
63 }
64 vol_ele->getOpPtrVector().push_back(new OpCalculateVectorFieldValues<3>(
65 eP.rotAxis, eP.dataAtPts->getRotAxisAtPts(), MBTET));
66 vol_ele->getOpPtrVector().push_back(new OpCalculateVectorFieldValues<3>(
67 eP.rotAxis, eP.dataAtPts->getRotAxis0AtPts(), eP.solTSStep, MBTET));
68 vol_ele->getOpPtrVector().push_back(new OpCalculateVectorFieldValues<3>(
69 eP.spatialL2Disp, eP.dataAtPts->getSmallWL2AtPts(), MBTET));
70
71 // H1 displacements
72 vol_ele->getOpPtrVector().push_back(new OpCalculateVectorFieldValues<3>(
73 eP.spatialH1Disp, eP.dataAtPts->getSmallWH1AtPts()));
74 vol_ele->getOpPtrVector().push_back(
75 new OpCalculateVectorFieldGradient<3, 3>(
76 eP.spatialH1Disp, eP.dataAtPts->getSmallWGradH1AtPts()));
77
78 vol_ele->getOpPtrVector().push_back(
81 };
82
83 auto set_element_for_post_process_energy = [&]() {
85
87 1, false, false, false, SmartPetscObj<Vec>(), volPostProcEnergy);
88
89 if (auto op = eP.physicalEquations->returnOpCalculateEnergy(eP.dataAtPts,
90 gEnergy)) {
91 volPostProcEnergy->getOpPtrVector().push_back(op);
92 }
93
95 };
96
97 auto reads_post_proc_data = [](PtsHashMap &pts_hash_map) {
99 std::ifstream file(
100 "points.txt"); // Open the file with the name "data.txt"
101
102 if (!file.is_open()) {
104 }
105
106 std::string line;
107
108 while (std::getline(file, line)) {
109 std::istringstream iss(line);
110 std::string col1;
111 double col2, col3, col4;
112
113 if (iss >> col1 >> col2 >> col3 >> col4) {
114 MOFEM_LOG("EP", Sev::verbose) << "Read: " << col1 << ", " << col2
115 << ", " << col3 << ", " << col4;
116 pts_hash_map[col1] = {col2, col3, col4};
117 } else {
118 MOFEM_LOG("EP", Sev::error) << "Error parsing line: " << line;
119 }
120 }
121
122 file.close(); // Close the file
124 };
125
126 CHK_THROW_MESSAGE(set_element_for_field_eval(), "set element for field");
127 CHK_THROW_MESSAGE(set_element_for_post_process_energy(),
128 "set element for post energy");
129
130 PetscBool test_cook_flg = PETSC_FALSE;
131 CHK_THROW_MESSAGE(PetscOptionsGetBool(PETSC_NULLPTR, "", "-test_cook_pts",
132 &test_cook_flg, PETSC_NULLPTR),
133 "get post proc points");
134 if (test_cook_flg) {
135 ptsHashMap["Point A"] = {48., 60., 4.999};
136 ptsHashMap["Point B"] = {48. / 2., 44. + (60. - 44.) / 2., 0.};
137 ptsHashMap["Point C"] = {48. / 2., (44. - 0.) / 2., 0.};
138 }
139
140 PetscInt atom_test = 0;
141
142 CHKERR PetscOptionsGetInt(PETSC_NULLPTR, "", "-atom_test", &atom_test,
143 PETSC_NULLPTR);
144 if (atom_test == 14) {
145 // Points for atom test 14: check external strain
146 ptsHashMap["Point (2.5, 0., 0.)"] = {2.5, 0, 0.};
147 }
148 CHK_MOAB_THROW(reads_post_proc_data(ptsHashMap), "read post proc points");
149
150 CHK_THROW_MESSAGE(PetscOptionsGetBool(PETSC_NULLPTR, "", "-write_restart",
151 &writeRestart, PETSC_NULLPTR),
152 "get write restart option");
153 }
constexpr int SPACE_DIM
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MOFEM_LOG(channel, severity)
Log.
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
int atom_test
Atom test.
Definition plastic.cpp:121
boost::shared_ptr< Range > frontAdjEdges
MoFEM::Interface & mField
const std::string spatialL2Disp
const std::string materialH1Positions
MoFEMErrorCode setBaseVolumeElementOps(const int tag, const bool do_rhs, const bool do_lhs, const bool calc_rates, SmartPetscObj< Vec > ver_vec, boost::shared_ptr< VolumeElementForcesAndSourcesCore > fe)
const std::string spatialH1Disp
const std::string piolaStress
const std::string bubbleField
static PetscBool noStretch
boost::shared_ptr< PhysicalEquations > physicalEquations
const std::string rotAxis
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
SmartPetscObj< Vec > solTSStep
const std::string stretchTensor
boost::shared_ptr< double > gEnergy
std::map< std::string, std::array< double, 3 > > PtsHashMap
boost::shared_ptr< VolEle > volPostProcEnergy
boost::shared_ptr< SetPtsData > dataFieldEval
EshelbianCore & eP
VolumeElementForcesAndSourcesCore VolEle
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.

Member Function Documentation

◆ operator()()

MoFEMErrorCode EshelbianMonitor::operator() ( )
inline

Definition at line 157 of file EshelbianMonitor.cpp.

157{ return 0; }

◆ postProcess()

MoFEMErrorCode EshelbianMonitor::postProcess ( )
inline

Definition at line 159 of file EshelbianMonitor.cpp.

159 {
161
162 MOFEM_LOG("EP", Sev::inform) << "Monitor postProcess";
163
164 // Get boundary faces marked in blocks name "SPATIAL_DISP_...".
165 auto get_ents_on_mesh_skin = [&]() {
166
167 std::map<std::string, Range> boundary_entities_vec;
168 Range boundary_entities;
170 std::string meshset_name = it->getName();
171 std::string block_name_disp = "SPATIAL_DISP";
172 std::string block_name_fix = "FIX";
173 if (meshset_name.compare(0, block_name_disp.size(), block_name_disp) == 0 ||
174 meshset_name.compare(0, block_name_fix.size(), block_name_fix) == 0) {
175 CHKERR it->getMeshsetIdEntitiesByDimension(eP.mField.get_moab(), 2,
176 boundary_entities, true);
177 // Add vertices to boundary entities
178 boundary_entities_vec[meshset_name] = boundary_entities;
179 boundary_entities.clear();
180 }
181 }
182 return boundary_entities_vec;
183 };
184
185 auto boundary_entities_vec = get_ents_on_mesh_skin();
186
187 std::vector<std::tuple<std::string, Range, std::array<double, 6>>>
188 reactionForces;
189 for (const auto &pair : boundary_entities_vec) {
190 reactionForces.push_back(
191 std::make_tuple(pair.first, pair.second,
192 std::array<double, 6>{0.0, 0.0, 0.0, 0.0, 0.0, 0.0}));
193 }
194
195 auto integration_rule_face = [](int, int, int approx_order) {
196 return 2 * approx_order + 1;
197 };
198 auto face_fe =
199 boost::make_shared<FaceElementForcesAndSourcesCore>(eP.mField);
200 auto no_rule = [](int, int, int) { return -1; };
201 face_fe->getRuleHook = integration_rule_face;
202 CHKERR
204 face_fe->getOpPtrVector(), {L2}, eP.materialH1Positions,
206
207 auto op_side =
208 new OpLoopSide<FaceSideEle>(eP.mField, "EP", SPACE_DIM, Sev::noisy);
209 face_fe->getOpPtrVector().push_back(op_side);
210 auto side_fe_ptr = op_side->getSideFEPtr();
211 auto base_ptr =
212 boost::make_shared<EshelbianPlasticity::CGGUserPolynomialBase>();
213 side_fe_ptr->getUserPolynomialBase() = base_ptr;
215 side_fe_ptr->getOpPtrVector(), {H1, HDIV, L2}, eP.materialH1Positions,
217 auto piola_scale_ptr = boost::make_shared<double>(1.0);
218 side_fe_ptr->getOpPtrVector().push_back(
219 eP.physicalEquations->returnOpSetScale(piola_scale_ptr,
221 side_fe_ptr->getOpPtrVector().push_back(
222 new OpCalculateHVecTensorField<SPACE_DIM, SPACE_DIM>(
223 eP.piolaStress, eP.dataAtPts->getApproxPAtPts(), piola_scale_ptr));
224 side_fe_ptr->getOpPtrVector().push_back(
225 new OpCalculateHTensorTensorField<3, 3>(
226 eP.bubbleField, eP.dataAtPts->getApproxPAtPts(), MBMAXTYPE));
227 side_fe_ptr->getOpPtrVector().push_back(
229 side_fe_ptr->getOpPtrVector().push_back(new OpCalculateVectorFieldValues<3>(
230 eP.spatialL2Disp, eP.dataAtPts->getSmallWL2AtPts(), MBTET));
231 for (auto &[name, ents, reaction_vec] : reactionForces) {
232 face_fe->getOpPtrVector().push_back(new OpCalculateReactionForces(
233 eP.dataAtPts, name, ents, reaction_vec));
234 }
235
236 CHKERR eP.mField.loop_finite_elements(problemPtr->getName(), eP.skinElement,
237 *face_fe);
238
239 for (auto &[name, ents, reaction_vec] : reactionForces) {
240 std::array<double, 6> block_reaction_force{0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
241
242 MPI_Allreduce(reaction_vec.data(), &block_reaction_force, 6, MPI_DOUBLE,
243 MPI_SUM, eP.mField.get_comm());
244
245 for (auto &force : block_reaction_force) {
246 if (std::abs(force) < 1e-12) {
247 force = 0.0;
248 }
249 }
251 "EP", Sev::inform,
252 "Step %d time %3.4g Block %s Reaction force [%3.6e, %3.6e, %3.6e]",
253 ts_step, ts_t, name.c_str(), block_reaction_force[0],
254 block_reaction_force[1], block_reaction_force[2]);
255 MOFEM_LOG_C("EP", Sev::inform,
256 "Step %d time %3.4g Block %s Moment [%3.6e, %3.6e, %3.6e]",
257 ts_step, ts_t, name.c_str(), block_reaction_force[3],
258 block_reaction_force[4], block_reaction_force[5]);
259 }
260
261 auto get_step = [](auto ts_step) {
262 std::ostringstream ss;
263 ss << boost::str(boost::format("%d") % static_cast<int>(ts_step));
264 std::string s = ss.str();
265 return s;
266 };
267
268 if (writeRestart && ts_u) {
269 PetscViewer viewer;
270 CHKERR PetscViewerBinaryOpen(
271 PETSC_COMM_WORLD, ("restart_" + get_step(ts_step) + ".dat").c_str(),
272 FILE_MODE_WRITE, &viewer);
273 CHKERR VecView(ts_u, viewer);
274 CHKERR PetscViewerDestroy(&viewer);
275 }
276
277 CHKERR eP.postProcessResults(1, "out_sol_elastic_" + get_step(ts_step) +
278 ".h5m");
279
280 // Post-process skeleton elements
281 bool post_process_skeleton = false;
282 #ifndef NDEBUG
283 post_process_skeleton = true;
284 #endif
285 if (post_process_skeleton) {
286
287 auto get_material_force_tags = [&]() {
288 auto &moab = eP.mField.get_moab();
289 std::vector<Tag> tag(2);
290 CHK_MOAB_THROW(moab.tag_get_handle("MaterialForce", tag[0]),
291 "can't get tag");
292 CHK_MOAB_THROW(moab.tag_get_handle("FacePressure", tag[1]),
293 "can't get tag");
294 return tag;
295 };
296
299 1, "out_skeleton_" + get_step(ts_step) + ".h5m", PETSC_NULLPTR,
300 get_material_force_tags());
301 }
302
303 // Loop boundary elements with traction boundary conditions
304 *gEnergy = 0;
305 TetPolynomialBase::switchCacheBaseOn<HDIV>({volPostProcEnergy.get()});
306 CHKERR eP.mField.loop_finite_elements(problemPtr->getName(), "EP",
308 TetPolynomialBase::switchCacheBaseOff<HDIV>({volPostProcEnergy.get()});
309
310 double body_energy = 0;
311 MPI_Allreduce(gEnergy.get(), &body_energy, 1, MPI_DOUBLE, MPI_SUM,
312 eP.mField.get_comm());
314 auto crack_area_ptr = boost::make_shared<double>(0.0);
315 CHKERR eP.calculateCrackArea(crack_area_ptr);
316 MOFEM_LOG_C("EP", Sev::inform,
317 "Step %d time %3.4g strain energy %3.6e crack "
318 "area %3.6e",
319 ts_step, ts_t, body_energy, *crack_area_ptr);
320 if (eP.mField.get_comm_rank() == 0) {
321 auto crack_faces = *eP.crackFaces;
322 if (crack_faces.empty()) {
323 crack_faces = *eP.frontEdges;
324 }
327 (boost::format("crack_faces_step_%d.vtk") % ts_step).str(),
328 crack_faces);
331 (boost::format("front_edges_step_%d.vtk") % ts_step).str(),
332 *eP.frontEdges);
333 }
334
335 } else {
336 MOFEM_LOG_C("EP", Sev::inform, "Step %d time %3.4g strain energy %3.6e",
337 ts_step, ts_t, body_energy);
338 }
339
340 auto post_proc_at_points = [&](std::array<double, 3> point,
341 std::string str) {
343
344 dataFieldEval->setEvalPoints(point.data(), point.size() / 3);
345
346 struct OpPrint : public VolOp {
347
348 EshelbianCore &eP;
349 std::array<double, 3> point;
350 std::string str;
351
352 OpPrint(EshelbianCore &ep, std::array<double, 3> &point,
353 std::string &str)
354 : VolOp(ep.spatialL2Disp, VolOp::OPROW), eP(ep), point(point),
355 str(str) {}
356
357 MoFEMErrorCode doWork(int side, EntityType type,
358 EntitiesFieldData::EntData &data) {
360 if (type == MBTET) {
361 if (getGaussPts().size2()) {
362
363 auto t_h = getFTensor2FromMat<3, 3>(eP.dataAtPts->hAtPts);
364 auto t_approx_P =
365 getFTensor2FromMat<3, 3>(eP.dataAtPts->approxPAtPts);
366
367 FTensor::Index<'i', 3> i;
368 FTensor::Index<'j', 3> j;
369 FTensor::Index<'k', 3> k;
370 const double jac = determinantTensor3by3(t_h);
372 t_cauchy(i, j) = (1. / jac) * (t_approx_P(i, k) * t_h(j, k));
373
374 auto add = [&]() {
375 std::ostringstream s;
376 s << str << " elem " << getFEEntityHandle() << " ";
377 return s.str();
378 };
379
380 auto print_tensor = [](auto &t) {
381 std::ostringstream s;
382 s << t;
383 return s.str();
384 };
385
386 std::ostringstream print;
387 MOFEM_LOG("EPSYNC", Sev::inform)
388 << add() << "comm rank " << eP.mField.get_comm_rank();
389 MOFEM_LOG("EPSYNC", Sev::inform)
390 << add() << "point " << getVectorAdaptor(point.data(), 3);
391 MOFEM_LOG("EPSYNC", Sev::inform)
392 << add() << "coords at gauss pts " << getCoordsAtGaussPts();
393 MOFEM_LOG("EPSYNC", Sev::inform)
394 << add() << "w " << eP.dataAtPts->wL2AtPts;
395 MOFEM_LOG("EPSYNC", Sev::inform)
396 << add() << "Piola " << eP.dataAtPts->approxPAtPts;
397 MOFEM_LOG("EPSYNC", Sev::inform)
398 << add() << "Cauchy " << print_tensor(t_cauchy);
399 }
400 }
402 }
403 };
404
405 if (auto fe_ptr = dataFieldEval->feMethodPtr.lock()) {
406
407 fe_ptr->getOpPtrVector().push_back(new OpPrint(eP, point, str));
408 CHKERR eP.mField.getInterface<FieldEvaluatorInterface>()
409 ->evalFEAtThePoint<SPACE_DIM>(
410 point.data(), 1e-12, problemPtr->getName(), "EP", dataFieldEval,
412 MF_EXIST, QUIET);
413 fe_ptr->getOpPtrVector().pop_back();
414 }
415
417 };
418
419 auto check_external_strain = [&](std::array<double, 3> point,
420 std::string str, PetscInt atom_test) {
422
423 dataFieldEval->setEvalPoints(point.data(), point.size() / 3);
424 auto vec = createVectorMPI(eP.mField.get_comm(), 1, 1);
425 eP.dataAtPts->wL2AtPts.resize(0, 0, false);
426
427 if (auto fe_ptr = dataFieldEval->feMethodPtr.lock()) {
428 CHKERR eP.mField.getInterface<FieldEvaluatorInterface>()
429 ->evalFEAtThePoint<SPACE_DIM>(
430 point.data(), 1e-12, problemPtr->getName(), "EP", dataFieldEval,
432 MF_EXIST, QUIET);
433 }
434 if (eP.dataAtPts->wL2AtPts.size2() == 0) {
435 VecSetValue(vec, 0, 0.0, ADD_VALUES);
436 } else if (eP.dataAtPts->wL2AtPts.size2() == 1) {
437 auto add = [&]() {
438 std::ostringstream s;
439 s << str << " elem " << getFEEntityHandle() << " ";
440 return s.str();
441 };
442 MOFEM_LOG("EPSYNC", Sev::inform)
443 << add() << "comm rank " << eP.mField.get_comm_rank();
444 MOFEM_LOG("EPSYNC", Sev::inform)
445 << add() << "point " << getVectorAdaptor(point.data(), 3);
446 MOFEM_LOG("EPSYNC", Sev::inform)
447 << add() << "w " << eP.dataAtPts->wL2AtPts;
448 double disp_at_point = eP.dataAtPts->wL2AtPts(0);
449 VecSetValue(vec, 0, disp_at_point, ADD_VALUES);
450 }
451
453 if (ts_t > 0.0) {
454 CHKERR VecAssemblyBegin(vec);
455 CHKERR VecAssemblyEnd(vec);
456 double error;
457 PetscInt idx = 0;
458 if (eP.mField.get_comm_rank() == 0) {
459 CHKERR VecGetValues(vec, 1, &idx, &error);
460 }
461 MPI_Bcast(&error, 1, MPI_DOUBLE, 0, PETSC_COMM_WORLD);
462 // Check if the displacement is correct for the applied external
463 // strain For the bar problem, we expect a displacement of 0.25 at
464 // point A
465 if (std::abs(error - 0.25) > 1e-5) {
466 SETERRQ(PETSC_COMM_WORLD, MOFEM_ATOM_TEST_INVALID,
467 "Atom test %d failed: wrong displacement.", atom_test);
468 }
469 }
471 };
472
473 PetscInt atom_test = 0;
474 CHKERR PetscOptionsGetInt(PETSC_NULLPTR, "", "-atom_test", &atom_test,
475 PETSC_NULLPTR);
476
477 if (atom_test == 14) {
478 // Points for external strain
479 for (auto &pts : ptsHashMap) {
480 CHKERR check_external_strain(pts.second, pts.first, atom_test);
481 }
482 } else {
483 // Points for Cook beam
484 for (auto &pts : ptsHashMap) {
485 CHKERR post_proc_at_points(pts.second, pts.first);
487 }
488 }
489
490 if (eP.crackingOn) {
491 }
492
494 }
#define MOFEM_LOG_SEVERITY_SYNC(comm, severity)
Synchronise "SYNC" on curtain severity level.
#define MOFEM_LOG_C(channel, severity, format,...)
@ QUIET
@ MF_EXIST
@ BLOCKSET
@ MOFEM_ATOM_TEST_INVALID
Definition definitions.h:40
virtual MoFEMErrorCode loop_finite_elements(const std::string problem_name, const std::string &fe_name, FEMethod &method, boost::shared_ptr< NumeredEntFiniteElement_multiIndex > fe_ptr=nullptr, MoFEMTypes bh=MF_EXIST, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr(), int verb=DEFAULT_VERBOSITY)=0
Make a loop over finite elements.
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
auto getVectorAdaptor(T1 ptr, const size_t n)
Get Vector adaptor.
Definition Templates.hpp:31
auto createVectorMPI(MPI_Comm comm, PetscInt n, PetscInt N)
Create MPI Vector.
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim1, Tensor_Dim2 > getFTensor2FromMat(MatrixDouble &data)
Get tensor rank 2 (matrix) form data matrix.
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
constexpr double t
plate stiffness
Definition plate.cpp:58
static constexpr int approx_order
static PetscBool crackingOn
MoFEMErrorCode calculateFaceMaterialForce(const int tag, TS ts)
MoFEMErrorCode calculateCrackArea(boost::shared_ptr< double > area_ptr)
MoFEMErrorCode postProcessSkeletonResults(const int tag, const std::string file, Vec f_residual=PETSC_NULLPTR, std::vector< Tag > tags_to_transfer={})
const std::string skinElement
MoFEMErrorCode postProcessResults(const int tag, const std::string file, Vec f_residual=PETSC_NULLPTR, Vec var_vec=PETSC_NULLPTR, std::vector< Tag > tags_to_transfer={})
boost::shared_ptr< Range > crackFaces
boost::shared_ptr< Range > frontEdges
virtual moab::Interface & get_moab()=0
virtual MPI_Comm & get_comm() const =0
virtual int get_comm_rank() const =0
virtual MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Operator for bi-linear form, usually to calculate values on left hand side.
EntityHandle getFEEntityHandle() const
Return finite element entity handle.
MatrixDouble & getCoordsAtGaussPts()
Gauss points and weight, matrix (nb. of points x 3)
@ OPROW
operator doWork function is executed on FE rows
MatrixDouble & getGaussPts()
matrix of integration (Gauss) points for Volume Element
auto save_range

◆ preProcess()

MoFEMErrorCode EshelbianMonitor::preProcess ( )
inline

Definition at line 155 of file EshelbianMonitor.cpp.

155{ return 0; }

Member Data Documentation

◆ dataFieldEval

boost::shared_ptr<SetPtsData> EshelbianMonitor::dataFieldEval

Definition at line 17 of file EshelbianMonitor.cpp.

◆ eP

EshelbianCore& EshelbianMonitor::eP

Definition at line 16 of file EshelbianMonitor.cpp.

◆ gEnergy

boost::shared_ptr<double> EshelbianMonitor::gEnergy

Definition at line 19 of file EshelbianMonitor.cpp.

◆ ptsHashMap

PtsHashMap EshelbianMonitor::ptsHashMap

Definition at line 20 of file EshelbianMonitor.cpp.

◆ volPostProcEnergy

boost::shared_ptr<VolEle> EshelbianMonitor::volPostProcEnergy

Definition at line 18 of file EshelbianMonitor.cpp.

◆ writeRestart

PetscBool EshelbianMonitor::writeRestart = PETSC_FALSE

Definition at line 21 of file EshelbianMonitor.cpp.


The documentation for this struct was generated from the following file: