v0.14.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PlasticProblem Struct Reference
Collaboration diagram for PlasticProblem:
[legend]

Public Member Functions

 PlasticProblem (MoFEM::Interface &m_field)
 
MoFEMErrorCode runProblem ()
 [Run problem] More...
 

Private Member Functions

MoFEMErrorCode readMesh ()
 [Run problem] More...
 
MoFEMErrorCode setupProblem ()
 [Read mesh] More...
 
MoFEMErrorCode boundaryCondition ()
 [Set up problem] More...
 
MoFEMErrorCode assembleSystem ()
 [Boundary condition] More...
 
MoFEMErrorCode solveSystem ()
 [Solve] More...
 
MoFEMErrorCode gettingNorms ()
 [Solve] More...
 
MoFEMErrorCode outputResults ()
 [Getting norms] More...
 
MoFEMErrorCode checkResults ()
 [Postprocessing results] More...
 

Private Attributes

MoFEM::InterfacemField
 
int approxOrder = 2
 
int geom_order = 2
 
FieldApproximationBase approxBase = AINSWORTH_LEGENDRE_BASE
 
boost::shared_ptr< ClosestPointProjectioncpPtr
 

Detailed Description

Examples
adolc_plasticity.cpp.

Definition at line 127 of file adolc_plasticity.cpp.

Constructor & Destructor Documentation

◆ PlasticProblem()

PlasticProblem::PlasticProblem ( MoFEM::Interface m_field)
inline

Definition at line 129 of file adolc_plasticity.cpp.

129 : mField(m_field) {}

Member Function Documentation

◆ assembleSystem()

MoFEMErrorCode PlasticProblem::assembleSystem ( )
private

[Boundary condition]

[Push operators to pipeline]

Examples
adolc_plasticity.cpp.

Definition at line 442 of file adolc_plasticity.cpp.

442  {
444  auto *simple = mField.getInterface<Simple>();
445  auto *pipeline_mng = mField.getInterface<PipelineManager>();
446 
447  // assemble operator to the right hand side
448  auto add_domain_ops_lhs = [&](auto &pip) {
450  // push forward finite element bases from reference to physical element
452  "GEOMETRY");
453  // create local common data
454  auto common_data_ptr = boost::make_shared<ADOLCPlasticity::CommonData>();
455  // calculate displacement gradients at integration points
457  "U", common_data_ptr->getGardAtGaussPtsPtr()));
458  // assemble tangent operator
459  CHKERR opFactoryDomainLhs<SPACE_DIM, PETSC, GAUSS, DomainEleOp>(
460  mField, "U", pip, "ADOLCMAT", common_data_ptr, cpPtr);
462  };
463 
464  auto add_domain_ops_rhs = [&](auto &pip) {
466  // push forward finite element bases from reference to physical element
468  "GEOMETRY");
469  // create local common data
470  auto common_data_ptr = boost::make_shared<ADOLCPlasticity::CommonData>();
471  // calculate displacement gradients at integration points
473  "U", common_data_ptr->getGardAtGaussPtsPtr()));
474  // assemble residual
475  CHKERR opFactoryDomainRhs<SPACE_DIM, PETSC, GAUSS, DomainEleOp>(
476  mField, "U", pip, "ADOLCMAT", common_data_ptr, cpPtr, Sev::inform);
477 #ifdef ADD_CONTACT
478  CHKERR ContactOps::opFactoryDomainRhs<SPACE_DIM, PETSC, GAUSS, DomainEleOp>(
479  pip, "SIGMA", "U");
480 #endif // ADD_CONTACT
482  };
483 
484  // Push operators to the left hand side pipeline. Indicate that domain (i.e.
485  // volume/interior) element is used.
486  CHKERR add_domain_ops_lhs(pipeline_mng->getOpDomainLhsPipeline());
487  // Push operators to the right hand side pipeline.
488  CHKERR add_domain_ops_rhs(pipeline_mng->getOpDomainRhsPipeline());
489 
491 }

◆ boundaryCondition()

MoFEMErrorCode PlasticProblem::boundaryCondition ( )
private

[Set up problem]

[Boundary condition]

Add body froces

Examples
adolc_plasticity.cpp.

Definition at line 359 of file adolc_plasticity.cpp.

359  {
361  auto *pipeline_mng = mField.getInterface<PipelineManager>();
362  auto simple = mField.getInterface<Simple>();
363  auto bc_mng = mField.getInterface<BcManager>();
364  auto time_scale = boost::make_shared<TimeScale>();
365 
366  auto rule = [](int, int, int p) { return 2 * p; };
367  CHKERR pipeline_mng->setDomainRhsIntegrationRule(cpPtr->integrationRule);
368  CHKERR pipeline_mng->setDomainLhsIntegrationRule(cpPtr->integrationRule);
369  CHKERR pipeline_mng->setBoundaryRhsIntegrationRule(rule);
370  CHKERR pipeline_mng->setBoundaryLhsIntegrationRule(rule);
371 
373  pipeline_mng->getOpBoundaryLhsPipeline(), {HDIV}, "GEOMETRY");
374  pipeline_mng->getOpBoundaryLhsPipeline().push_back(
376 
378  pipeline_mng->getOpBoundaryRhsPipeline(), {HDIV}, "GEOMETRY");
379  pipeline_mng->getOpBoundaryRhsPipeline().push_back(
381 
382  // Add Natural BCs to RHS
384  pipeline_mng->getOpBoundaryRhsPipeline(), mField, "U", {time_scale},
385  Sev::inform);
386  // Add Natural BCs to LHS
388  pipeline_mng->getOpBoundaryLhsPipeline(), mField, "U", Sev::inform);
389 
390 #ifdef ADD_CONTACT
391  CHKERR
392  ContactOps::opFactoryBoundaryLhs<SPACE_DIM, PETSC, GAUSS, BoundaryEleOp>(
393  pipeline_mng->getOpBoundaryLhsPipeline(), "SIGMA", "U");
394  CHKERR
395  ContactOps::opFactoryBoundaryToDomainLhs<SPACE_DIM, PETSC, GAUSS, DomainEle>(
396  mField, pipeline_mng->getOpBoundaryLhsPipeline(),
397  simple->getDomainFEName(), "SIGMA", "U", "GEOMETRY",
398  cpPtr->integrationRule);
399 
400  CHKERR
401  ContactOps::opFactoryBoundaryRhs<SPACE_DIM, PETSC, GAUSS, BoundaryEleOp>(
402  pipeline_mng->getOpBoundaryRhsPipeline(), "SIGMA", "U");
403 #endif // ADD_CONTACT
404 
405  //! Add body froces
407  pipeline_mng->getOpDomainRhsPipeline(), mField, "U", {time_scale},
408  "BODY_FORCE", Sev::inform);
409 
410  // Essential BC
411  CHKERR bc_mng->removeBlockDOFsOnEntities(simple->getProblemName(), "REMOVE_X",
412  "U", 0, 0);
413  CHKERR bc_mng->removeBlockDOFsOnEntities(simple->getProblemName(), "REMOVE_Y",
414  "U", 1, 1);
415  CHKERR bc_mng->removeBlockDOFsOnEntities(simple->getProblemName(), "REMOVE_Z",
416  "U", 2, 2);
417 #ifdef ADD_CONTACT
418  for (auto b : {"FIX_X", "REMOVE_X"})
419  CHKERR bc_mng->removeBlockDOFsOnEntities(simple->getProblemName(), b,
420  "SIGMA", 0, 0, false, true);
421  for (auto b : {"FIX_Y", "REMOVE_Y"})
422  CHKERR bc_mng->removeBlockDOFsOnEntities(simple->getProblemName(), b,
423  "SIGMA", 1, 1, false, true);
424  for (auto b : {"FIX_Z", "REMOVE_Z"})
425  CHKERR bc_mng->removeBlockDOFsOnEntities(simple->getProblemName(), b,
426  "SIGMA", 2, 2, false, true);
427  for (auto b : {"FIX_ALL", "REMOVE_ALL"})
428  CHKERR bc_mng->removeBlockDOFsOnEntities(simple->getProblemName(), b,
429  "SIGMA", 0, 3, false, true);
430  CHKERR bc_mng->removeBlockDOFsOnEntities(
431  simple->getProblemName(), "NO_CONTACT", "SIGMA", 0, 3, false, true);
432 #endif
433 
434  CHKERR bc_mng->pushMarkDOFsOnEntities<DisplacementCubitBcData>(
435  simple->getProblemName(), "U");
436 
438 }

◆ checkResults()

MoFEMErrorCode PlasticProblem::checkResults ( )
private

[Postprocessing results]

[Check]

Examples
adolc_plasticity.cpp.

Definition at line 1178 of file adolc_plasticity.cpp.

1178  {
1180 #ifdef ADD_CONTACT
1182 #endif
1184 }

◆ gettingNorms()

MoFEMErrorCode PlasticProblem::gettingNorms ( )
private

[Solve]

[Getting norms]

Examples
adolc_plasticity.cpp.

Definition at line 1095 of file adolc_plasticity.cpp.

1095  {
1097 
1098  auto simple = mField.getInterface<Simple>();
1099  auto dm = simple->getDM();
1100 
1101  auto T = createDMVector(simple->getDM());
1102  CHKERR DMoFEMMeshToLocalVector(simple->getDM(), T, INSERT_VALUES,
1103  SCATTER_FORWARD);
1104  double nrm2;
1105  CHKERR VecNorm(T, NORM_2, &nrm2);
1106  MOFEM_LOG("PlasticPrb", Sev::inform) << "Solution norm " << nrm2;
1107 
1108  auto post_proc_norm_fe = boost::make_shared<DomainEle>(mField);
1109 
1110  post_proc_norm_fe->getRuleHook = cpPtr->integrationRule;
1111 
1113  post_proc_norm_fe->getOpPtrVector(), {H1});
1114 
1115  enum NORMS { U_NORM_L2 = 0, PIOLA_NORM, LAST_NORM };
1116  auto norms_vec =
1118  (mField.get_comm_rank() == 0) ? LAST_NORM : 0, LAST_NORM);
1119  CHKERR VecZeroEntries(norms_vec);
1120 
1121  auto u_ptr = boost::make_shared<MatrixDouble>();
1122  post_proc_norm_fe->getOpPtrVector().push_back(
1123  new OpCalculateVectorFieldValues<SPACE_DIM>("U", u_ptr));
1124 
1125  post_proc_norm_fe->getOpPtrVector().push_back(
1126  new OpCalcNormL2Tensor1<SPACE_DIM>(u_ptr, norms_vec, U_NORM_L2));
1127 
1128  CHKERR DMoFEMLoopFiniteElements(dm, simple->getDomainFEName(),
1129  post_proc_norm_fe);
1130 
1131  CHKERR VecAssemblyBegin(norms_vec);
1132  CHKERR VecAssemblyEnd(norms_vec);
1133 
1134  MOFEM_LOG_CHANNEL("SELF"); // Clear channel from old tags
1135  if (mField.get_comm_rank() == 0) {
1136  const double *norms;
1137  CHKERR VecGetArrayRead(norms_vec, &norms);
1138  MOFEM_TAG_AND_LOG("SELF", Sev::inform, "example")
1139  << "norm_u: " << std::scientific << std::sqrt(norms[U_NORM_L2]);
1140  CHKERR VecRestoreArrayRead(norms_vec, &norms);
1141  }
1142 
1144 }

◆ outputResults()

MoFEMErrorCode PlasticProblem::outputResults ( )
private

[Getting norms]

[Postprocessing results]

Examples
adolc_plasticity.cpp.

Definition at line 1148 of file adolc_plasticity.cpp.

1148  {
1150  PetscInt test_nb = 0;
1151  PetscBool test_flg = PETSC_FALSE;
1152  CHKERR PetscOptionsGetInt(PETSC_NULL, "", "-test", &test_nb, &test_flg);
1153 
1154  if (test_flg) {
1155  auto simple = mField.getInterface<Simple>();
1156  auto T = createDMVector(simple->getDM());
1157  CHKERR DMoFEMMeshToLocalVector(simple->getDM(), T, INSERT_VALUES,
1158  SCATTER_FORWARD);
1159  double nrm2;
1160  CHKERR VecNorm(T, NORM_2, &nrm2);
1161  MOFEM_LOG("PlasticPrb", Sev::verbose) << "Regression norm " << nrm2;
1162  double regression_value = 0;
1163  switch (test_nb) {
1164  default:
1165  SETERRQ(PETSC_COMM_WORLD, MOFEM_ATOM_TEST_INVALID, "Wrong test number.");
1166  break;
1167  }
1168  if (fabs(nrm2 - regression_value) > 1e-2)
1169  SETERRQ2(PETSC_COMM_WORLD, MOFEM_ATOM_TEST_INVALID,
1170  "Regression test field; wrong norm value. %6.4e != %6.4e", nrm2,
1171  regression_value);
1172  }
1174 }

◆ readMesh()

MoFEMErrorCode PlasticProblem::readMesh ( )
private

[Run problem]

[Read mesh]

Examples
adolc_plasticity.cpp.

Definition at line 173 of file adolc_plasticity.cpp.

173  {
175  auto simple = mField.getInterface<Simple>();
176  CHKERR simple->getOptions();
177  CHKERR simple->loadFile();
178 
179  if (simple->getDim() != SPACE_DIM)
180  SETERRQ2(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
181  "Wrong dimension of mesh %d != %d", simple->getDim(), SPACE_DIM);
182 
184 }

◆ runProblem()

MoFEMErrorCode PlasticProblem::runProblem ( )

[Run problem]

Examples
adolc_plasticity.cpp.

Definition at line 158 of file adolc_plasticity.cpp.

158  {
160  CHKERR readMesh();
169 }

◆ setupProblem()

MoFEMErrorCode PlasticProblem::setupProblem ( )
private

[Read mesh]

[Set up problem]

[Material models selection]

FIXME: Here only array of material models is initalized. Each model has unique set of the ADOL-C tags. Pointer is attached based on block name to which entity belongs. That will enable heterogeneity of the model, in addition of heterogeneity of the material properties.

[Material models selection]

Examples
adolc_plasticity.cpp.

Definition at line 188 of file adolc_plasticity.cpp.

188  {
191 
192  enum bases { AINSWORTH, DEMKOWICZ, LASBASETOPT };
193  const char *list_bases[LASBASETOPT] = {"ainsworth", "demkowicz"};
194  PetscInt choice_base_value = AINSWORTH;
195  CHKERR PetscOptionsGetEList(PETSC_NULL, NULL, "-base", list_bases,
196  LASBASETOPT, &choice_base_value, PETSC_NULL);
197  CHKERR PetscOptionsGetInt(PETSC_NULL, "", "-order", &approxOrder, PETSC_NULL);
198  CHKERR PetscOptionsGetInt(PETSC_NULL, "", "-geom_order", &geom_order,
199  PETSC_NULL);
200 
201  switch (choice_base_value) {
202  case AINSWORTH:
204  MOFEM_LOG("WORLD", Sev::inform)
205  << "Set AINSWORTH_LEGENDRE_BASE for displacements";
206  break;
207  case DEMKOWICZ:
209  MOFEM_LOG("WORLD", Sev::inform)
210  << "Set DEMKOWICZ_JACOBI_BASE for displacements";
211  break;
212  default:
214  break;
215  }
216 
217  // Add field
218  CHKERR simple->addDomainField("U", H1, approxBase, SPACE_DIM);
219  CHKERR simple->addBoundaryField("U", H1, approxBase, SPACE_DIM);
220  CHKERR simple->addDataField("GEOMETRY", H1, approxBase, SPACE_DIM);
221 
222 #ifdef ADD_CONTACT
223  CHKERR simple->addDomainField("SIGMA", CONTACT_SPACE, DEMKOWICZ_JACOBI_BASE,
224  SPACE_DIM);
225  CHKERR simple->addBoundaryField("SIGMA", CONTACT_SPACE, DEMKOWICZ_JACOBI_BASE,
226  SPACE_DIM);
227  auto get_skin = [&]() {
228  Range body_ents;
229  CHKERR mField.get_moab().get_entities_by_dimension(0, SPACE_DIM, body_ents);
230  Skinner skin(&mField.get_moab());
231  Range skin_ents;
232  CHKERR skin.find_skin(0, body_ents, false, skin_ents);
233  return skin_ents;
234  };
235 
236  auto filter_blocks = [&](auto skin) {
237  bool is_contact_block = false;
238  Range contact_range;
239  for (auto m :
241 
242  (boost::format("%s(.*)") % "CONTACT").str()
243 
244  ))
245 
246  ) {
247  is_contact_block =
248  true; ///< bloks interation is collectibe, so that is set irrespective
249  ///< if there are enerities in given rank or not in the block
250  MOFEM_LOG("CONTACT", Sev::inform)
251  << "Find contact block set: " << m->getName();
252  auto meshset = m->getMeshset();
253  Range contact_meshset_range;
254  CHKERR mField.get_moab().get_entities_by_dimension(
255  meshset, SPACE_DIM - 1, contact_meshset_range, true);
256 
257  CHKERR mField.getInterface<CommInterface>()->synchroniseEntities(
258  contact_meshset_range);
259  contact_range.merge(contact_meshset_range);
260  }
261  if (is_contact_block) {
262  MOFEM_LOG("SYNC", Sev::inform)
263  << "Nb entities in contact surface: " << contact_range.size();
265  skin = intersect(skin, contact_range);
266  }
267  return skin;
268  };
269 
270  auto filter_true_skin = [&](auto skin) {
271  Range boundary_ents;
272  ParallelComm *pcomm =
273  ParallelComm::get_pcomm(&mField.get_moab(), MYPCOMM_INDEX);
274  CHKERR pcomm->filter_pstatus(skin, PSTATUS_SHARED | PSTATUS_MULTISHARED,
275  PSTATUS_NOT, -1, &boundary_ents);
276  return boundary_ents;
277  };
278 
279  auto boundary_ents = filter_true_skin(filter_blocks(get_skin()));
280 #ifdef ADD_CONTACT
281  CHKERR simple->setFieldOrder("SIGMA", 0);
282  CHKERR simple->setFieldOrder("SIGMA", approxOrder - 1, &boundary_ents);
283  CHKERR PetscOptionsGetScalar(PETSC_NULL, "", "-cn_contact",
284  &ContactOps::cn_contact, PETSC_NULL);
285  MOFEM_LOG("CONTACT", Sev::inform) << "cn_contact " << ContactOps::cn_contact;
286 
287 #endif
288 
289 #ifdef PYTHON_SDF
290  sdfPythonPtr = boost::make_shared<ContactOps::SDFPython>();
291  CHKERR sdfPythonPtr->sdfInit("sdf.py");
292  ContactOps::sdfPythonWeakPtr = sdfPythonPtr;
293 #endif
294 #endif
295 
296  CHKERR simple->setFieldOrder("U", approxOrder);
297  CHKERR simple->setFieldOrder("GEOMETRY", geom_order);
298  CHKERR simple->setUp();
299 
300  auto project_ho_geometry = [&]() {
301  Projection10NodeCoordsOnField ent_method(mField, "GEOMETRY");
302  return mField.loop_dofs("GEOMETRY", ent_method);
303  };
304  PetscBool project_geometry = PETSC_TRUE;
305  CHKERR PetscOptionsGetBool(PETSC_NULL, "", "-project_geometry",
306  &project_geometry, PETSC_NULL);
307  if (project_geometry) {
308  CHKERR project_ho_geometry();
309  }
310 
311  //! [Material models selection]
312 
313  /**
314  * FIXME: Here only array of material models is initalized. Each model has
315  * unique set of the ADOL-C tags. Pointer is attached based on block name to
316  * which entity belongs. That will enable heterogeneity of the model, in
317  * addition of heterogeneity of the material properties.
318  */
319 
320  enum MaterialModel {
321  VonMisses,
322  VonMissesPlaneStress,
323  Paraboloidal,
324  LastModel
325  };
326  const char *list_materials[LastModel] = {"VonMisses", "VonMissesPlaneStress",
327  "Paraboloidal"};
328  PetscInt choice_material = VonMisses;
329  CHKERR PetscOptionsGetEList(PETSC_NULL, NULL, "-material", list_materials,
330  LastModel, &choice_material, PETSC_NULL);
331 
332  switch (choice_material) {
333  case VonMisses:
334  cpPtr = createMaterial<J2Plasticity<3>>();
335  break;
336  case VonMissesPlaneStress:
337  if (SPACE_DIM != 2)
338  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
339  "VonMissesPlaneStrain is only for 2D case");
340  cpPtr = createMaterial<J2Plasticity<2>>();
341  break;
342  case Paraboloidal:
343  cpPtr = createMaterial<ParaboloidalPlasticity>();
344  break;
345  default:
346  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY, "Wrong material model");
347  }
348 
350  cpPtr->integrationRule = [](int, int, int p) { return 2 * (p - 2); };
351 
352  //! [Material models selection]
353 
355 }

◆ solveSystem()

MoFEMErrorCode PlasticProblem::solveSystem ( )
private

[Solve]

[DG projection]

[DG projection]

[Set up post-step]

[TS post-step function]

[TS post-step function]

[Set up post-step]

[Create TS]

[Create TS]

Examples
adolc_plasticity.cpp.

Definition at line 693 of file adolc_plasticity.cpp.

693  {
695  auto *simple = mField.getInterface<Simple>();
696  auto *pipeline_mng = mField.getInterface<PipelineManager>();
697 
698  auto dm = simple->getDM();
699  auto time_scale = boost::make_shared<TimeScale>();
700  auto snes_ctx_ptr = getDMSnesCtx(simple->getDM());
701 
702  // Setup postprocessing
703  auto create_post_proc_fe = [dm, this, simple]() {
704  //! [DG projection]
705  // Post-process domain, i.e. volume elements. If 3d case creates stresses
706  // are evaluated at points which are trace of the volume element on boundary
707  auto post_proc_ele_domain = [this](auto &pip_domain, auto &fe_name) {
708  // Push bases on reference element to the phyiscal element
710  pip_domain, {H1, HDIV}, "GEOMETRY");
711 
712  // calculate displacement gradients at nodes of post processing mesh. For
713  // gradient DG projection is obsolete, since displacements can be
714  // evaluated at arbitrary points.
715  auto grad_ptr = boost::make_shared<MatrixDouble>();
716  pip_domain.push_back(
718  grad_ptr));
719 
720  // Create operator to run (neted) pipeline in operator. InteriorElem
721  // element will have iteration rule and bases as domain element used to
722  // solve problem, and remember history variables.
723  using InteriorElem = DomainEle;
724  auto op_this = new OpLoopThis<InteriorElem>(mField, fe_name, Sev::noisy);
725  // add interior element to post-processing pipeline
726  pip_domain.push_back(op_this);
727 
728  // get pointer to interior element, which is in essence pipeline which
729  // pipeline.
730  auto fe_physics = op_this->getThisFEPtr();
731 
732  auto evaluate_stress_on_physical_element = [&]() {
733  // evaluate stress and plastic strain at Gauss points
734  fe_physics->getRuleHook = cpPtr->integrationRule;
736  fe_physics->getOpPtrVector(), {H1});
737  auto common_data_ptr =
738  boost::make_shared<ADOLCPlasticity::CommonData>();
739  // note that gradient of displacements is evaluate again, at
740  // physical nodes
741  fe_physics->getOpPtrVector().push_back(
743  "U", common_data_ptr->getGardAtGaussPtsPtr()));
744 
745  CHKERR cpPtr->addMatBlockOps(mField, fe_physics->getOpPtrVector(),
746  "ADOLCMAT", Sev::noisy);
747  fe_physics->getOpPtrVector().push_back(
748  getRawPtrOpCalculateStress<SPACE_DIM>(mField, common_data_ptr,
749  cpPtr, false));
750  return common_data_ptr;
751  };
752 
753  auto dg_projection_froward_and_back = [&](auto &common_data_ptr) {
754  // here we do actual projection of stress and plastic strain to DG space
755  int dg_order = approxOrder - 1;
756  auto entity_data_l2 =
757  boost::make_shared<EntitiesFieldData>(MBENTITYSET);
758  auto mass_ptr =
759  boost::make_shared<MatrixDouble>(); //< projection operator (mass
760  // matrix)
761  fe_physics->getOpPtrVector().push_back(new OpDGProjectionMassMatrix(
762  dg_order, mass_ptr, entity_data_l2, approxBase, L2));
763 
764  auto coeffs_ptr_stress = boost::make_shared<MatrixDouble>();
765  // project stress on DG space on physical element
766  fe_physics->getOpPtrVector().push_back(new OpDGProjectionCoefficients(
767  common_data_ptr->getStressMatrixPtr(), coeffs_ptr_stress, mass_ptr,
768  entity_data_l2, approxBase, L2));
769  // project strains plastic strains DG space on physical element
770  auto coeffs_ptr_plastic_strain = boost::make_shared<MatrixDouble>();
771  fe_physics->getOpPtrVector().push_back(new OpDGProjectionCoefficients(
772  common_data_ptr->getPlasticStrainMatrixPtr(),
773  coeffs_ptr_plastic_strain, mass_ptr, entity_data_l2, approxBase,
774  L2));
775 
776  // project stress and plastic strain for DG space on post-process
777  // element
778  pip_domain.push_back(new OpDGProjectionEvaluation(
779  common_data_ptr->getStressMatrixPtr(), coeffs_ptr_stress,
780  entity_data_l2, approxBase, L2));
781  pip_domain.push_back(new OpDGProjectionEvaluation(
782  common_data_ptr->getPlasticStrainMatrixPtr(),
783  coeffs_ptr_plastic_strain, entity_data_l2, approxBase, L2));
784  };
785 
786  auto common_data_ptr = evaluate_stress_on_physical_element();
787  dg_projection_froward_and_back(common_data_ptr);
788 
789  return boost::make_tuple(grad_ptr, common_data_ptr->getStressMatrixPtr(),
790  common_data_ptr->getPlasticStrainMatrixPtr());
791  };
792  //! [DG projection]
793 
794  // Create tags on post-processing mesh, i.e. those tags are visible in
795  // Preview
796  auto add_post_proc_map = [&](auto post_proc_fe, auto u_ptr, auto grad_ptr,
797  auto stress_ptr, auto plastic_strain_ptr,
798  auto contact_stress_ptr, auto X_ptr) {
799  using OpPPMapSPACE_DIM = OpPostProcMapInMoab<SPACE_DIM, SPACE_DIM>;
800  post_proc_fe->getOpPtrVector().push_back(
801 
802  new OpPPMapSPACE_DIM(
803 
804  post_proc_fe->getPostProcMesh(), post_proc_fe->getMapGaussPts(),
805 
806  {},
807 
808  {{"U", u_ptr}, {"GEOMETRY", X_ptr}},
809 
810  {{"GRAD", grad_ptr}, {"SIGMA", contact_stress_ptr}},
811 
812  {}
813 
814  )
815 
816  );
817 
818  using OpPPMap3D = OpPostProcMapInMoab<3, 3>;
819  post_proc_fe->getOpPtrVector().push_back(
820 
821  new OpPPMap3D(
822 
823  post_proc_fe->getPostProcMesh(), post_proc_fe->getMapGaussPts(),
824 
825  {},
826 
827  {},
828 
829  {},
830 
831  {{"STRESS", stress_ptr}, {"PLASTIC_STRAIN", plastic_strain_ptr}}
832 
833  )
834 
835  );
836 
837  return post_proc_fe;
838  };
839 
840  auto vol_post_proc = [this, simple, post_proc_ele_domain,
841  add_post_proc_map]() {
842  PetscBool post_proc_vol = PETSC_FALSE;
843  if (SPACE_DIM == 2)
844  post_proc_vol = PETSC_TRUE;
845 
846  CHKERR PetscOptionsGetBool(PETSC_NULL, "", "-post_proc_vol",
847  &post_proc_vol, PETSC_NULL);
848  if (post_proc_vol == PETSC_FALSE)
849  return boost::shared_ptr<PostProcEleDomain>();
850  auto post_proc_fe = boost::make_shared<PostProcEleDomain>(mField);
851  auto u_ptr = boost::make_shared<MatrixDouble>();
852  post_proc_fe->getOpPtrVector().push_back(
854  auto X_ptr = boost::make_shared<MatrixDouble>();
855  post_proc_fe->getOpPtrVector().push_back(
856  new OpCalculateVectorFieldValues<SPACE_DIM>("GEOMETRY", X_ptr));
857  auto contact_stress_ptr = boost::make_shared<MatrixDouble>();
858 #ifdef ADD_CONTACT
859  post_proc_fe->getOpPtrVector().push_back(
861  "SIGMA", contact_stress_ptr));
862 #else
863  contact_stress_ptr = nullptr;
864 #endif
865  auto [grad_ptr, stress_ptr, plastic_strain_ptr] = post_proc_ele_domain(
866  post_proc_fe->getOpPtrVector(), simple->getDomainFEName());
867 
868  return add_post_proc_map(post_proc_fe, u_ptr, grad_ptr, stress_ptr,
869  plastic_strain_ptr, contact_stress_ptr, X_ptr);
870  };
871 
872  auto skin_post_proc = [this, simple, post_proc_ele_domain,
873  add_post_proc_map]() {
874  // create skin of the volume mesh for post-processing,
875  // i.e. boundary of the volume mesh
876  PetscBool post_proc_skin = PETSC_TRUE;
877  if (SPACE_DIM == 2)
878  post_proc_skin = PETSC_FALSE;
879 
880  CHKERR PetscOptionsGetBool(PETSC_NULL, "", "-post_proc_skin",
881  &post_proc_skin, PETSC_NULL);
882 
883  if (post_proc_skin == PETSC_FALSE)
884  return boost::shared_ptr<PostProcEleBdy>();
885 
886  auto post_proc_fe = boost::make_shared<PostProcEleBdy>(mField);
887  auto u_ptr = boost::make_shared<MatrixDouble>();
888  post_proc_fe->getOpPtrVector().push_back(
890  auto X_ptr = boost::make_shared<MatrixDouble>();
891  post_proc_fe->getOpPtrVector().push_back(
892  new OpCalculateVectorFieldValues<SPACE_DIM>("GEOMETRY", X_ptr));
893  auto contact_stress_ptr = boost::make_shared<MatrixDouble>();
894  auto op_loop_side =
895  new OpLoopSide<SideEle>(mField, simple->getDomainFEName(), SPACE_DIM);
896  auto [grad_ptr, stress_ptr, plastic_strain_ptr] = post_proc_ele_domain(
897  op_loop_side->getOpPtrVector(), simple->getDomainFEName());
898 #ifdef ADD_CONTACT
899  op_loop_side->getOpPtrVector().push_back(
901  "SIGMA", contact_stress_ptr));
902 #else
903  contact_stress_ptr = nullptr;
904 #endif
905  post_proc_fe->getOpPtrVector().push_back(op_loop_side);
906 
907  return add_post_proc_map(post_proc_fe, u_ptr, grad_ptr, stress_ptr,
908  plastic_strain_ptr, contact_stress_ptr, X_ptr);
909  };
910 
911  return std::make_pair(vol_post_proc(), skin_post_proc());
912  };
913 
914  auto create_reaction_fe = [&]() {
915  auto fe_ptr = boost::make_shared<DomainEle>(mField);
916  fe_ptr->getRuleHook = cpPtr->integrationRule;
917 
918  auto &pip = fe_ptr->getOpPtrVector();
920  auto common_data_ptr = boost::make_shared<ADOLCPlasticity::CommonData>();
922  "U", common_data_ptr->getGardAtGaussPtsPtr()));
923  CHKERR opFactoryDomainRhs<SPACE_DIM, PETSC, GAUSS, DomainEleOp>(
924  mField, "U", pip, "ADOLCMAT", common_data_ptr, cpPtr, Sev::noisy);
925 
926  return fe_ptr;
927  };
928 
929  auto add_extra_finite_elements_to_ksp_solver_pipelines = [&]() {
931 
932  auto pre_proc_ptr = boost::make_shared<FEMethod>();
933  auto post_proc_rhs_ptr = boost::make_shared<FEMethod>();
934  auto post_proc_lhs_ptr = boost::make_shared<FEMethod>();
935 
936  auto get_bc_hook_rhs = [this, pre_proc_ptr, time_scale]() {
939  {time_scale}, false)();
941  };
942 
943  pre_proc_ptr->preProcessHook = get_bc_hook_rhs;
944 
945  auto get_post_proc_hook_rhs = [this, post_proc_rhs_ptr]() {
948  mField, post_proc_rhs_ptr, nullptr, Sev::verbose)();
950  mField, post_proc_rhs_ptr, 1.)();
952  };
953  auto get_post_proc_hook_lhs = [this, post_proc_lhs_ptr]() {
956  mField, post_proc_lhs_ptr, 1.)();
958  };
959  post_proc_rhs_ptr->postProcessHook = get_post_proc_hook_rhs;
960  post_proc_lhs_ptr->postProcessHook = get_post_proc_hook_lhs;
961 
962  // This is low level pushing finite elements (pipelines) to solver
963  auto ts_ctx_ptr = getDMTsCtx(simple->getDM());
964  ts_ctx_ptr->getPreProcessIFunction().push_front(pre_proc_ptr);
965  ts_ctx_ptr->getPreProcessIJacobian().push_front(pre_proc_ptr);
966  ts_ctx_ptr->getPostProcessIFunction().push_back(post_proc_rhs_ptr);
967  ts_ctx_ptr->getPostProcessIJacobian().push_back(post_proc_lhs_ptr);
969  };
970 
971  // Add extra finite elements to SNES solver pipelines to resolve essential
972  // boundary conditions
973  CHKERR add_extra_finite_elements_to_ksp_solver_pipelines();
974 
975  auto create_monitor_fe = [dm, time_scale](auto &&post_proc_fe,
976  auto &&reaction_fe) {
977  return boost::make_shared<Monitor>(
978  dm, post_proc_fe, reaction_fe,
979  std::vector<boost::shared_ptr<ScalingMethod>>{time_scale});
980  };
981 
982  //! [Set up post-step]
983  auto set_up_post_step = [&](auto ts) {
985 
986  // create finite element (pipeline) and populate it with operators to
987  // update history variables
988  auto create_update_ptr = [&]() {
989  auto fe_ptr = boost::make_shared<DomainEle>(mField);
990  fe_ptr->getRuleHook = cpPtr->integrationRule;
991  AddHOOps<SPACE_DIM, SPACE_DIM, SPACE_DIM>::add(fe_ptr->getOpPtrVector(),
992  {H1});
993  auto common_data_ptr = boost::make_shared<ADOLCPlasticity::CommonData>();
994  fe_ptr->getOpPtrVector().push_back(
996  "U", common_data_ptr->getGardAtGaussPtsPtr()));
998  opFactoryDomainUpdate<SPACE_DIM>(mField, fe_ptr->getOpPtrVector(),
999  "ADOLCMAT", common_data_ptr, cpPtr),
1000  "push update ops");
1001  return fe_ptr;
1002  };
1003 
1004  // ts_update_ptr is global static variable
1005  ts_update_ptr =
1006  createTSUpdate(simple->getDomainFEName(), create_update_ptr());
1007 
1008  //! [TS post-step function]
1009  // This is pure "C" function which we can to the TS solver
1010  auto ts_step_post_proc = [](TS ts) {
1012  if (ts_update_ptr)
1013  CHKERR ts_update_ptr->postProcess(ts);
1015  };
1016  //! [TS post-step function]
1017 
1018  // finally set up post-step
1019  CHKERR TSSetPostStep(ts, ts_step_post_proc);
1021  };
1022  //! [Set up post-step]
1023 
1024  // Set monitor which postprocessing results and saves them to the hard drive
1025  auto set_up_monitor = [&](auto ts) {
1027  boost::shared_ptr<FEMethod> null_fe;
1028  auto monitor_ptr =
1029  create_monitor_fe(create_post_proc_fe(), create_reaction_fe());
1030  CHKERR DMMoFEMTSSetMonitor(dm, ts, simple->getDomainFEName(), null_fe,
1031  null_fe, monitor_ptr);
1033  };
1034 
1035  auto set_section_monitor = [&](auto solver) {
1037  SNES snes;
1038  CHKERR TSGetSNES(solver, &snes);
1039  CHKERR SNESMonitorSet(snes,
1040  (MoFEMErrorCode(*)(SNES, PetscInt, PetscReal,
1041  void *))MoFEMSNESMonitorFields,
1042  (void *)(snes_ctx_ptr.get()), nullptr);
1044  };
1045 
1046  auto set_up_adapt = [&](auto ts) {
1048  CHKERR TSAdaptRegister(TSADAPTMOFEM, TSAdaptCreateMoFEM);
1049  TSAdapt adapt;
1050  CHKERR TSGetAdapt(ts, &adapt);
1052  };
1053 
1054  //! [Create TS]
1055  auto ts = pipeline_mng->createTSIM();
1056 
1057  // Set time solver
1058  double ftime = 1;
1059  CHKERR TSSetMaxTime(ts, ftime);
1060  CHKERR TSSetExactFinalTime(ts, TS_EXACTFINALTIME_MATCHSTEP);
1061  auto D = createDMVector(simple->getDM());
1062 #ifdef ADD_CONTACT
1064 #endif
1065  CHKERR TSSetSolution(ts, D);
1066  CHKERR set_section_monitor(ts);
1067 
1068  // Set monitor, step adaptivity, and post-step to update history variables
1069  CHKERR set_up_monitor(ts);
1070  CHKERR set_up_post_step(ts);
1071  CHKERR set_up_adapt(ts);
1072  CHKERR TSSetFromOptions(ts);
1073 
1074  CHKERR TSSolve(ts, NULL);
1075  //! [Create TS]
1076 
1077  CHKERR TSGetTime(ts, &ftime);
1078 
1079  PetscInt steps, snesfails, rejects, nonlinits, linits;
1080  CHKERR TSGetStepNumber(ts, &steps);
1081  CHKERR TSGetSNESFailures(ts, &snesfails);
1082  CHKERR TSGetStepRejections(ts, &rejects);
1083  CHKERR TSGetSNESIterations(ts, &nonlinits);
1084  CHKERR TSGetKSPIterations(ts, &linits);
1085  MOFEM_LOG_C("PlasticPrb", Sev::inform,
1086  "steps %d (%d rejected, %d SNES fails), ftime %g, nonlinits "
1087  "%d, linits %d",
1088  steps, rejects, snesfails, ftime, nonlinits, linits);
1089 
1091 }

Member Data Documentation

◆ approxBase

FieldApproximationBase PlasticProblem::approxBase = AINSWORTH_LEGENDRE_BASE
private

Definition at line 147 of file adolc_plasticity.cpp.

◆ approxOrder

int PlasticProblem::approxOrder = 2
private

Definition at line 145 of file adolc_plasticity.cpp.

◆ cpPtr

boost::shared_ptr<ClosestPointProjection> PlasticProblem::cpPtr
private

Closest point projection

Examples
adolc_plasticity.cpp.

Definition at line 148 of file adolc_plasticity.cpp.

◆ geom_order

int PlasticProblem::geom_order = 2
private

Definition at line 146 of file adolc_plasticity.cpp.

◆ mField

MoFEM::Interface& PlasticProblem::mField
private
Examples
adolc_plasticity.cpp.

Definition at line 134 of file adolc_plasticity.cpp.


The documentation for this struct was generated from the following file:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Definition: UnknownInterface.hpp:93
SPACE_DIM
constexpr int SPACE_DIM
Definition: adolc_plasticity.cpp:14
MYPCOMM_INDEX
#define MYPCOMM_INDEX
default communicator number PCOMM
Definition: definitions.h:228
MoFEM::CoreInterface::loop_dofs
virtual MoFEMErrorCode loop_dofs(const Problem *problem_ptr, const std::string &field_name, RowColData rc, DofMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
Make a loop over dofs.
PlasticProblem::solveSystem
MoFEMErrorCode solveSystem()
[Solve]
Definition: adolc_plasticity.cpp:693
MoFEM::EssentialPreProcReaction< DisplacementCubitBcData >
Specialization for DisplacementCubitBcData.
Definition: EssentialDisplacementCubitBcData.hpp:157
H1
@ H1
continuous field
Definition: definitions.h:85
LASTBASE
@ LASTBASE
Definition: definitions.h:69
MoFEM::OpLoopThis
Execute "this" element in the operator.
Definition: DGProjection.hpp:68
MOFEM_LOG_CHANNEL
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
Definition: LogManager.hpp:284
ADOLCPlasticity::createTSUpdate
boost::shared_ptr< TSUpdate > createTSUpdate(std::string fe_name, boost::shared_ptr< FEMethod > fe_ptr)
MoFEM::EssentialPostProcLhs< DisplacementCubitBcData >
Specialization for DisplacementCubitBcData.
Definition: EssentialDisplacementCubitBcData.hpp:134
MoFEM::CoreInterface::get_comm
virtual MPI_Comm & get_comm() const =0
CHK_THROW_MESSAGE
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
Definition: definitions.h:609
L2
@ L2
field with C-1 continuity
Definition: definitions.h:88
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::OpCalculateVectorFieldValues
Get values at integration pts for tensor filed rank 1, i.e. vector field.
Definition: UserDataOperators.hpp:466
MoFEM::CoreInterface::get_comm_rank
virtual int get_comm_rank() const =0
ts_update_ptr
static boost::shared_ptr< TSUpdate > ts_update_ptr
Definition: adolc_plasticity.cpp:690
MoFEM::EssentialPostProcRhs< DisplacementCubitBcData >
Specialization for DisplacementCubitBcData.
Definition: EssentialDisplacementCubitBcData.hpp:113
MoFEM::PipelineManager
PipelineManager interface.
Definition: PipelineManager.hpp:24
PlasticProblem::geom_order
int geom_order
Definition: adolc_plasticity.cpp:146
MoFEM::OpDGProjectionCoefficients
Definition: DGProjection.hpp:119
MoFEM::DMoFEMMeshToLocalVector
PetscErrorCode DMoFEMMeshToLocalVector(DM dm, Vec l, InsertMode mode, ScatterMode scatter_mode)
set local (or ghosted) vector values on mesh for partition only
Definition: DMMoFEM.cpp:523
MoFEM::DisplacementCubitBcData
Definition of the displacement bc data structure.
Definition: BCData.hpp:76
MoFEM::Projection10NodeCoordsOnField
Projection of edge entities with one mid-node on hierarchical basis.
Definition: Projection10NodeCoordsOnField.hpp:24
MoFEM::Simple
Simple interface for fast problem set-up.
Definition: Simple.hpp:27
CONTACT_SPACE
constexpr FieldSpace CONTACT_SPACE
Definition: adolc_plasticity.cpp:100
PlasticProblem::outputResults
MoFEMErrorCode outputResults()
[Getting norms]
Definition: adolc_plasticity.cpp:1148
PlasticProblem::gettingNorms
MoFEMErrorCode gettingNorms()
[Solve]
Definition: adolc_plasticity.cpp:1095
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::createDMVector
auto createDMVector(DM dm)
Get smart vector from DM.
Definition: DMMoFEM.hpp:1099
MoFEM::EssentialPreProc< DisplacementCubitBcData >
Specialization for DisplacementCubitBcData.
Definition: EssentialDisplacementCubitBcData.hpp:91
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MoFEM::BcManager
Simple interface for fast problem set-up.
Definition: BcManager.hpp:25
ContactOps::CommonData::totalTraction
static SmartPetscObj< Vec > totalTraction
Definition: ContactOps.hpp:29
PlasticProblem::approxOrder
int approxOrder
Definition: adolc_plasticity.cpp:145
MOFEM_LOG_C
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:311
PlasticProblem::setupProblem
MoFEMErrorCode setupProblem()
[Read mesh]
Definition: adolc_plasticity.cpp:188
simple
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
MOFEM_LOG_SYNCHRONISE
#define MOFEM_LOG_SYNCHRONISE(comm)
Synchronise "SYNC" channel.
Definition: LogManager.hpp:345
MoFEM::OpCalculateHVecTensorField
Calculate tenor field using vectorial base, i.e. Hdiv/Hcurl.
Definition: UserDataOperators.hpp:2572
MoFEM::AddFluxToLhsPipelineImpl
Definition: Natural.hpp:49
MoFEM::OpCalcNormL2Tensor1
Get norm of input MatrixDouble for Tensor1.
Definition: NormsOperators.hpp:44
TSADAPTMOFEM
#define TSADAPTMOFEM
Definition: TsCtx.hpp:10
MoFEM::AddFluxToRhsPipelineImpl
Definition: Natural.hpp:46
PlasticProblem::readMesh
MoFEMErrorCode readMesh()
[Run problem]
Definition: adolc_plasticity.cpp:173
PlasticProblem::approxBase
FieldApproximationBase approxBase
Definition: adolc_plasticity.cpp:147
MoFEM::OpSetHOWeightsOnSubDim
Definition: HODataOperators.hpp:145
PlasticProblem::boundaryCondition
MoFEMErrorCode boundaryCondition()
[Set up problem]
Definition: adolc_plasticity.cpp:359
PlasticProblem::assembleSystem
MoFEMErrorCode assembleSystem()
[Boundary condition]
Definition: adolc_plasticity.cpp:442
MoFEM::AddHOOps
Add operators pushing bases from local to physical configuration.
Definition: HODataOperators.hpp:413
MoFEM::OpCalculateVectorFieldGradient
Get field gradients at integration pts for scalar filed rank 0, i.e. vector field.
Definition: UserDataOperators.hpp:1535
ContactOps::CommonData::createTotalTraction
static auto createTotalTraction(MoFEM::Interface &m_field)
Definition: ContactOps.hpp:31
ContactOps::cn_contact
double cn_contact
Definition: contact.cpp:100
PlasticProblem::checkResults
MoFEMErrorCode checkResults()
[Postprocessing results]
Definition: adolc_plasticity.cpp:1178
DomainEle
PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::DomainEle DomainEle
Definition: adolc_plasticity.cpp:22
Range
MOFEM_TAG_AND_LOG
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
Definition: LogManager.hpp:362
MOFEM_LOG
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:308
DEMKOWICZ_JACOBI_BASE
@ DEMKOWICZ_JACOBI_BASE
Definition: definitions.h:66
MoFEM::CommInterface
Managing BitRefLevels.
Definition: CommInterface.hpp:21
MoFEM::OpDGProjectionEvaluation
Definition: DGProjection.hpp:136
MoFEM::DMMoFEMTSSetMonitor
PetscErrorCode DMMoFEMTSSetMonitor(DM dm, TS ts, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
Set Monitor To TS solver.
Definition: DMMoFEM.cpp:1056
AINSWORTH_LEGENDRE_BASE
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:60
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
MoFEM::MeshsetsManager
Interface for managing meshsets containing materials and boundary conditions.
Definition: MeshsetsManager.hpp:104
MoFEM::PetscOptionsGetEList
PetscErrorCode PetscOptionsGetEList(PetscOptions *, const char pre[], const char name[], const char *const *list, PetscInt next, PetscInt *value, PetscBool *set)
Definition: DeprecatedPetsc.hpp:203
MoFEM::createVectorMPI
auto createVectorMPI(MPI_Comm comm, PetscInt n, PetscInt N)
Create MPI Vector.
Definition: PetscSmartObj.hpp:202
MoFEM::MoFEMSNESMonitorFields
MoFEMErrorCode MoFEMSNESMonitorFields(SNES snes, PetscInt its, PetscReal fgnorm, SnesCtx *snes_ctx)
Sens monitor printing residual field by field.
Definition: SnesCtx.cpp:232
PlasticProblem::cpPtr
boost::shared_ptr< ClosestPointProjection > cpPtr
Definition: adolc_plasticity.cpp:148
ReactionDiffusionEquation::D
const double D
diffusivity
Definition: reaction_diffusion.cpp:20
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
MOFEM_ATOM_TEST_INVALID
@ MOFEM_ATOM_TEST_INVALID
Definition: definitions.h:40
MoFEM::getDMSnesCtx
auto getDMSnesCtx(DM dm)
Get SNES context data structure used by DM.
Definition: DMMoFEM.hpp:1127
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
MoFEM::PetscOptionsGetScalar
PetscErrorCode PetscOptionsGetScalar(PetscOptions *, const char pre[], const char name[], PetscScalar *dval, PetscBool *set)
Definition: DeprecatedPetsc.hpp:162
MoFEM::MeshsetsManager::getCubitMeshsetPtr
MoFEMErrorCode getCubitMeshsetPtr(const int ms_id, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr) const
get cubit meshset
Definition: MeshsetsManager.cpp:578
MoFEM::DMoFEMLoopFiniteElements
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:586
convert.int
int
Definition: convert.py:64
MoFEM::PetscOptionsGetInt
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
Definition: DeprecatedPetsc.hpp:142
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
HDIV
@ HDIV
field with continuous normal traction
Definition: definitions.h:87
MoFEM::getDMTsCtx
auto getDMTsCtx(DM dm)
Get TS context data structure used by DM.
Definition: DMMoFEM.hpp:1141
MoFEM::OpLoopSide
Element used to execute operators on side of the element.
Definition: ForcesAndSourcesCore.hpp:1290
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
PlasticProblem::mField
MoFEM::Interface & mField
Definition: adolc_plasticity.cpp:134
MoFEM::OpPostProcMapInMoab
Post post-proc data at points from hash maps.
Definition: PostProcBrokenMeshInMoabBase.hpp:698
MoFEM::PetscOptionsGetBool
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
Definition: DeprecatedPetsc.hpp:182
MoFEM::TSAdaptCreateMoFEM
PetscErrorCode TSAdaptCreateMoFEM(TSAdapt adapt)
Craete MOFEM adapt.
Definition: TsCtx.cpp:797
MoFEM::OpDGProjectionMassMatrix
Definition: DGProjection.hpp:106