106 {
108 MOFEM_LOG(
"EP", Sev::inform) <<
"Pre step";
109
110 double time;
111 CHKERR TSGetTime(ts, &time);
112
114
115 auto debug_crack = [&]() {
117
118 PetscBool debug_crack_mesh = PETSC_FALSE;
120 &debug_crack_mesh, PETSC_NULLPTR);
121 if (debug_crack_mesh) {
122
124 std::string block_name, int dim,
125 std::vector<EntityHandle>
r) {
128
129 std::regex((boost::format("%s(.*)") % block_name).str())
130
131 );
132
133 for (auto bc : bcs) {
134 r.push_back(bc->getMeshset());
135 }
136
138 };
139
141
146 }
147
151 *meshset_ptr, 3, tets);
153
154 std::vector<EntityHandle> meshsets;
155 meshsets.push_back(*meshset_ptr);
156
157 meshsets =
158 get_meshsets_from_block(
epPtr->
mField,
"CRACK", 2, meshsets);
159 meshsets =
160 get_meshsets_from_block(
epPtr->
mField,
"FRONT", 1, meshsets);
161 meshsets =
162 get_meshsets_from_block(
epPtr->
mField,
"EDGE", 1, meshsets);
163
164 int time_step = 0;
165 CHKERR TSGetStepNumber(ts, &time_step);
166 std::string file_name =
167 "crack_meshsets_" + std::to_string(time_step) + ".h5m";
169 nullptr, meshsets.data());
170 }
171 }
172
174 };
175
181 }
182
184 CHKERR TSGetSolution(ts, &T);
185
186 auto zero_filled = [&](auto name) {
190 CHKERR is_mng->isCreateProblemFieldAndRankLocal(
192 const int *index_ptr;
193 CHKERR ISGetIndices(is, &index_ptr);
194 int size;
195 CHKERR ISGetLocalSize(is, &size);
198 for (
auto i = 0;
i != size;
i++) {
200 }
202 CHKERR ISRestoreIndices(is, &index_ptr);
204 };
205
208 break;
210 MOFEM_LOG(
"EP", Sev::verbose) <<
"Zeroing (large) fields";
213 break;
215 MOFEM_LOG(
"EP", Sev::verbose) <<
"Zeroing (moderate) fields";
218 break;
220 MOFEM_LOG(
"EP", Sev::verbose) <<
"Zeroing (small) fields";
223 break;
224 }
225
229
231}
#define MAX_DOFS_ON_ENTITY
Maximal number of DOFs on entity.
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
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
auto get_temp_meshset_ptr(moab::Interface &moab)
Create smart pointer to temporary meshset.
MoFEMErrorCode projectInternalStress(const EntityHandle meshset=0)
MoFEMErrorCode projectGeometry(const EntityHandle meshset=0)
static enum RotSelector gradApproximator
boost::shared_ptr< Range > maxMovedFaces
MoFEMErrorCode setNewFrontCoordinates()
const std::string rotAxis
MoFEMErrorCode addCrackSurfaces(const bool debug=false)
static int addCrackMeshsetId
const std::string stretchTensor
virtual moab::Interface & get_moab()=0
virtual int get_comm_rank() const =0
Deprecated interface functions.
Section manager is used to create indexes and sections.
Interface for managing meshsets containing materials and boundary conditions.
intrusive_ptr for managing petsc objects
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.