v0.14.0
Public Types | Public Member Functions | Public Attributes | List of all members
MortarContactInterface Struct Reference

#include <users_modules/mortar_contact/src/MortarContactInterface.hpp>

Inheritance diagram for MortarContactInterface:
[legend]
Collaboration diagram for MortarContactInterface:
[legend]

Public Types

typedef ContactSearchKdTree::ContactCommonData_multiIndex contactMIndex
 
- Public Types inherited from GenericElementInterface
enum  TSType {
  EX, IM, IM2, IMEX,
  DEFAULT, EX, IM, IM2,
  IMEX, DEFAULT
}
 
enum  TSType {
  EX, IM, IM2, IMEX,
  DEFAULT, EX, IM, IM2,
  IMEX, DEFAULT
}
 
using BcMarkerPtr = boost::shared_ptr< std::vector< char unsigned > >
 
using BcMarkerPtr = boost::shared_ptr< std::vector< char unsigned > >
 

Public Member Functions

 MortarContactInterface (MoFEM::Interface &m_field, string postion_field, string mesh_posi_field_name="MESH_NODE_POSITIONS", bool is_displacement_field=false, bool is_quasi_static=true)
 
 MortarContactInterface ()=delete
 
MoFEMErrorCode getCommandLineParameters () override
 
MoFEMErrorCode addElementFields () override
 
MoFEMErrorCode createElements () override
 
MoFEMErrorCode setOperators () override
 
BitRefLevel getBitRefLevel () override
 
MoFEMErrorCode addElementsToDM (SmartPetscObj< DM > dm) override
 
MoFEMErrorCode setupSolverJacobianSNES () override
 
MoFEMErrorCode setupSolverFunctionSNES () override
 
MoFEMErrorCode setupSolverJacobianTS (const TSType type) override
 
MoFEMErrorCode setupSolverFunctionTS (const TSType type) override
 
MoFEMErrorCode updateElementVariables () override
 
MoFEMErrorCode postProcessElement (int step) override
 
std::vector< BitRefLevel > & getBitRefLevelVector ()
 
MoFEMErrorCode setupElementEntities ()
 
MoFEMErrorCode setPositionFieldOrder (int order)
 
boost::ptr_deque< MoFEM::ForcesAndSourcesCore::UserDataOperator > & getPostProcSimpleContactPipeline ()
 
MoFEMErrorCode findContactSurfacePairs ()
 
MoFEMErrorCode findPostProcSurface ()
 
template<typename T , bool RHS>
MoFEMErrorCode setupSolverImpl (const TSType type=IM)
 
template<typename T >
MoFEMErrorCode setupSolverFunction (const TSType type=IM)
 
template<typename T >
MoFEMErrorCode setupSolverJacobian (const TSType type=IM)
 
MoFEMErrorCode postProcessContactState (int step)
 
template<>
MoFEMErrorCode setupSolverFunction (const TSType type)
 
template<>
MoFEMErrorCode setupSolverFunction (const TSType type)
 
template<>
MoFEMErrorCode setupSolverJacobian (const TSType type)
 
template<>
MoFEMErrorCode setupSolverJacobian (const TSType type)
 
template<>
MoFEMErrorCode setupSolverJacobian (const TSType type)
 
template<>
MoFEMErrorCode setupSolverJacobian (const TSType type)
 
template<>
MoFEMErrorCode setupSolverFunction (const TSType type)
 
template<>
MoFEMErrorCode setupSolverFunction (const TSType type)
 
- Public Member Functions inherited from GenericElementInterface
 GenericElementInterface ()
 
virtual ~GenericElementInterface ()
 
virtual MoFEMErrorCode setGlobalBoundaryMarker (BcMarkerPtr mark)
 
virtual BcMarkerPtr getGlobalBoundaryMarker ()
 
virtual MoFEMErrorCode setMonitorPtr (boost::shared_ptr< MoFEM::FEMethod > monitor_ptr)
 
virtual BitRefLevel getBitRefLevelMask ()
 
virtual MoFEMErrorCode opFactoryDomainRhs (boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip)
 
virtual MoFEMErrorCode opFactoryDomainLhs (boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip)
 
virtual MoFEMErrorCode setUpdateElementVariablesOperators ()
 
virtual MoFEMErrorCode updateElementVariables (SmartPetscObj< DM > dm, string fe_name)
 
virtual MoFEMErrorCode postProcessElement (int step, SmartPetscObj< DM > dm, string fe_name)
 
 GenericElementInterface ()
 
virtual ~GenericElementInterface ()
 
virtual MoFEMErrorCode setGlobalBoundaryMarker (BcMarkerPtr mark)
 
virtual BcMarkerPtr getGlobalBoundaryMarker ()
 
virtual MoFEMErrorCode setMonitorPtr (boost::shared_ptr< FEMethod > monitor_ptr)
 
virtual BitRefLevel getBitRefLevelMask ()
 
virtual MoFEMErrorCode opFactoryDomainRhs (boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip)
 
virtual MoFEMErrorCode opFactoryDomainLhs (boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip)
 
virtual MoFEMErrorCode setUpdateElementVariablesOperators ()
 
virtual MoFEMErrorCode updateElementVariables (SmartPetscObj< DM > dm, string fe_name)
 
virtual MoFEMErrorCode postProcessElement (int step, SmartPetscObj< DM > dm, string fe_name)
 

Public Attributes

MoFEM::InterfacemField
 
SmartPetscObj< DM > dM
 
double cnValue
 
PetscInt oRder
 
PetscInt orderContact
 
PetscInt orderLambda
 
PetscInt nbHoLevels
 
PetscBool isNewtonCotes
 
PetscBool convectPts
 
PetscBool printContactState
 
PetscBool almFlag
 
PetscBool dEbug
 
PetscBool isPartitioned
 
boost::shared_ptr< MortarContactProblemcontactProblemPtr
 
Range contactPrisms
 
Range masterTris
 
Range slaveTris
 
std::vector< std::pair< Range, Range > > contactSurfacePairs
 
Range postProcSurface
 
double postProcGapTol
 
string positionField
 
string meshNodeField
 
bool isDisplacementField
 
bool isQuasiStatic
 
std::vector< BitRefLevel > bitLevels
 
boost::shared_ptr< contactMIndexcontactCommondataMultiIndex
 
boost::shared_ptr< PostProcFaceOnRefinedMeshpostProcContactPtr
 
boost::shared_ptr< MortarContactProblem::MortarContactElementfePostProcSimpleContact
 
boost::shared_ptr< MortarContactProblem::CommonDataMortarContactcommonDataPostProc
 
moab::Core mb_post
 
moab::Interface & moabPostProcMesh
 
std::array< double, 2 > nbGaussPts
 
std::array< double, 2 > contactArea
 
- Public Attributes inherited from GenericElementInterface
BcMarkerPtr mBoundaryMarker
 
int atomTest
 
int restartRunStep
 
boost::shared_ptr< MoFEM::FEMethodmonitorPtr
 
boost::shared_ptr< FEMethodmonitorPtr
 

Detailed Description

Examples
mortar_contact.cpp.

Definition at line 22 of file MortarContactInterface.hpp.

Member Typedef Documentation

◆ contactMIndex

Definition at line 57 of file MortarContactInterface.hpp.

Constructor & Destructor Documentation

◆ MortarContactInterface() [1/2]

MortarContactInterface::MortarContactInterface ( MoFEM::Interface m_field,
string  postion_field,
string  mesh_posi_field_name = "MESH_NODE_POSITIONS",
bool  is_displacement_field = false,
bool  is_quasi_static = true 
)
inline

Definition at line 71 of file MortarContactInterface.hpp.

75  : mField(m_field), positionField(postion_field),
76  meshNodeField(mesh_posi_field_name),
77  isDisplacementField(is_displacement_field),
79 
80  oRder = -1;
81  orderContact = 1;
82  nbHoLevels = 0;
83  orderLambda = 1;
84  cnValue = -1;
85  postProcGapTol = 0.;
86  almFlag = PETSC_FALSE;
87  isNewtonCotes = PETSC_FALSE;
88  convectPts = PETSC_FALSE;
89  printContactState = PETSC_FALSE;
90  dEbug = PETSC_FALSE;
91  isPartitioned = PETSC_FALSE;
92  }

◆ MortarContactInterface() [2/2]

MortarContactInterface::MortarContactInterface ( )
delete

Member Function Documentation

◆ addElementFields()

MoFEMErrorCode MortarContactInterface::addElementFields ( )
overridevirtual

Implements GenericElementInterface.

Examples
mortar_contact.cpp.

Definition at line 139 of file MortarContactInterface.cpp.

139  {
141  auto &moab = mField.get_moab();
142 
145 
147 
149  MB_TAG_SPARSE, MF_ZERO);
154  CHKERR mField.set_field_order(0, MBVERTEX, meshNodeField, 1);
155  }
156 
158  // FIXME: TODO: we need to discuss how to
159  if (oRder < 0)
160  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
161  "set appropriate position field order, "
162  "setPositionFieldOrder(int order)");
163 
164  // Declare problem add entities (by tets) to the field
166  MB_TAG_SPARSE, MF_ZERO);
171  CHKERR mField.set_field_order(0, MBVERTEX, positionField, 1);
172  }
173 
175  MB_TAG_SPARSE, MF_ZERO);
177  CHKERR mField.set_field_order(0, MBTRI, "LAGMULT", orderLambda);
178  CHKERR mField.set_field_order(0, MBEDGE, "LAGMULT", orderLambda);
179  CHKERR mField.set_field_order(0, MBVERTEX, "LAGMULT", 1);
180 
181  auto set_contact_order = [&]() {
183  Range contact_tris, contact_edges;
184  CHKERR moab.get_adjacencies(contactPrisms, 2, false, contact_tris,
185  moab::Interface::UNION);
186  contact_tris = contact_tris.subset_by_type(MBTRI);
187  CHKERR moab.get_adjacencies(contact_tris, 1, false, contact_edges,
188  moab::Interface::UNION);
189  Range ho_ents;
190  ho_ents.merge(contact_tris);
191  ho_ents.merge(contact_edges);
192  for (int ll = 0; ll != nbHoLevels; ll++) {
193  Range ents, verts, tets;
194  CHKERR moab.get_connectivity(ho_ents, verts, true);
195  CHKERR moab.get_adjacencies(verts, 3, false, tets,
196  moab::Interface::UNION);
197  tets = tets.subset_by_type(MBTET);
198  for (auto d : {1, 2}) {
199  CHKERR moab.get_adjacencies(tets, d, false, ents,
200  moab::Interface::UNION);
201  }
202  ho_ents = unite(ho_ents, ents);
203  ho_ents = unite(ho_ents, tets);
204  }
205 
207 
209  };
210 
211  if (orderContact > oRder)
212  CHKERR set_contact_order();
213 
215 }

◆ addElementsToDM()

MoFEMErrorCode MortarContactInterface::addElementsToDM ( SmartPetscObj< DM >  dm)
overridevirtual

Implements GenericElementInterface.

Examples
mortar_contact.cpp.

Definition at line 239 of file MortarContactInterface.cpp.

239  {
241 
242  this->dM = dm;
243 
244  CHKERR DMMoFEMAddElement(this->dM, "CONTACT_ELEM");
245  CHKERR DMMoFEMAddElement(this->dM, "CONTACT_POST_PROC");
246 
247  auto simple = mField.getInterface<Simple>();
248  simple->getOtherFiniteElements().push_back("CONTACT_ELEM");
249  simple->getOtherFiniteElements().push_back("CONTACT_POST_PROC");
250 
252 }

◆ createElements()

MoFEMErrorCode MortarContactInterface::createElements ( )
overridevirtual

Implements GenericElementInterface.

Examples
mortar_contact.cpp.

Definition at line 219 of file MortarContactInterface.cpp.

219  {
221 
222  contactProblemPtr = boost::make_shared<MortarContactProblem>(
223  mField, contactCommondataMultiIndex, boost::make_shared<double>(cnValue),
224  isNewtonCotes);
225 
226  // add fields to the global matrix by adding the element
227  contactProblemPtr->addMortarContactElement(
228  "CONTACT_ELEM", positionField, "LAGMULT", contactPrisms, meshNodeField);
229  contactProblemPtr->addPostProcContactElement(
230  "CONTACT_POST_PROC", positionField, "LAGMULT", meshNodeField, slaveTris);
231 
233 }

◆ findContactSurfacePairs()

MoFEMErrorCode MortarContactInterface::findContactSurfacePairs ( )

Definition at line 629 of file MortarContactInterface.cpp.

629  {
631 
632  std::map<std::string, Range> slave_surface_map, master_surface_map;
633 
634  auto fill_surface_map = [&](auto &surface_map, std::string surface_name) {
636 
638  if (it->getName().compare(0, surface_name.size(), surface_name) == 0) {
639  Range tris;
640  CHKERR mField.get_moab().get_entities_by_type(it->meshset, MBTRI, tris,
641  true);
642  std::string key = it->getName().substr(surface_name.size());
643  auto res = surface_map.insert(std::pair<std::string, Range>(key, tris));
644  if (!res.second) {
645  SETERRQ1(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
646  "Contact surface name %s used more than once",
647  it->getName().c_str());
648  }
649  }
650  }
651 
653  };
654 
655  CHKERR fill_surface_map(slave_surface_map, "MORTAR_SLAVE");
656  CHKERR fill_surface_map(master_surface_map, "MORTAR_MASTER");
657 
658  for (const auto &[key, slave_range] : slave_surface_map) {
659  auto master_search = master_surface_map.find(key);
660  if (master_search != master_surface_map.end()) {
661  contactSurfacePairs.push_back(
662  std::pair<Range, Range>(slave_range, master_search->second));
663  master_surface_map.erase(master_search);
664  } else {
665  SETERRQ2(
666  PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
667  "Cannot find pairing contact surface MORTAR_MASTER%s for existing "
668  "surface MORTAR_SLAVE%s",
669  key.c_str(), key.c_str());
670  }
671  }
672 
673  if (!master_surface_map.empty()) {
674  std::string key = master_surface_map.begin()->first;
675  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
676  "Cannot find pairing contact surface MORTAR_SLAVE%s for existing "
677  "surface MORTAR_MASTER%s",
678  key.c_str(), key.c_str());
679  }
680 
682 }

◆ findPostProcSurface()

MoFEMErrorCode MortarContactInterface::findPostProcSurface ( )

Definition at line 684 of file MortarContactInterface.cpp.

684  {
686 
687  std::string surface_name = "MORTAR_POST_PROC";
688 
690  if (it->getName().compare(0, surface_name.size(), surface_name) == 0) {
691  Range tris;
692  CHKERR mField.get_moab().get_entities_by_type(it->meshset, MBTRI, tris,
693  true);
694  postProcSurface.merge(tris);
695  }
696  }
697 
699 }

◆ getBitRefLevel()

BitRefLevel MortarContactInterface::getBitRefLevel ( )
overridevirtual

Reimplemented from GenericElementInterface.

Examples
mortar_contact.cpp.

Definition at line 235 of file MortarContactInterface.cpp.

235  {
236  return this->getBitRefLevelVector().back();
237 };

◆ getBitRefLevelVector()

std::vector< BitRefLevel > & MortarContactInterface::getBitRefLevelVector ( )

Definition at line 13 of file MortarContactInterface.cpp.

13  {
14  return bitLevels;
15 }

◆ getCommandLineParameters()

MoFEMErrorCode MortarContactInterface::getCommandLineParameters ( )
overridevirtual

Reimplemented from GenericElementInterface.

Examples
mortar_contact.cpp.

Definition at line 22 of file MortarContactInterface.cpp.

22  {
24 
25  CHKERR PetscOptionsBegin(PETSC_COMM_WORLD, "", "Mortar Config", "none");
26 
27  CHKERR PetscOptionsInt(
28  "-order_contact",
29  "approximation order of spatial positions in contact interface", "", 1,
30  &orderContact, PETSC_NULL);
31  CHKERR PetscOptionsInt("-ho_levels_num", "number of higher order levels", "",
32  0, &nbHoLevels, PETSC_NULL);
33  CHKERR PetscOptionsInt("-order_lambda",
34  "approximation order of Lagrange multipliers", "", 1,
35  &orderLambda, PETSC_NULL);
36  isPartitioned = PETSC_FALSE;
37  CHKERR PetscOptionsBool("-is_partitioned",
38  "set if mesh is partitioned (this result that each "
39  "process keeps only part of the mes",
40  "", PETSC_FALSE, &isPartitioned, PETSC_NULL);
41 
42  CHKERR PetscOptionsReal("-cn_value", "default regularisation cn value", "",
43  1., &cnValue, PETSC_NULL);
44 
45  CHKERR PetscOptionsReal("-post_proc_gap_tol",
46  "gap tolerance for post processing", "", 0.,
47  &postProcGapTol, PETSC_NULL);
48 
49  CHKERR PetscOptionsBool("-is_newton_cotes",
50  "set if Newton-Cotes quadrature rules are used", "",
51  PETSC_FALSE, &isNewtonCotes, PETSC_NULL);
52  CHKERR PetscOptionsBool("-convect", "set to convect integration pts", "",
53  PETSC_FALSE, &convectPts, PETSC_NULL);
54  CHKERR PetscOptionsBool("-print_contact_state",
55  "output number of active gp at every iteration", "",
56  PETSC_FALSE, &printContactState, PETSC_NULL);
57  CHKERR PetscOptionsBool("-alm_flag", "if set use ALM, if not use C-function",
58  "", PETSC_FALSE, &almFlag, PETSC_NULL);
59  CHKERR PetscOptionsBool("-debug", "output debug files", "", PETSC_FALSE,
60  &dEbug, PETSC_NULL);
61 
62  int order = 1;
63  CHKERR PetscOptionsInt("-order", "approximation order of spatial positions",
64  "", 1, &order, PETSC_NULL);
65  CHKERR this->setPositionFieldOrder(order);
66 
67  ierr = PetscOptionsEnd();
68  CHKERRQ(ierr);
69 
71 }

◆ getPostProcSimpleContactPipeline()

boost::ptr_deque< MoFEM::ForcesAndSourcesCore::UserDataOperator > & MortarContactInterface::getPostProcSimpleContactPipeline ( )
Examples
mortar_contact.cpp.

Definition at line 18 of file MortarContactInterface.cpp.

18  {
19  return fePostProcSimpleContact->getOpPtrVector();
20 }

◆ postProcessContactState()

MoFEMErrorCode MortarContactInterface::postProcessContactState ( int  step)

Definition at line 540 of file MortarContactInterface.cpp.

540  {
542 
543  moabPostProcMesh.delete_mesh();
544  if (!commonDataPostProc)
545  SETERRQ(
546  PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
547  "you need to setup the solver first to use postProcessContactState");
548  CHKERR VecZeroEntries(commonDataPostProc->gaussPtsStateVec);
549  CHKERR VecZeroEntries(commonDataPostProc->contactAreaVec);
551 
552  auto get_contact_data = [&](auto vec, std::array<double, 2> &data) {
554  CHKERR VecAssemblyBegin(vec);
555  CHKERR VecAssemblyEnd(vec);
556  const double *array;
557  CHKERR VecGetArrayRead(vec, &array);
558  if (mField.get_comm_rank() == 0) {
559  for (int i : {0, 1})
560  data[i] = array[i];
561  }
562  CHKERR VecRestoreArrayRead(vec, &array);
564  };
565 
566  CHKERR get_contact_data(commonDataPostProc->gaussPtsStateVec, nbGaussPts);
567  CHKERR get_contact_data(commonDataPostProc->contactAreaVec, contactArea);
568 
569  if (mField.get_comm_rank() == 0) {
570  MOFEM_LOG_C("WORLD", Sev::verbose, "Active gauss pts: %d out of %d",
571  (int)nbGaussPts[0], (int)nbGaussPts[1]);
572 
573  if (!postProcSurface.empty())
574  MOFEM_LOG("WORLD", Sev::inform)
575  << "Computing contact area only on the post process surface";
576  if (postProcGapTol > std::numeric_limits<double>::epsilon())
577  MOFEM_LOG_C("WORLD", Sev::inform, "Using gap tolerance %3.3f",
579 
580  MOFEM_LOG_C("WORLD", Sev::inform, "Active contact area: %3.3f out of %3.3f",
581  contactArea[0], contactArea[1]);
582  }
583 
584  auto out_file_name = "out_contact_integ_pts_" + to_string(step) + ".h5m";
585  MOFEM_LOG_C("WORLD", Sev::verbose, "out file %s", out_file_name.c_str());
586  CHKERR moabPostProcMesh.write_file(out_file_name.c_str(), "MOAB",
587  "PARALLEL=WRITE_PART");
588 
590 }

◆ postProcessElement()

MoFEMErrorCode MortarContactInterface::postProcessElement ( int  step)
overridevirtual

Implements GenericElementInterface.

Examples
mortar_contact.cpp.

Definition at line 592 of file MortarContactInterface.cpp.

592  {
594 
595  if (masterTris.empty())
597 
598  this->postProcessContactState(step);
599 
600  if (!postProcContactPtr) {
601  postProcContactPtr = boost::make_shared<PostProcFaceOnRefinedMesh>(mField);
602  CHKERR postProcContactPtr->generateReferenceElementMesh();
604  CHKERR postProcContactPtr->addFieldValuesPostProc("LAGMULT");
605  CHKERR postProcContactPtr->addFieldValuesPostProc(positionField);
606  CHKERR postProcContactPtr->addFieldValuesPostProc(meshNodeField);
607  }
608  CHKERR DMoFEMLoopFiniteElements(this->dM, "CONTACT_POST_PROC",
610 
611  auto out_file_name = "out_contact_" + to_string(step) + ".h5m";
612  MOFEM_LOG_C("WORLD", Sev::verbose, "out file %s", out_file_name.c_str());
613  CHKERR postProcContactPtr->writeFile(out_file_name.c_str());
614 
616 }

◆ setOperators()

MoFEMErrorCode MortarContactInterface::setOperators ( )
overridevirtual

Implements GenericElementInterface.

Examples
mortar_contact.cpp.

Definition at line 217 of file MortarContactInterface.cpp.

217 { return 0; }

◆ setPositionFieldOrder()

MoFEMErrorCode MortarContactInterface::setPositionFieldOrder ( int  order)

Definition at line 618 of file MortarContactInterface.cpp.

618  {
620  oRder = order;
622 }

◆ setupElementEntities()

MoFEMErrorCode MortarContactInterface::setupElementEntities ( )

Definition at line 73 of file MortarContactInterface.cpp.

73  {
75  auto &moab = mField.get_moab();
76 
77  bitLevels.push_back(BitRefLevel().set(0));
78  CHKERR mField.getInterface<BitRefManager>()->setBitRefLevelByDim(
79  0, 3, bitLevels.back());
80 
81  Range meshset_level0;
82  CHKERR mField.getInterface<BitRefManager>()->getEntitiesByRefLevel(
83  bitLevels.back(), BitRefLevel().set(), meshset_level0);
84  MOFEM_LOG("WORLD", Sev::verbose)
85  << "Meshset_level0 " << meshset_level0.size();
86 
87  contactCommondataMultiIndex = boost::make_shared<contactMIndex>();
88 
90 
91  for (auto &contact_surface_pair : contactSurfacePairs) {
92  slaveTris.merge(contact_surface_pair.first);
93  masterTris.merge(contact_surface_pair.second);
94 
95  ContactSearchKdTree contact_search_kd_tree(mField);
96 
97  CHKERR contact_search_kd_tree.buildTree(contact_surface_pair.second);
98 
99  CHKERR contact_search_kd_tree.contactSearchAlgorithm(
100  contact_surface_pair.second, contact_surface_pair.first,
102  }
103 
104  if (!masterTris.empty() && isPartitioned)
105  SETERRQ(PETSC_COMM_WORLD, MOFEM_NOT_IMPLEMENTED,
106  "Partitioned mesh is not supported with mortar contact");
107 
108  EntityHandle meshset_slave_master_prisms;
109  CHKERR moab.create_meshset(MESHSET_SET, meshset_slave_master_prisms);
110  CHKERR
111  moab.add_entities(meshset_slave_master_prisms, contactPrisms);
112  CHKERR mField.getInterface<BitRefManager>()->setBitRefLevelByDim(
113  meshset_slave_master_prisms, 3, bitLevels.back());
114 
115  if (dEbug)
116  CHKERR moab.write_mesh("slave_master_prisms.vtk",
117  &meshset_slave_master_prisms, 1);
118 
119  Range tris_from_prism;
120  // find actual masters and slave used
121  CHKERR mField.get_moab().get_adjacencies(
122  contactPrisms, 2, true, tris_from_prism, moab::Interface::UNION);
123 
124  tris_from_prism = tris_from_prism.subset_by_type(MBTRI);
125  slaveTris = intersect(tris_from_prism, slaveTris);
126 
127  if (dEbug) {
128  EntityHandle mshs_surf_slave;
129  CHKERR mField.get_moab().create_meshset(MESHSET_SET, mshs_surf_slave);
130  CHKERR mField.get_moab().add_entities(mshs_surf_slave, slaveTris);
131  CHKERR mField.get_moab().write_mesh("surf_slave.vtk", &mshs_surf_slave, 1);
132  // EntityHandle meshset_tri_slave;
133  // CHKERR mField.get_moab().create_meshset(MESHSET_SET, meshset_tri_slave);
134  }
135 
137 }

◆ setupSolverFunction() [1/5]

template<>
MoFEMErrorCode MortarContactInterface::setupSolverFunction ( const TSType  type)

◆ setupSolverFunction() [2/5]

template<>
MoFEMErrorCode MortarContactInterface::setupSolverFunction ( const TSType  type)

◆ setupSolverFunction() [3/5]

template<>
MoFEMErrorCode MortarContactInterface::setupSolverFunction ( const TSType  type)

Definition at line 490 of file MortarContactInterface.cpp.

490  {
492  CHKERR setupSolverImpl<TS, true>(type);
494 }

◆ setupSolverFunction() [4/5]

template<>
MoFEMErrorCode MortarContactInterface::setupSolverFunction ( const TSType  type)

Definition at line 497 of file MortarContactInterface.cpp.

497  {
499  CHKERR setupSolverImpl<SNES, true>(type);
501 }

◆ setupSolverFunction() [5/5]

template<typename T >
MoFEMErrorCode MortarContactInterface::setupSolverFunction ( const TSType  type = IM)

◆ setupSolverFunctionSNES()

MoFEMErrorCode MortarContactInterface::setupSolverFunctionSNES ( )
overridevirtual

Reimplemented from GenericElementInterface.

Examples
mortar_contact.cpp.

Definition at line 517 of file MortarContactInterface.cpp.

517  {
519  CHKERR this->setupSolverFunction<SNES>();
521 }

◆ setupSolverFunctionTS()

MoFEMErrorCode MortarContactInterface::setupSolverFunctionTS ( const TSType  type)
overridevirtual

Implements GenericElementInterface.

Definition at line 528 of file MortarContactInterface.cpp.

528  {
530  CHKERR this->setupSolverFunction<TS>(type);
532 }

◆ setupSolverImpl()

template<typename T , bool RHS>
MoFEMErrorCode MortarContactInterface::setupSolverImpl ( const TSType  type = IM)

Definition at line 255 of file MortarContactInterface.cpp.

255  {
257 
258  if (!dM)
259  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
260  "DM not defined, addElementsToDM(dm) first");
261 
262  auto &moab = mField.get_moab();
263 
264  auto make_contact_element = [&]() {
265  return boost::make_shared<MortarContactProblem::MortarContactElement>(
267  };
268 
269  auto make_convective_master_element = [&]() {
270  return boost::make_shared<
273  };
274 
275  auto make_convective_slave_element = [&]() {
276  return boost::make_shared<
279  };
280 
281  auto make_contact_common_data = [&]() {
282  return boost::make_shared<MortarContactProblem::CommonDataMortarContact>(
283  mField);
284  };
285 
286  auto get_contact_rhs = [&](auto make_element, bool is_alm = false,
287  bool is_displacements = false) {
288  auto fe_rhs_simple_contact = make_element();
289  auto common_data_mortar_contact = make_contact_common_data();
290  if (printContactState) {
291  fe_rhs_simple_contact->contactStateVec =
292  common_data_mortar_contact->gaussPtsStateVec;
293  }
294  fe_rhs_simple_contact->getOpPtrVector().push_back(
296  contactProblemPtr->setContactOperatorsRhs(
297  fe_rhs_simple_contact, common_data_mortar_contact, positionField,
298  "LAGMULT", is_alm, false, "", is_displacements);
299  fe_rhs_simple_contact->getOpPtrVector().push_back(
300  new OpUnSetBc(positionField));
301  return fe_rhs_simple_contact;
302  };
303 
304  auto get_master_traction_rhs = [&](auto make_element, bool is_alm = false,
305  bool is_displacements = false) {
306  auto fe_rhs_simple_contact = make_element();
307  fe_rhs_simple_contact->getOpPtrVector().push_back(
309  auto common_data_mortar_contact = make_contact_common_data();
310  contactProblemPtr->setMasterForceOperatorsRhs(
311  fe_rhs_simple_contact, common_data_mortar_contact, positionField,
312  "LAGMULT", is_alm, false, "", is_displacements);
313  fe_rhs_simple_contact->getOpPtrVector().push_back(
314  new OpUnSetBc(positionField));
315  return fe_rhs_simple_contact;
316  };
317 
318  auto get_master_traction_lhs = [&](auto make_element, bool is_alm = false,
319  bool is_displacements = false) {
320  auto fe_lhs_simple_contact = make_element();
321  auto common_data_mortar_contact = make_contact_common_data();
322  fe_lhs_simple_contact->getOpPtrVector().push_back(
324  contactProblemPtr->setMasterForceOperatorsLhs(
325  fe_lhs_simple_contact, common_data_mortar_contact, positionField,
326  "LAGMULT", is_alm, false, "", is_displacements);
327  fe_lhs_simple_contact->getOpPtrVector().push_back(
328  new OpUnSetBc(positionField));
329  return fe_lhs_simple_contact;
330  };
331 
332  auto get_master_help_traction_lhs = [&](auto make_element,
333  bool is_alm = false,
334  bool is_displacements = false) {
335  auto fe_lhs_simple_contact = make_element();
336  auto common_data_mortar_contact = make_contact_common_data();
337  fe_lhs_simple_contact->getOpPtrVector().push_back(
339  contactProblemPtr->setMasterForceOperatorsLhs(
340  fe_lhs_simple_contact, common_data_mortar_contact, positionField,
341  "LAGMULT", is_alm, false, "", is_displacements);
342  fe_lhs_simple_contact->getOpPtrVector().push_back(
343  new OpUnSetBc(positionField));
344  return fe_lhs_simple_contact;
345  };
346 
347  auto get_contact_lhs = [&](auto make_element, bool is_alm = false,
348  bool is_displacements = false) {
349  auto fe_lhs_simple_contact = make_element();
350  auto common_data_mortar_contact = make_contact_common_data();
351  fe_lhs_simple_contact->getOpPtrVector().push_back(
353  contactProblemPtr->setContactOperatorsLhs(
354  fe_lhs_simple_contact, common_data_mortar_contact, positionField,
355  "LAGMULT", is_alm, false, "", is_displacements);
356  fe_lhs_simple_contact->getOpPtrVector().push_back(
357  new OpUnSetBc(positionField));
358  return fe_lhs_simple_contact;
359  };
360 
361  auto get_contact_help_lhs = [&](auto make_element, bool is_alm = false,
362  bool is_displacements = false) {
363  auto fe_lhs_simple_contact = make_element();
364  auto common_data_mortar_contact = make_contact_common_data();
365  fe_lhs_simple_contact->getOpPtrVector().push_back(
367  contactProblemPtr->setContactOperatorsLhs(
368  fe_lhs_simple_contact, common_data_mortar_contact, positionField,
369  "LAGMULT", is_alm, false, "", is_displacements);
370  fe_lhs_simple_contact->getOpPtrVector().push_back(
371  new OpUnSetBc(positionField));
372  return fe_lhs_simple_contact;
373  };
374 
375  auto set_solver_pipelines = [&](PetscErrorCode (*function)(
376  DM, const std::string,
377  boost::shared_ptr<MoFEM::FEMethod>,
378  boost::shared_ptr<MoFEM::BasicMethod>,
379  boost::shared_ptr<MoFEM::BasicMethod>),
380  PetscErrorCode (*jacobian)(
381  DM, const std::string,
382  boost::shared_ptr<MoFEM::FEMethod>,
383  boost::shared_ptr<MoFEM::BasicMethod>,
384  boost::shared_ptr<MoFEM::BasicMethod>)) {
386 
387  if (convectPts) {
388  if (RHS) {
389 
390  CHKERR function(this->dM, "CONTACT_ELEM",
391  get_contact_rhs(make_convective_master_element, almFlag,
393  PETSC_NULL, PETSC_NULL);
394  CHKERR function(this->dM, "CONTACT_ELEM",
395  get_master_traction_rhs(make_convective_slave_element,
397  PETSC_NULL, PETSC_NULL);
398  } else {
399  if (jacobian) {
400 
401  CHKERR jacobian(this->dM, "CONTACT_ELEM",
402  get_contact_help_lhs(make_convective_master_element,
404  PETSC_NULL, PETSC_NULL);
405 
406  CHKERR jacobian(
407  this->dM, "CONTACT_ELEM",
408  get_master_help_traction_lhs(make_convective_slave_element),
409  PETSC_NULL, PETSC_NULL);
410  }
411  }
412  } else {
413  if (RHS) {
414 
415  CHKERR function(
416  this->dM, "CONTACT_ELEM",
417  get_contact_rhs(make_contact_element, almFlag, isDisplacementField),
418  PETSC_NULL, PETSC_NULL);
419  CHKERR function(this->dM, "CONTACT_ELEM",
420  get_master_traction_rhs(make_contact_element, almFlag,
422  PETSC_NULL, PETSC_NULL);
423  } else {
424  if (jacobian) {
425 
426  CHKERR jacobian(this->dM, "CONTACT_ELEM",
427  get_contact_lhs(make_contact_element, almFlag,
429  PETSC_NULL, PETSC_NULL);
430  CHKERR jacobian(this->dM, "CONTACT_ELEM",
431  get_master_traction_lhs(make_contact_element, almFlag,
433  PETSC_NULL, PETSC_NULL);
434  }
435  }
436  }
437 
439  };
440 
441  if constexpr (std::is_same_v<T, SNES>) {
442 
443  CHKERR set_solver_pipelines(&DMMoFEMSNESSetFunction,
445  } else if (std::is_same_v<T, TS>) {
446 
447  switch (type) {
448  case IM:
449  CHKERR set_solver_pipelines(&DMMoFEMTSSetIFunction,
451  break;
452  case IM2:
453  CHKERR set_solver_pipelines(&DMMoFEMTSSetI2Function,
455  break;
456  case EX:
457  CHKERR set_solver_pipelines(&DMMoFEMTSSetRHSFunction,
458  nullptr);
459  break;
460  default:
461  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
462  "This TS is not yet implemented for contact");
463  break;
464  }
465 
466  } else
467  static_assert(!std::is_same_v<T, KSP>,
468  "this solver has not been implemented for contact yet");
469 
470  if (!commonDataPostProc) {
471  commonDataPostProc = make_contact_common_data();
472  if (convectPts)
473  fePostProcSimpleContact = make_convective_master_element();
474  else
475  fePostProcSimpleContact = make_contact_element();
476 
478 
479  contactProblemPtr->setContactOperatorsForPostProc(
481  "LAGMULT", moabPostProcMesh, almFlag, false, "", false, postProcSurface,
483  }
484 
486 }

◆ setupSolverJacobian() [1/5]

template<>
MoFEMErrorCode MortarContactInterface::setupSolverJacobian ( const TSType  type)

◆ setupSolverJacobian() [2/5]

template<>
MoFEMErrorCode MortarContactInterface::setupSolverJacobian ( const TSType  type)

◆ setupSolverJacobian() [3/5]

template<>
MoFEMErrorCode MortarContactInterface::setupSolverJacobian ( const TSType  type)

Definition at line 504 of file MortarContactInterface.cpp.

504  {
506  CHKERR setupSolverImpl<SNES, false>(type);
508 }

◆ setupSolverJacobian() [4/5]

template<>
MoFEMErrorCode MortarContactInterface::setupSolverJacobian ( const TSType  type)

Definition at line 511 of file MortarContactInterface.cpp.

511  {
513  CHKERR setupSolverImpl<TS, false>(type);
515 }

◆ setupSolverJacobian() [5/5]

template<typename T >
MoFEMErrorCode MortarContactInterface::setupSolverJacobian ( const TSType  type = IM)

◆ setupSolverJacobianSNES()

MoFEMErrorCode MortarContactInterface::setupSolverJacobianSNES ( )
overridevirtual

Reimplemented from GenericElementInterface.

Examples
mortar_contact.cpp.

Definition at line 522 of file MortarContactInterface.cpp.

522  {
524  CHKERR this->setupSolverJacobian<SNES>();
526 }

◆ setupSolverJacobianTS()

MoFEMErrorCode MortarContactInterface::setupSolverJacobianTS ( const TSType  type)
overridevirtual

Implements GenericElementInterface.

Definition at line 534 of file MortarContactInterface.cpp.

534  {
536  CHKERR this->setupSolverJacobian<TS>(type);
538 }

◆ updateElementVariables()

MoFEMErrorCode MortarContactInterface::updateElementVariables ( )
overridevirtual

Reimplemented from GenericElementInterface.

Definition at line 624 of file MortarContactInterface.cpp.

624  {
627 }

Member Data Documentation

◆ almFlag

PetscBool MortarContactInterface::almFlag

Definition at line 36 of file MortarContactInterface.hpp.

◆ bitLevels

std::vector<BitRefLevel> MortarContactInterface::bitLevels

Definition at line 55 of file MortarContactInterface.hpp.

◆ cnValue

double MortarContactInterface::cnValue

Definition at line 28 of file MortarContactInterface.hpp.

◆ commonDataPostProc

boost::shared_ptr<MortarContactProblem::CommonDataMortarContact> MortarContactInterface::commonDataPostProc
Examples
mortar_contact.cpp.

Definition at line 64 of file MortarContactInterface.hpp.

◆ contactArea

std::array<double, 2> MortarContactInterface::contactArea
Examples
mortar_contact.cpp.

Definition at line 69 of file MortarContactInterface.hpp.

◆ contactCommondataMultiIndex

boost::shared_ptr<contactMIndex> MortarContactInterface::contactCommondataMultiIndex

Definition at line 58 of file MortarContactInterface.hpp.

◆ contactPrisms

Range MortarContactInterface::contactPrisms

Definition at line 42 of file MortarContactInterface.hpp.

◆ contactProblemPtr

boost::shared_ptr<MortarContactProblem> MortarContactInterface::contactProblemPtr

Definition at line 41 of file MortarContactInterface.hpp.

◆ contactSurfacePairs

std::vector<std::pair<Range, Range> > MortarContactInterface::contactSurfacePairs

Definition at line 44 of file MortarContactInterface.hpp.

◆ convectPts

PetscBool MortarContactInterface::convectPts

Definition at line 34 of file MortarContactInterface.hpp.

◆ dEbug

PetscBool MortarContactInterface::dEbug

Definition at line 37 of file MortarContactInterface.hpp.

◆ dM

SmartPetscObj<DM> MortarContactInterface::dM

Definition at line 25 of file MortarContactInterface.hpp.

◆ fePostProcSimpleContact

boost::shared_ptr<MortarContactProblem::MortarContactElement> MortarContactInterface::fePostProcSimpleContact

Definition at line 62 of file MortarContactInterface.hpp.

◆ isDisplacementField

bool MortarContactInterface::isDisplacementField

Definition at line 52 of file MortarContactInterface.hpp.

◆ isNewtonCotes

PetscBool MortarContactInterface::isNewtonCotes

Definition at line 33 of file MortarContactInterface.hpp.

◆ isPartitioned

PetscBool MortarContactInterface::isPartitioned

Definition at line 38 of file MortarContactInterface.hpp.

◆ isQuasiStatic

bool MortarContactInterface::isQuasiStatic

Definition at line 53 of file MortarContactInterface.hpp.

◆ masterTris

Range MortarContactInterface::masterTris

Definition at line 43 of file MortarContactInterface.hpp.

◆ mb_post

moab::Core MortarContactInterface::mb_post

Definition at line 66 of file MortarContactInterface.hpp.

◆ meshNodeField

string MortarContactInterface::meshNodeField

Definition at line 50 of file MortarContactInterface.hpp.

◆ mField

MoFEM::Interface& MortarContactInterface::mField

Definition at line 24 of file MortarContactInterface.hpp.

◆ moabPostProcMesh

moab::Interface& MortarContactInterface::moabPostProcMesh

Definition at line 67 of file MortarContactInterface.hpp.

◆ nbGaussPts

std::array<double, 2> MortarContactInterface::nbGaussPts
Examples
mortar_contact.cpp.

Definition at line 68 of file MortarContactInterface.hpp.

◆ nbHoLevels

PetscInt MortarContactInterface::nbHoLevels

Definition at line 32 of file MortarContactInterface.hpp.

◆ oRder

PetscInt MortarContactInterface::oRder

Definition at line 29 of file MortarContactInterface.hpp.

◆ orderContact

PetscInt MortarContactInterface::orderContact

Definition at line 30 of file MortarContactInterface.hpp.

◆ orderLambda

PetscInt MortarContactInterface::orderLambda

Definition at line 31 of file MortarContactInterface.hpp.

◆ positionField

string MortarContactInterface::positionField

Definition at line 49 of file MortarContactInterface.hpp.

◆ postProcContactPtr

boost::shared_ptr<PostProcFaceOnRefinedMesh> MortarContactInterface::postProcContactPtr

Definition at line 59 of file MortarContactInterface.hpp.

◆ postProcGapTol

double MortarContactInterface::postProcGapTol

Definition at line 47 of file MortarContactInterface.hpp.

◆ postProcSurface

Range MortarContactInterface::postProcSurface

Definition at line 46 of file MortarContactInterface.hpp.

◆ printContactState

PetscBool MortarContactInterface::printContactState

Definition at line 35 of file MortarContactInterface.hpp.

◆ slaveTris

Range MortarContactInterface::slaveTris

Definition at line 43 of file MortarContactInterface.hpp.


The documentation for this struct was generated from the following files:
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
MoFEM::addHOOpsFace3D
MoFEMErrorCode addHOOpsFace3D(const std::string field, E &e, bool hcurl, bool hdiv)
Definition: HODataOperators.hpp:699
MortarContactInterface::isDisplacementField
bool isDisplacementField
Definition: MortarContactInterface.hpp:52
MortarContactProblem::MortarConvectSlaveContactElement
Element used to integrate on master surfaces. It convects integration points on slaves,...
Definition: MortarContactProblem.hpp:311
MortarContactInterface::isQuasiStatic
bool isQuasiStatic
Definition: MortarContactInterface.hpp:53
MortarContactInterface::orderContact
PetscInt orderContact
Definition: MortarContactInterface.hpp:30
H1
@ H1
continuous field
Definition: definitions.h:85
MortarContactInterface::nbHoLevels
PetscInt nbHoLevels
Definition: MortarContactInterface.hpp:32
EntityHandle
MortarContactInterface::contactPrisms
Range contactPrisms
Definition: MortarContactInterface.hpp:42
MortarContactInterface::isPartitioned
PetscBool isPartitioned
Definition: MortarContactInterface.hpp:38
MortarContactInterface::dEbug
PetscBool dEbug
Definition: MortarContactInterface.hpp:37
MortarContactInterface::commonDataPostProc
boost::shared_ptr< MortarContactProblem::CommonDataMortarContact > commonDataPostProc
Definition: MortarContactInterface.hpp:64
MortarContactInterface::almFlag
PetscBool almFlag
Definition: MortarContactInterface.hpp:36
MortarContactInterface::masterTris
Range masterTris
Definition: MortarContactInterface.hpp:43
MortarContactInterface::isNewtonCotes
PetscBool isNewtonCotes
Definition: MortarContactInterface.hpp:33
ContactSearchKdTree
Definition: ContactSearchKdTree.hpp:18
MoFEM::CoreInterface::get_comm_rank
virtual int get_comm_rank() const =0
GenericElementInterface::IM
@ IM
Definition: GenericElementInterface.hpp:16
out_file_name
char out_file_name[255]
Definition: initial_diffusion.cpp:53
MortarContactInterface::setPositionFieldOrder
MoFEMErrorCode setPositionFieldOrder(int order)
Definition: MortarContactInterface.cpp:618
MortarContactInterface::contactProblemPtr
boost::shared_ptr< MortarContactProblem > contactProblemPtr
Definition: MortarContactInterface.hpp:41
MortarContactInterface::contactArea
std::array< double, 2 > contactArea
Definition: MortarContactInterface.hpp:69
MoFEM::Simple
Simple interface for fast problem set-up.
Definition: Simple.hpp:27
GenericElementInterface::EX
@ EX
Definition: GenericElementInterface.hpp:16
MoFEM::CoreInterface::add_ents_to_field_by_type
virtual MoFEMErrorCode add_ents_to_field_by_type(const Range &ents, const EntityType type, const std::string &name, int verb=DEFAULT_VERBOSITY)=0
Add entities to field meshset.
MoFEM::DMMoFEMAddElement
PetscErrorCode DMMoFEMAddElement(DM dm, std::string fe_name)
add element to dm
Definition: DMMoFEM.cpp:497
order
constexpr int order
Definition: dg_projection.cpp:18
MortarContactInterface::mField
MoFEM::Interface & mField
Definition: MortarContactInterface.hpp:24
MortarContactInterface::postProcSurface
Range postProcSurface
Definition: MortarContactInterface.hpp:46
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MortarContactInterface::moabPostProcMesh
moab::Interface & moabPostProcMesh
Definition: MortarContactInterface.hpp:67
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MoFEM::DMMoFEMTSSetIJacobian
PetscErrorCode DMMoFEMTSSetIJacobian(DM dm, 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 TS Jacobian evaluation function
Definition: DMMoFEM.cpp:853
MortarContactInterface::setupElementEntities
MoFEMErrorCode setupElementEntities()
Definition: MortarContactInterface.cpp:73
MortarContactInterface::contactCommondataMultiIndex
boost::shared_ptr< contactMIndex > contactCommondataMultiIndex
Definition: MortarContactInterface.hpp:58
MortarContactInterface::meshNodeField
string meshNodeField
Definition: MortarContactInterface.hpp:50
MoFEM::DMMoFEMTSSetI2Jacobian
PetscErrorCode DMMoFEMTSSetI2Jacobian(DM dm, 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 TS Jacobian evaluation function
Definition: DMMoFEM.cpp:1017
MOFEM_LOG_C
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:311
MoFEM::DMMoFEMTSSetI2Function
PetscErrorCode DMMoFEMTSSetI2Function(DM dm, 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 TS implicit function evaluation function
Definition: DMMoFEM.cpp:975
is_quasi_static
PetscBool is_quasi_static
Definition: plastic.cpp:139
simple
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
convert.type
type
Definition: convert.py:64
MortarContactInterface::bitLevels
std::vector< BitRefLevel > bitLevels
Definition: MortarContactInterface.hpp:55
MortarContactInterface::positionField
string positionField
Definition: MortarContactInterface.hpp:49
MoFEM::DMMoFEMSNESSetJacobian
PetscErrorCode DMMoFEMSNESSetJacobian(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set SNES Jacobian evaluation function
Definition: DMMoFEM.cpp:759
MortarContactInterface::slaveTris
Range slaveTris
Definition: MortarContactInterface.hpp:43
MortarContactInterface::nbGaussPts
std::array< double, 2 > nbGaussPts
Definition: MortarContactInterface.hpp:68
MoFEM::CoreInterface::check_field
virtual bool check_field(const std::string &name) const =0
check if field is in database
MortarContactInterface::postProcGapTol
double postProcGapTol
Definition: MortarContactInterface.hpp:47
MortarContactInterface::postProcessContactState
MoFEMErrorCode postProcessContactState(int step)
Definition: MortarContactInterface.cpp:540
GenericElementInterface::IM2
@ IM2
Definition: GenericElementInterface.hpp:16
GenericElementInterface::mBoundaryMarker
BcMarkerPtr mBoundaryMarker
Definition: GenericElementInterface.hpp:20
MortarContactInterface::oRder
PetscInt oRder
Definition: MortarContactInterface.hpp:29
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
MortarContactInterface::convectPts
PetscBool convectPts
Definition: MortarContactInterface.hpp:34
MoFEM::OpUnSetBc
Definition: FormsIntegrators.hpp:49
Range
MoFEM::DMMoFEMTSSetRHSFunction
PetscErrorCode DMMoFEMTSSetRHSFunction(DM dm, 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 TS the right hand side function
Definition: DMMoFEM.cpp:882
MortarContactInterface::postProcContactPtr
boost::shared_ptr< PostProcFaceOnRefinedMesh > postProcContactPtr
Definition: MortarContactInterface.hpp:59
MF_ZERO
@ MF_ZERO
Definition: definitions.h:111
MOFEM_LOG
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:308
_IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.
Definition: MeshsetsManager.hpp:71
MortarContactInterface::mb_post
moab::Core mb_post
Definition: MortarContactInterface.hpp:66
BLOCKSET
@ BLOCKSET
Definition: definitions.h:161
MortarContactInterface::getBitRefLevelVector
std::vector< BitRefLevel > & getBitRefLevelVector()
Definition: MortarContactInterface.cpp:13
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
AINSWORTH_LEGENDRE_BASE
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:60
MoFEM::OpSetBc
Set indices on entities on finite element.
Definition: FormsIntegrators.hpp:38
MoFEM::DMMoFEMTSSetIFunction
PetscErrorCode DMMoFEMTSSetIFunction(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set TS implicit function evaluation function
Definition: DMMoFEM.cpp:800
MortarContactInterface::orderLambda
PetscInt orderLambda
Definition: MortarContactInterface.hpp:31
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
MortarContactInterface::cnValue
double cnValue
Definition: MortarContactInterface.hpp:28
sdf_hertz_2d_axisymm_plane.d
float d
Definition: sdf_hertz_2d_axisymm_plane.py:4
MortarContactInterface::findContactSurfacePairs
MoFEMErrorCode findContactSurfacePairs()
Definition: MortarContactInterface.cpp:629
MortarContactProblem::MortarConvectMasterContactElement
Element used to integrate on slave surfaces. It convects integration points on slaves,...
Definition: MortarContactProblem.hpp:282
MoFEM::BitRefManager
Managing BitRefLevels.
Definition: BitRefManager.hpp:21
MoFEM::Types::BitRefLevel
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:40
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
MoFEM::CoreInterface::set_field_order
virtual MoFEMErrorCode set_field_order(const EntityHandle meshset, const EntityType type, const std::string &name, const ApproximationOrder order, int verb=DEFAULT_VERBOSITY)=0
Set order approximation of the entities in the field.
MortarContactInterface::fePostProcSimpleContact
boost::shared_ptr< MortarContactProblem::MortarContactElement > fePostProcSimpleContact
Definition: MortarContactInterface.hpp:62
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
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MortarContactInterface::dM
SmartPetscObj< DM > dM
Definition: MortarContactInterface.hpp:25
MOFEM_NOT_IMPLEMENTED
@ MOFEM_NOT_IMPLEMENTED
Definition: definitions.h:32
MoFEM::CoreInterface::add_field
virtual MoFEMErrorCode add_field(const std::string name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
Add field.
MortarContactInterface::printContactState
PetscBool printContactState
Definition: MortarContactInterface.hpp:35
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
MortarContactInterface::findPostProcSurface
MoFEMErrorCode findPostProcSurface()
Definition: MortarContactInterface.cpp:684
MoFEM::DMMoFEMSNESSetFunction
PetscErrorCode DMMoFEMSNESSetFunction(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set SNES residual evaluation function
Definition: DMMoFEM.cpp:718
MortarContactInterface::contactSurfacePairs
std::vector< std::pair< Range, Range > > contactSurfacePairs
Definition: MortarContactInterface.hpp:44