152 {
154 MOFEM_LOG(
"EP", Sev::inform) <<
"Pre step";
155
156 double time;
157 CHKERR TSGetTime(ts, &time);
158
160
161 auto debug_crack = [&]() {
163
164 PetscBool debug_crack_mesh = PETSC_FALSE;
166 &debug_crack_mesh, PETSC_NULLPTR);
167 if (debug_crack_mesh) {
168
170 const std::string &block_name,
171 const int dim,
172 std::vector<EntityHandle> &
r) {
176
177 std::regex((boost::format("%s(.*)") % block_name).str())
178
179 );
180
181 for (auto bc : bcs) {
184 bc->getMeshset(), dim, ents, true);
185 if (!ents.empty()) {
186 r.push_back(bc->getMeshset());
187 }
188 }
189
191 };
192
198 }
199
203 *meshset_ptr, 3, tets);
205
206 std::vector<EntityHandle> meshsets;
207 meshsets.push_back(*meshset_ptr);
208
210 meshsets);
212 meshsets);
214 meshsets);
215
216 int time_step = 0;
217 CHKERR TSGetStepNumber(ts, &time_step);
218 std::string file_name =
219 "crack_meshsets_" + std::to_string(time_step) + ".h5m";
221 nullptr, meshsets.data(),
222 static_cast<int>(meshsets.size()));
223 }
224 }
225
227 };
228
233 }
236 }
237
239 CHKERR TSGetSolution(ts, &T);
240
244
246}
MoFEMErrorCode getCubitMeshsetPtr(const int ms_id, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr) const
get cubit meshset
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.
boost::shared_ptr< Range > maxMovedFaces
MoFEMErrorCode setNewFrontCoordinates()
MoFEMErrorCode projectGeometry(const EntityHandle meshset=0, double time=0)
MoFEMErrorCode projectMaterialTags(const EntityHandle meshset=0)
MoFEMErrorCode addCrackSurfaces(const bool debug=false)
static int addCrackMeshsetId
virtual moab::Interface & get_moab()=0
Deprecated interface functions.
Interface for managing meshsets containing materials and boundary conditions.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.