v0.14.0
MortarContactInterface.hpp
Go to the documentation of this file.
1 /** \file MortarContactInterface.hpp
2  */
3 
4 /* This file is part of MoFEM.
5  * MoFEM is free software: you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License as published by the
7  * Free Software Foundation, either version 3 of the License, or (at your
8  * option) any later version.
9  *
10  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13  * License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>. */
17 #pragma once
18 
19 #ifndef __MORTARCONTACTINTERFACE_HPP__
20 #define __MORTARCONTACTINTERFACE_HPP__
21 
23 
25  SmartPetscObj<DM> dM;
26 
27  // params
28  double cnValue;
29  PetscInt oRder;
30  PetscInt orderContact;
31  PetscInt orderLambda;
32  PetscInt nbHoLevels;
33  PetscBool isNewtonCotes;
34  PetscBool convectPts;
35  PetscBool printContactState;
36  PetscBool almFlag;
37  PetscBool dEbug;
38  PetscBool isPartitioned;
39 
40  // data structs
41  boost::shared_ptr<MortarContactProblem> contactProblemPtr;
44  std::vector<std::pair<Range, Range>> contactSurfacePairs; // <Slave, Master>
45 
48 
49  string positionField;
50  string meshNodeField;
51 
54 
55  std::vector<BitRefLevel> bitLevels;
56 
58  boost::shared_ptr<contactMIndex> contactCommondataMultiIndex;
59  boost::shared_ptr<PostProcFaceOnRefinedMesh> postProcContactPtr;
60 
61  boost::shared_ptr<MortarContactProblem::MortarContactElement>
63  boost::shared_ptr<MortarContactProblem::CommonDataMortarContact>
65 
68  std::array<double, 2> nbGaussPts;
69  std::array<double, 2> contactArea;
70 
71  MortarContactInterface(MoFEM::Interface &m_field, string postion_field,
72  string mesh_posi_field_name = "MESH_NODE_POSITIONS",
73  bool is_displacement_field = false,
74  bool is_quasi_static = true)
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  }
93  MortarContactInterface() = delete;
94 
95  // interface functions
98 
99  MoFEMErrorCode createElements() override;
100  MoFEMErrorCode setOperators() override;
101  BitRefLevel getBitRefLevel() override;
102  MoFEMErrorCode addElementsToDM(SmartPetscObj<DM> dm) override;
103 
104  // MoFEMErrorCode setupSolverKSP() override;
109 
111  MoFEMErrorCode postProcessElement(int step) override;
112 
113  // contact interface
114  std::vector<BitRefLevel> &getBitRefLevelVector();
117 
118  boost::ptr_deque<MoFEM::ForcesAndSourcesCore::UserDataOperator> &
120 
123 
124  template <typename T, bool RHS>
126  template <typename T>
128  template <typename T>
130 
132 };
133 
134 template <>
136 MortarContactInterface::setupSolverJacobian<SNES>(const TSType type);
137 template <>
139 MortarContactInterface::setupSolverJacobian<SNES>(const TSType type);
140 template <>
142 MortarContactInterface::setupSolverFunction<TS>(const TSType type);
143 template <>
145 MortarContactInterface::setupSolverFunction<TS>(const TSType type);
146 
147 #endif // __MORTARCONTACTINTERFACE_HPP__
MortarContactInterface::isDisplacementField
bool isDisplacementField
Definition: MortarContactInterface.hpp:52
MortarContactInterface::isQuasiStatic
bool isQuasiStatic
Definition: MortarContactInterface.hpp:53
MortarContactInterface::orderContact
PetscInt orderContact
Definition: MortarContactInterface.hpp:30
MortarContactInterface::nbHoLevels
PetscInt nbHoLevels
Definition: MortarContactInterface.hpp:32
MortarContactInterface::contactPrisms
Range contactPrisms
Definition: MortarContactInterface.hpp:42
MortarContactInterface::isPartitioned
PetscBool isPartitioned
Definition: MortarContactInterface.hpp:38
ContactSearchKdTree::ContactCommonData_multiIndex
multi_index_container< boost::shared_ptr< ContactCommonData >, indexed_by< ordered_unique< tag< Prism_tag >, member< ContactCommonData, EntityHandle, &ContactCommonData::pRism > > > > ContactCommonData_multiIndex
Definition: ContactSearchKdTree.hpp:51
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
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MortarContactInterface::masterTris
Range masterTris
Definition: MortarContactInterface.hpp:43
MortarContactInterface::isNewtonCotes
PetscBool isNewtonCotes
Definition: MortarContactInterface.hpp:33
MortarContactInterface
Definition: MortarContactInterface.hpp:22
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
MortarContactInterface::getBitRefLevel
BitRefLevel getBitRefLevel() override
Definition: MortarContactInterface.cpp:235
order
constexpr int order
Definition: dg_projection.cpp:18
MortarContactInterface::setupSolverJacobian
MoFEMErrorCode setupSolverJacobian(const TSType type=IM)
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MortarContactInterface::contactMIndex
ContactSearchKdTree::ContactCommonData_multiIndex contactMIndex
Definition: MortarContactInterface.hpp:57
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1975
MortarContactInterface::mField
MoFEM::Interface & mField
Definition: MortarContactInterface.hpp:24
MortarContactInterface::postProcSurface
Range postProcSurface
Definition: MortarContactInterface.hpp:46
MortarContactInterface::moabPostProcMesh
moab::Interface & moabPostProcMesh
Definition: MortarContactInterface.hpp:67
GenericElementInterface
Set of functions declaring elements and setting operators for generic element interface.
Definition: GenericElementInterface.hpp:13
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
MortarContactInterface::setOperators
MoFEMErrorCode setOperators() override
Definition: MortarContactInterface.cpp:217
MortarContactInterface::setupSolverImpl
MoFEMErrorCode setupSolverImpl(const TSType type=IM)
Definition: MortarContactInterface.cpp:255
is_quasi_static
PetscBool is_quasi_static
Definition: plastic.cpp:190
MortarContactInterface::postProcessElement
MoFEMErrorCode postProcessElement(int step) override
Definition: MortarContactInterface.cpp:592
convert.type
type
Definition: convert.py:64
MortarContactInterface::MortarContactInterface
MortarContactInterface()=delete
MortarContactInterface::bitLevels
std::vector< BitRefLevel > bitLevels
Definition: MortarContactInterface.hpp:55
MortarContactInterface::getPostProcSimpleContactPipeline
boost::ptr_deque< MoFEM::ForcesAndSourcesCore::UserDataOperator > & getPostProcSimpleContactPipeline()
Definition: MortarContactInterface.cpp:18
MortarContactInterface::positionField
string positionField
Definition: MortarContactInterface.hpp:49
MortarContactInterface::slaveTris
Range slaveTris
Definition: MortarContactInterface.hpp:43
MortarContactInterface::setupSolverJacobianSNES
MoFEMErrorCode setupSolverJacobianSNES() override
Definition: MortarContactInterface.cpp:522
MortarContactInterface::nbGaussPts
std::array< double, 2 > nbGaussPts
Definition: MortarContactInterface.hpp:68
MortarContactInterface::postProcGapTol
double postProcGapTol
Definition: MortarContactInterface.hpp:47
MortarContactInterface::postProcessContactState
MoFEMErrorCode postProcessContactState(int step)
Definition: MortarContactInterface.cpp:540
MortarContactInterface::oRder
PetscInt oRder
Definition: MortarContactInterface.hpp:29
MortarContactInterface::convectPts
PetscBool convectPts
Definition: MortarContactInterface.hpp:34
Range
MortarContactInterface::postProcContactPtr
boost::shared_ptr< PostProcFaceOnRefinedMesh > postProcContactPtr
Definition: MortarContactInterface.hpp:59
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1094
MortarContactInterface::mb_post
moab::Core mb_post
Definition: MortarContactInterface.hpp:66
MortarContactInterface::getCommandLineParameters
MoFEMErrorCode getCommandLineParameters() override
Definition: MortarContactInterface.cpp:22
MortarContactInterface::getBitRefLevelVector
std::vector< BitRefLevel > & getBitRefLevelVector()
Definition: MortarContactInterface.cpp:13
MortarContactInterface::setupSolverFunction
MoFEMErrorCode setupSolverFunction(const TSType type=IM)
MortarContactInterface::orderLambda
PetscInt orderLambda
Definition: MortarContactInterface.hpp:31
GenericElementInterface::TSType
TSType
Definition: GenericElementInterface.hpp:16
MortarContactInterface::addElementFields
MoFEMErrorCode addElementFields() override
Definition: MortarContactInterface.cpp:139
MortarContactInterface::cnValue
double cnValue
Definition: MortarContactInterface.hpp:28
MortarContactInterface::findContactSurfacePairs
MoFEMErrorCode findContactSurfacePairs()
Definition: MortarContactInterface.cpp:629
MortarContactInterface::setupSolverJacobianTS
MoFEMErrorCode setupSolverJacobianTS(const TSType type) override
Definition: MortarContactInterface.cpp:534
MortarContactInterface::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)
Definition: MortarContactInterface.hpp:71
MortarContactInterface::addElementsToDM
MoFEMErrorCode addElementsToDM(SmartPetscObj< DM > dm) override
Definition: MortarContactInterface.cpp:239
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
MortarContactInterface::setupSolverFunctionTS
MoFEMErrorCode setupSolverFunctionTS(const TSType type) override
Definition: MortarContactInterface.cpp:528
MortarContactInterface::fePostProcSimpleContact
boost::shared_ptr< MortarContactProblem::MortarContactElement > fePostProcSimpleContact
Definition: MortarContactInterface.hpp:62
MortarContactInterface::dM
SmartPetscObj< DM > dM
Definition: MortarContactInterface.hpp:25
MortarContactInterface::setupSolverFunctionSNES
MoFEMErrorCode setupSolverFunctionSNES() override
Definition: MortarContactInterface.cpp:517
MortarContactInterface::createElements
MoFEMErrorCode createElements() override
Definition: MortarContactInterface.cpp:219
MortarContactInterface::printContactState
PetscBool printContactState
Definition: MortarContactInterface.hpp:35
MortarContactInterface::findPostProcSurface
MoFEMErrorCode findPostProcSurface()
Definition: MortarContactInterface.cpp:684
GenericElementInterface::IM
@ IM
Definition: GenericElementInterface.hpp:16
MortarContactInterface::updateElementVariables
MoFEMErrorCode updateElementVariables() override
Definition: MortarContactInterface.cpp:624
MortarContactInterface::contactSurfacePairs
std::vector< std::pair< Range, Range > > contactSurfacePairs
Definition: MortarContactInterface.hpp:44