v0.16.3
Loading...
Searching...
No Matches
TSElasticPreAndPostStep.cpp
Go to the documentation of this file.
1/** @file TSElasticPreAndPostStep.cpp
2 * @brief Elastic TS pre/post-step callbacks and incremental kinematics reset.
3 * @date 2023-05-13
4 *
5 * @license{This project is released under the MIT License.}
6 *
7 */
8
9#define SINGULARITY
10#include <MoFEM.hpp>
11using namespace MoFEM;
12
14
15#include <boost/math/constants/constants.hpp>
16#include <boost/math/special_functions/lambert_w.hpp>
17
19#include <array>
20#include <numbers>
21
22namespace EshelbianPlasticity {
23
24namespace {
25
26/** Shorten only the constant L2 coefficient block; higher modes are untouched.
27 * Used in the elastic TS pre-step, outside nonlinear/adjoint evaluations.
28 */
29struct OpShortenConstantRotation : VolUserDataOperator {
30 OpShortenConstantRotation(const std::string &field, Vec solution,
31 PetscInt &count)
32 : VolUserDataOperator(field, OPROW), solutionVec(solution),
33 changedCount(count) {
34 doEntities.fill(false);
35 doEntities[MBTET] = true;
36 }
37 MoFEMErrorCode doWork(int, EntityType, EntData &data) override;
39 PetscInt &changedCount;
40};
41
42MoFEMErrorCode OpShortenConstantRotation::doWork(int, EntityType,
43 EntData &data) {
45 if (!data.getIndices().size())
47 if (data.getIndices().size() < 3 || data.getFieldData().size() < 3)
48 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
49 "Incomplete constant rotation block");
50 PetscInt first, last;
51 CHKERR VecGetOwnershipRange(solutionVec, &first, &last);
52 const auto *indices = data.getIndices().data().data();
53 if (indices[0] < first || indices[0] >= last)
55 if (indices[1] < first || indices[2] >= last)
56 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
57 "Constant rotation block crosses PETSc ownership ranges");
58 const double phi0 = data.getN()(0, 0);
59 auto coefficient = data.getFTensor1FieldData<3>();
60 const double angle = std::abs(phi0) * coefficient.l2();
61 if (!std::isfinite(angle))
62 SETERRQ(PETSC_COMM_SELF, MOFEM_INVALID_DATA, "Nonfinite constant rotation");
63 constexpr double pi = std::numbers::pi;
64 // Stay away from both the pi branch switch and the 2*pi rank loss.
65 if (angle < 1.5 * pi)
67 const double turns = std::round(angle / (2 * pi));
68 const double factor = 1. - 2 * pi * turns / angle;
69 std::array<double, 3> values;
70 auto shortened = getFTensor1FromPtr<3>(values.data());
71 FTENSOR_INDEX(3, i);
72 shortened(i) = factor * coefficient(i);
73 CHKERR VecSetValues(solutionVec, 3, indices, values.data(), INSERT_VALUES);
76}
77
78MoFEMErrorCode resetIncrementalKinematics(EshelbianCore *ep_ptr, TS ts) {
80
81 Vec solution;
82 CHKERR TSGetSolution(ts, &solution);
83 const auto shorten_rotation = [&]() {
85 // The product rotation is invariant under a constant-mode branch change.
86 // Raw-coordinate mass penalties/viscosity are not invariant.
87 if (ep_ptr->rotSelector != LARGE_ROT || ep_ptr->alphaR != 0. ||
88 ep_ptr->alphaViscousR != 0.)
90 CHKERR VecGhostUpdateBegin(solution, INSERT_VALUES, SCATTER_FORWARD);
91 CHKERR VecGhostUpdateEnd(solution, INSERT_VALUES, SCATTER_FORWARD);
92 CHKERR DMoFEMMeshToLocalVector(ep_ptr->dmElastic, solution, INSERT_VALUES,
93 SCATTER_REVERSE);
94 auto fe =
95 boost::make_shared<VolumeElementForcesAndSourcesCore>(ep_ptr->mField);
96 fe->getUserPolynomialBase() =
97 boost::make_shared<CGGUserPolynomialBase>(nullptr, true);
98 fe->getRuleHook = [](int, int, int) { return 1; };
99 CHKERR AddHOOps<3, 3, 3>::add(fe->getOpPtrVector(), {L2},
100 ep_ptr->materialH1Positions,
101 ep_ptr->frontAdjEdges);
102 PetscInt local_count = 0, global_count;
103 fe->getOpPtrVector().push_back(
104 new OpShortenConstantRotation(ep_ptr->rotAxis, solution, local_count));
106 ep_ptr->elementVolumeName, fe);
107 CHKERR VecAssemblyBegin(solution);
108 CHKERR VecAssemblyEnd(solution);
109 CHKERR MPI_Allreduce(&local_count, &global_count, 1, MPIU_INT, MPI_SUM,
110 ep_ptr->mField.get_comm());
111 if (global_count) {
112 CHKERR VecGhostUpdateBegin(solution, INSERT_VALUES, SCATTER_FORWARD);
113 CHKERR VecGhostUpdateEnd(solution, INSERT_VALUES, SCATTER_FORWARD);
114 CHKERR DMoFEMMeshToLocalVector(ep_ptr->dmElastic, solution, INSERT_VALUES,
115 SCATTER_REVERSE);
116 MOFEM_LOG("EP", Sev::inform) << "Shortened constant L2 rotation on "
117 << global_count << " elements";
118 }
120 };
121
122 const auto zero_fields = [&]() {
124 auto zero_field = [&](const std::string &field_name) {
126 auto is_mng = ep_ptr->mField.getInterface<ISManager>();
128 CHKERR is_mng->isCreateProblemFieldAndRankLocal(
129 "ELASTIC_PROBLEM", ROW, field_name, 0, MAX_DOFS_ON_ENTITY, is);
130 const int *index_ptr;
131 CHKERR ISGetIndices(is, &index_ptr);
132 int size;
133 CHKERR ISGetLocalSize(is, &size);
134 double *array;
135 CHKERR VecGetArray(solution, &array);
136 for (int ii = 0; ii != size; ++ii) {
137 array[index_ptr[ii]] = 0;
138 }
139 CHKERR VecRestoreArray(solution, &array);
140 CHKERR ISRestoreIndices(is, &index_ptr);
142 };
143
144 MOFEM_LOG("EP", Sev::verbose)
145 << "Resetting incremental stretch and rotation after H1 transfer";
146 CHKERR zero_field(ep_ptr->stretchTensor);
147 CHKERR zero_field(ep_ptr->rotAxis);
148 CHKERR VecGhostUpdateBegin(solution, INSERT_VALUES, SCATTER_FORWARD);
149 CHKERR VecGhostUpdateEnd(solution, INSERT_VALUES, SCATTER_FORWARD);
151 };
152
153 switch (ep_ptr->gradApproximator) {
155 CHKERR shorten_rotation();
156 break;
157 case LARGE_ROT:
158 case MODERATE_ROT:
159 case SMALL_ROT:
160 CHKERR zero_fields();
161 break;
162 default:
163 SETERRQ(
165 "Unsupported gradient approximator for incremental kinematics reset");
166 }
167
169}
170
171constexpr char elasticPreStepKey[] = "ep_elastic_pre_step";
172struct ElasticPreStepContext {
176};
177
178/** Preserve optional H1 history bookkeeping before resetting coordinates. */
179MoFEMErrorCode elasticPreStep(TS ts) {
181 PetscContainer container = nullptr;
182 CHKERR PetscObjectQuery(getPetscObject(ts), elasticPreStepKey,
183 reinterpret_cast<PetscObject *>(&container));
184 if (!container)
185 SETERRQ(PetscObjectComm(getPetscObject(ts)), MOFEM_DATA_INCONSISTENCY,
186 "Missing elastic TS pre-step context");
187 void *pointer = nullptr;
188 CHKERR PetscContainerGetPointer(container, &pointer);
189 auto &context = *static_cast<ElasticPreStepContext *>(pointer);
190 if (context.h1Update)
192 if (context.ep->gradApproximator == NO_H1_CONFIGURATION) {
193 if (context.ep->rotSelector == LARGE_ROT &&
194 (context.ep->alphaR != 0. || context.ep->alphaViscousR != 0.) &&
195 !context.reportedCoordinatePenalty) {
196 MOFEM_LOG("EP", Sev::inform)
197 << "Constant rotation shortening disabled: alpha_r or "
198 "viscosity_alpha_r acts on raw rotation coordinates";
199 context.reportedCoordinatePenalty = true;
200 }
201 CHKERR resetIncrementalKinematics(context.ep, ts);
202 }
204}
205
206} // namespace
207
209 bool h1_update) {
211 PetscContainer container = nullptr;
212 CHKERR PetscObjectQuery(getPetscObject(ts), elasticPreStepKey,
213 reinterpret_cast<PetscObject *>(&container));
214 if (!container) {
215 CHKERR PetscContainerCreate(ep_ptr->mField.get_comm(), &container);
216 auto *context = new ElasticPreStepContext{ep_ptr, h1_update};
217 CHKERR PetscContainerSetPointer(container, context);
218 CHKERR PetscContainerSetUserDestroy(container, [](void *pointer) {
220 delete static_cast<ElasticPreStepContext *>(pointer);
222 });
223 CHKERR PetscObjectCompose(getPetscObject(ts), elasticPreStepKey,
224 getPetscObject(container));
225 CHKERR PetscContainerDestroy(&container);
226 } else {
227 void *pointer = nullptr;
228 CHKERR PetscContainerGetPointer(container, &pointer);
229 auto &context = *static_cast<ElasticPreStepContext *>(pointer);
230 context.ep = ep_ptr;
231 context.h1Update = h1_update;
232 }
233 CHKERR TSSetPreStep(ts, elasticPreStep);
235}
236
238 : comm(ep_ptr->mField.get_comm()) {
239 // Callbacks share one active projection context, as in the existing solvers.
241 "Elastic projection is already active");
242 try {
244 "Initialise elastic spatial projection");
245 active = true;
246 } catch (...) {
247 CHKERRABORT(comm, postStepDestroy());
248 throw;
249 }
250}
251
255
264
268
269 epPtr = ep_ptr;
270
271 // H1 displacement may be excluded from dmElastic; use the full parent DM.
272 dmPrjSpatial = createDM(ep_ptr->mField.get_comm(), "DMMOFEM");
273 CHKERR DMMoFEMCreateSubDM(dmPrjSpatial, ep_ptr->dM, "PROJECT_SPATIAL");
279 CHKERR DMSetUp(dmPrjSpatial);
280
281 auto create_post_step_ksp = [&]() {
282 auto ksp = createKSP(epPtr->mField.get_comm());
283
284 auto set_up = [&]() {
287 using DomainEleOp = DomainEle::UserDataOperator;
291 GAUSS>::OpBaseTimesVector<1, 3, 3>;
292 auto fe_lhs = boost::make_shared<DomainEle>(ep_ptr->mField);
293 auto fe_rhs = boost::make_shared<DomainEle>(ep_ptr->mField);
294
295 fe_lhs->getUserPolynomialBase() = boost::shared_ptr<BaseFunction>(
296 new CGGUserPolynomialBase(nullptr, true));
297 fe_rhs->getUserPolynomialBase() = boost::shared_ptr<BaseFunction>(
298 new CGGUserPolynomialBase(nullptr, true));
299 CHKERR
300 EshelbianPlasticity::AddHOOps<SPACE_DIM, SPACE_DIM, SPACE_DIM>::add(
301 fe_lhs->getOpPtrVector(), {L2}, ep_ptr->materialH1Positions,
302 ep_ptr->frontAdjEdges);
303 CHKERR
304 EshelbianPlasticity::AddHOOps<SPACE_DIM, SPACE_DIM, SPACE_DIM>::add(
305 fe_rhs->getOpPtrVector(), {L2}, ep_ptr->materialH1Positions,
306 ep_ptr->frontAdjEdges);
307
308 fe_lhs->getOpPtrVector().push_back(
309 new OpDomainMass(ep_ptr->spatialH1Disp, ep_ptr->spatialH1Disp));
310 auto w_ptr = boost::make_shared<MatrixDouble>();
311 fe_rhs->getOpPtrVector().push_back(
313 fe_rhs->getOpPtrVector().push_back(
314 new OpRhs(ep_ptr->spatialH1Disp, w_ptr));
315
317 dmPrjSpatial, ep_ptr->elementVolumeName, fe_lhs, nullptr, nullptr);
319 fe_rhs, nullptr, nullptr);
320
321 CHKERR KSPAppendOptionsPrefix(ksp, "prjspatial_");
322 CHKERR KSPSetFromOptions(ksp);
323 CHKERR KSPSetDM(ksp, dmPrjSpatial);
324 CHKERR KSPSetUp(ksp);
326 };
327
328 CHK_THROW_MESSAGE(set_up(), "set up");
329
330 return ksp;
331 };
332
333 prjKsp = create_post_step_ksp();
336
338};
339
342 prjKsp.reset();
343 prjD.reset();
344 prjF.reset();
345 if (dmPrjSpatial) {
346 // Break DM/pipeline reference cycles while the parent problem is alive.
348 dmPrjSpatial.reset();
349 }
350 epPtr = nullptr;
352};
353
356 MOFEM_LOG("EP", Sev::inform) << "Pre step";
357
358 double time;
359 CHKERR TSGetTime(ts, &time);
360
362
363 auto debug_crack = [&]() {
365
366 PetscBool debug_crack_mesh = PETSC_FALSE;
367 CHKERR PetscOptionsGetBool(PETSC_NULLPTR, "", "-debug_crack_mesh",
368 &debug_crack_mesh, PETSC_NULLPTR);
369 if (debug_crack_mesh) {
370
371 auto append_meshsets_from_block = [](MoFEM::Interface &m_field,
372 const std::string &block_name,
373 const int dim,
374 std::vector<EntityHandle> &r) {
376 auto mesh_mng = m_field.getInterface<MeshsetsManager>();
377 auto bcs = mesh_mng->getCubitMeshsetPtr(
378
379 std::regex((boost::format("%s(.*)") % block_name).str())
380
381 );
382
383 for (auto bc : bcs) {
384 Range ents;
385 CHKERR m_field.get_moab().get_entities_by_dimension(
386 bc->getMeshset(), dim, ents, true);
387 if (!ents.empty()) {
388 r.push_back(bc->getMeshset());
389 }
390 }
391
393 };
394
395 if (!epPtr->mField.get_comm_rank() &&
397 if (epPtr->maxMovedFaces) {
399 ->addEntitiesToMeshset(BLOCKSET, epPtr->addCrackMeshsetId,
401 }
402
403 auto meshset_ptr = get_temp_meshset_ptr(epPtr->mField.get_moab());
404 Range tets;
405 CHKERR epPtr->mField.get_moab().get_entities_by_dimension(
406 *meshset_ptr, 3, tets);
407 CHKERR epPtr->mField.get_moab().add_entities(*meshset_ptr, tets);
408
409 std::vector<EntityHandle> meshsets;
410 meshsets.push_back(*meshset_ptr);
411
412 CHKERR append_meshsets_from_block(epPtr->mField, "CRACK", 2,
413 meshsets);
414 CHKERR append_meshsets_from_block(epPtr->mField, "FRONT", 1,
415 meshsets);
416 CHKERR append_meshsets_from_block(epPtr->mField, "EDGE", 1,
417 meshsets);
418
419 int time_step = 0;
420 CHKERR TSGetStepNumber(ts, &time_step);
421 std::string file_name =
422 "crack_meshsets_" + std::to_string(time_step) + ".h5m";
423 CHKERR epPtr->mField.get_moab().write_file(file_name.c_str(), "MOAB",
424 nullptr, meshsets.data(),
425 static_cast<int>(meshsets.size()));
426 }
427 }
428
430 };
431
434 CHKERR debug_crack();
436 }
437 CHKERR epPtr->projectGeometry(0, time);
439 }
440
441 Vec T;
442 CHKERR TSGetSolution(ts, &T);
443
444 CHKERR VecCopy(T, epPtr->solTSStep);
445 CHKERR VecGhostUpdateBegin(epPtr->solTSStep, INSERT_VALUES, SCATTER_FORWARD);
446 CHKERR VecGhostUpdateEnd(epPtr->solTSStep, INSERT_VALUES, SCATTER_FORWARD);
447
449}
450
453
454 double time;
455 CHKERR TSGetTime(ts, &time);
456
457 MOFEM_LOG("EP", Sev::inform) << "Solve H1 post-step";
458 CHKERR VecZeroEntries(prjF);
459 CHKERR KSPSolve(prjKsp, prjF, prjD);
460 CHKERR VecGhostUpdateBegin(prjD, INSERT_VALUES, SCATTER_FORWARD);
461 CHKERR VecGhostUpdateEnd(prjD, INSERT_VALUES, SCATTER_FORWARD);
463 SCATTER_REVERSE);
464
465 // The projected H1 field now carries the accepted deformation. Reset the
466 // incremental stretch and rotation before crack calculations and TS
467 // monitors so that the accepted increment is not applied a second time.
468 CHKERR resetIncrementalKinematics(epPtr, ts);
469
472 case GRIFFITH_FORCE:
474 MOFEM_LOG("EP", Sev::inform) << "Calculate Griffith force";
476 break;
477 default:
478 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
479 "Energy release selector not handled");
480 };
482 std::numeric_limits<double>::epsilon()) {
483 MOFEM_LOG("EP", Sev::inform) << "Calculate faces orientation";
484
487 }
489 }
490
491 // Clear history after rebasing incremental kinematics onto the H1 field.
492 // With no H1 configuration, retain it until the next pre-step copy.
494 CHKERR VecZeroEntries(epPtr->solTSStep);
495
496 PetscBool local_stop = PETSC_FALSE;
497 PetscBool global_stop = PETSC_FALSE;
501 const double area_increase =
503 const bool crack_arrest_stops =
506 if (area_increase > EshelbianCore::maxCrackExtension ||
508 crack_arrest_stops) {
509 MOFEM_LOG_C("EP", Sev::warning,
510 "Stopping crack growth. Area increase: %3.12e, "
511 "average Griffiths energy: %3.12e, critical Griffiths "
512 "energy: %3.12e",
513 area_increase, epPtr->avgGriffithsEnergy,
515 local_stop = PETSC_TRUE;
516 }
517 }
518 MPI_Bcast(&local_stop, 1, MPIU_BOOL, 0, PETSC_COMM_WORLD);
519 global_stop = local_stop;
520
521 if (global_stop) {
522 TSSetConvergedReason(ts, TS_CONVERGED_USER);
525 } else {
528 }
529 break;
530 default:
531 break;
532 }
533
535};
536} // namespace EshelbianPlasticity
bool active
MPI_Comm comm
SmartPetscObj< KSP > ksp
Eshelbian plasticity interface.
boost::shared_ptr< IncrementalOptimizationContext > context
#define MOFEM_LOG_C(channel, severity, format,...)
boost::shared_ptr< DataAtIntegrationPts > data
bool reportedCoordinatePenalty
EshelbianCore * ep
PetscInt & changedCount
Elastic TS pre/post-step registration and H1 transfer lifecycle.
SmartPetscObj< Vec > values
PetscInt size
#define FTENSOR_INDEX(DIM, I)
ElementsAndOps< SPACE_DIM >::DomainEle DomainEle
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, FIELD_DIM > OpDomainMass
@ ROW
#define MAX_DOFS_ON_ENTITY
Maximal number of DOFs on entity.
#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 ...
@ BLOCKSET
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
@ MOFEM_INVALID_DATA
Definition definitions.h:36
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
PetscErrorCode DMMoFEMSetIsPartitioned(DM dm, PetscBool is_partitioned)
Definition DMMoFEM.cpp:1142
PetscErrorCode DMMoFEMCreateSubDM(DM subdm, DM dm, const char problem_name[])
Must be called by user to set Sub DM MoFEM data structures.
Definition DMMoFEM.cpp:244
PetscErrorCode DMMoFEMAddElement(DM dm, std::string fe_name)
add element to dm
Definition DMMoFEM.cpp:517
PetscErrorCode DMMoFEMSetSquareProblem(DM dm, PetscBool square_problem)
set squared problem
Definition DMMoFEM.cpp:479
PetscErrorCode DMMoFEMAddSubFieldRow(DM dm, const char field_name[])
Definition DMMoFEM.cpp:267
PetscErrorCode DMoFEMMeshToLocalVector(DM dm, Vec l, InsertMode mode, ScatterMode scatter_mode, RowColData rc=RowColData::COL)
set local (or ghosted) vector values on mesh for partition only
Definition DMMoFEM.cpp:543
PetscErrorCode DMMoFEMKSPSetComputeRHS(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set KSP right hand side evaluation function
Definition DMMoFEM.cpp:656
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
Definition DMMoFEM.cpp:605
auto createDMVector(DM dm, RowColData rc=RowColData::COL)
Get smart vector from DM.
Definition DMMoFEM.hpp:1250
PetscErrorCode DMMoFEMKSPSetComputeOperators(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
Set KSP operators and push mofem finite element methods.
Definition DMMoFEM.cpp:697
@ GAUSS
Gaussian quadrature integration.
@ PETSC
Standard PETSc assembly.
#define MOFEM_LOG(channel, severity)
Log.
MoFEMErrorCode getCubitMeshsetPtr(const int ms_id, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr) const
get cubit meshset
FTensor::Index< 'i', SPACE_DIM > i
const FTensor::Tensor2< T, Dim, Dim > Vec
VolumeElementForcesAndSourcesCore::UserDataOperator VolUserDataOperator
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
auto createKSP(MPI_Comm comm)
PetscErrorCode DMMoFEMSetDestroyProblem(DM dm, PetscBool destroy_problem)
Definition DMMoFEM.cpp:463
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
PetscErrorCode DMMoFEMClearDMCtx(DM dm)
Clear solver and Schur data owned by a MoFEM DM context.
Definition DMMoFEM.cpp:79
SmartPetscObj< Vec > vectorDuplicate(Vec vec)
Create duplicate vector of smart vector.
PetscObject getPetscObject(T obj)
auto get_temp_meshset_ptr(moab::Interface &moab)
Create smart pointer to temporary meshset.
auto createDM(MPI_Comm comm, const std::string dm_type_name)
Creates smart DM object.
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
constexpr auto field_name
CGG User Polynomial Base.
boost::shared_ptr< Range > frontAdjEdges
MoFEM::Interface & mField
const std::string spatialL2Disp
static enum SolverType solverType
SmartPetscObj< DM > dM
Coupled problem all fields.
const std::string materialH1Positions
static bool noCrackExtension
static PetscBool crackingOn
static double griffithEnergy
Griffith energy.
const std::string elementVolumeName
static enum RotSelector rotSelector
static enum RotSelector gradApproximator
boost::shared_ptr< Range > maxMovedFaces
const std::string spatialH1Disp
static double maxCrackExtension
static double crackingStartTime
MoFEMErrorCode calculateCrackArea(boost::shared_ptr< double > &area_ptr)
MoFEMErrorCode calculateOrientation(const int tag, bool set_orientation)
MoFEMErrorCode setNewFrontCoordinates()
MoFEMErrorCode projectGeometry(const EntityHandle meshset=0, double time=0)
MoFEMErrorCode projectMaterialTags(const EntityHandle meshset=0)
const std::string rotAxis
static int nbStepsNoCrackExtension
boost::shared_ptr< double > currentCrackAreaPtr
double avgGriffithsEnergy
MoFEMErrorCode addCrackSurfaces(const bool debug=false)
MoFEMErrorCode calculateFaceMaterialForce(const int tag, TS ts, SmartPetscObj< Vec > *adjoint_gradient_vector=nullptr)
static bool potentialCrackArrest
static int addCrackMeshsetId
static PetscBool propagateUnderCompression
static enum EnergyReleaseSelector energyReleaseSelector
SmartPetscObj< Vec > solTSStep
SmartPetscObj< DM > dmElastic
Elastic problem.
const std::string stretchTensor
static MoFEMErrorCode setPreStep(EshelbianCore *ep_ptr, TS ts, bool h1_update=false)
static MoFEMErrorCode postStepInitialise(EshelbianCore *ep_ptr)
Add operators pushing bases from local to physical configuration.
virtual moab::Interface & get_moab()=0
virtual MPI_Comm & get_comm() const =0
virtual int get_comm_rank() const =0
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
Section manager is used to create indexes and sections.
Definition ISManager.hpp:23
Interface for managing meshsets containing materials and boundary conditions.
Specialization for MatrixDouble vector field values calculation.
intrusive_ptr for managing petsc objects
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.