Register per-step checks. Call after TSMonitorSet(ts, TsMonitorSet, ...) so PETSc invokes them after EshelbianMonitor::postProcess.
56 {
59
60
62 "", 14, "external_strain", ts,
63 [&ep,
testing](TS, PetscInt, PetscReal, Vec) {
65 const std::array<double, 3> point{2.5, 0., 0.};
66 auto w_ptr = boost::make_shared<MatrixDouble>();
68 auto data = evaluator->getData<VolumeElementForcesAndSourcesCore>(
69 point.data(), 1);
70 auto fe =
data->feMethodPtr;
71 fe->getRuleHook = [](
int,
int,
int) {
return -1; };
72
73
74 fe->getUserPolynomialBase() =
75 boost::make_shared<CGGUserPolynomialBase>(nullptr, true);
76 CHKERR EshelbianPlasticity::AddHOOps<
80 fe->getOpPtrVector().push_back(new OpCalculateVectorFieldValues<SPACE_DIM>(
87 const bool found = fe->gaussPts.size2() == 1;
88
89
90 double owner_data[2] = {0., 0.};
91 if (found && w_ptr->size1() && w_ptr->size2()) {
92 owner_data[0] = (*w_ptr)(0, 0);
93 owner_data[1] = 1.;
94 }
95 CHKERR MPI_Allreduce(MPI_IN_PLACE, owner_data, 2, MPI_DOUBLE, MPI_SUM,
97 if (owner_data[1] == 0.)
99 "Evaluation point (2.5, 0, 0) not found on any rank");
101 "external strain displacement", owner_data[0] / owner_data[1], 0.25,
102 {1e-5, 0.});
104 });
105
106
107
108
110 "", 20, "cook_reaction", ts,
111 [monitor,
testing](TS, PetscInt, PetscReal
t, Vec) {
113 std::string block;
115 double reaction;
118 "cook clamp reaction", reaction, -(160.0 / 3.0) *
t, {1e-7, 0.});
120 });
121
123}
boost::shared_ptr< DataAtIntegrationPts > data
@ MOFEM_ATOM_TEST_INVALID
auto getProblemPtr(DM dm)
get problem pointer from DM
constexpr double t
plate stiffness
boost::shared_ptr< Range > frontAdjEdges
const std::string spatialL2Disp
const std::string materialH1Positions
SmartPetscObj< DM > dmElastic
Elastic problem.
virtual MPI_Comm & get_comm() const =0
virtual int get_comm_rank() const =0