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
145 }
146
150 *meshset_ptr, 3, tets);
152
153 std::vector<EntityHandle> meshsets;
154 meshsets.push_back(*meshset_ptr);
155
156 meshsets =
157 get_meshsets_from_block(
epPtr->
mField,
"CRACK", 2, meshsets);
158 meshsets =
159 get_meshsets_from_block(
epPtr->
mField,
"FRONT", 1, meshsets);
160 meshsets =
161 get_meshsets_from_block(
epPtr->
mField,
"EDGE", 1, meshsets);
162
163 int time_step = 0;
164 CHKERR TSGetStepNumber(ts, &time_step);
165 std::string file_name =
166 "crack_meshsets_" + std::to_string(time_step) + ".h5m";
168 nullptr, meshsets.data());
169 }
170 }
171
173 };
174
179 }
182 }
183
185 CHKERR TSGetSolution(ts, &T);
186
187 auto zero_filled = [&](auto name) {
191 CHKERR is_mng->isCreateProblemFieldAndRankLocal(
193 const int *index_ptr;
194 CHKERR ISGetIndices(is, &index_ptr);
195 int size;
196 CHKERR ISGetLocalSize(is, &size);
199 for (
auto i = 0;
i != size;
i++) {
201 }
203 CHKERR ISRestoreIndices(is, &index_ptr);
205 };
206
209 break;
211 MOFEM_LOG(
"EP", Sev::verbose) <<
"Zeroing (large) fields";
214 break;
216 MOFEM_LOG(
"EP", Sev::verbose) <<
"Zeroing (moderate) fields";
219 break;
221 MOFEM_LOG(
"EP", Sev::verbose) <<
"Zeroing (small) fields";
224 break;
225 }
226
230
232}
#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.
static enum RotSelector gradApproximator
boost::shared_ptr< Range > maxMovedFaces
MoFEMErrorCode setNewFrontCoordinates()
MoFEMErrorCode projectGeometry(const EntityHandle meshset=0, double time=0)
MoFEMErrorCode projectMaterialTags(const EntityHandle meshset=0)
const std::string rotAxis
MoFEMErrorCode addCrackSurfaces(const bool debug=false)
static int addCrackMeshsetId
const std::string stretchTensor
virtual moab::Interface & get_moab()=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.