v0.14.0
Classes | Namespaces | Macros | Typedefs | Functions | Variables
contact.cpp File Reference
#include <MoFEM.hpp>
#include <MatrixFunction.hpp>
#include <HenckyOps.hpp>
#include <ContactOps.hpp>
#include <PostProcContact.hpp>
#include <ContactNaturalBC.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 2 >
 
struct  ElementsAndOps< 3 >
 
struct  BoundaryEleOpStab
 Element used to specialise assembly. More...
 
struct  Contact
 
struct  Contact::ScaledTimeScale
 
struct  SetUpSchur
 [Push operators to pipeline] More...
 
struct  SetUpSchurImpl
 

Namespaces

 ContactOps
 

Macros

#define EXECUTABLE_DIMENSION   3
 
#define SCHUR_ASSEMBLE   0
 

Typedefs

using EntData = EntitiesFieldData::EntData
 
using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEle = ElementsAndOps< SPACE_DIM >::BoundaryEle
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 
using OpSpringLhs = FormsIntegrators< BoundaryEleOp >::Assembly< AT >::BiLinearForm< IT >::OpMass< 1, SPACE_DIM >
 [Operators used for contact] More...
 
using OpSpringRhs = FormsIntegrators< BoundaryEleOp >::Assembly< AT >::LinearForm< IT >::OpBaseTimesVector< 1, SPACE_DIM, 1 >
 
using DomainRhsBCs = NaturalBC< DomainEleOp >::Assembly< AT >::LinearForm< IT >
 
using OpDomainRhsBCs = DomainRhsBCs::OpFlux< ContactOps::DomainBCs, 1, SPACE_DIM >
 
using BoundaryRhsBCs = NaturalBC< BoundaryEleOp >::Assembly< AT >::LinearForm< IT >
 
using OpBoundaryRhsBCs = BoundaryRhsBCs::OpFlux< ContactOps::BoundaryBCs, 1, SPACE_DIM >
 
using BoundaryLhsBCs = NaturalBC< BoundaryEleOp >::Assembly< AT >::BiLinearForm< IT >
 
using OpBoundaryLhsBCs = BoundaryLhsBCs::OpFlux< ContactOps::BoundaryBCs, 1, SPACE_DIM >
 

Functions

int main (int argc, char *argv[])
 

Variables

constexpr AssemblyType AT
 
constexpr IntegrationType IT
 
constexpr int SPACE_DIM
 
constexpr FieldSpace CONTACT_SPACE = ElementsAndOps<SPACE_DIM>::CONTACT_SPACE
 [Specialisation for assembly] More...
 
PetscBool is_quasi_static = PETSC_TRUE
 [Operators used for contact] More...
 
int order = 2
 
int contact_order = 2
 
int geom_order = 1
 
double young_modulus = 100
 
double poisson_ratio = 0.25
 
double rho = 0.0
 
double spring_stiffness = 0.0
 
double vis_spring_stiffness = 0.0
 
double alpha_damping = 0
 
double scale = 1.
 
PetscBool is_axisymmetric = PETSC_FALSE
 
int atom_test = 0
 
static char help [] = "...\n\n"
 [Check] More...
 

Detailed Description

\CONTACT contact.cpp

CONTACT of contact problem

Definition in file contact.cpp.

Macro Definition Documentation

◆ EXECUTABLE_DIMENSION

#define EXECUTABLE_DIMENSION   3

Definition at line 14 of file contact.cpp.

◆ SCHUR_ASSEMBLE

#define SCHUR_ASSEMBLE   0
Examples
plastic.cpp.

Definition at line 18 of file contact.cpp.

Typedef Documentation

◆ BoundaryEle

Definition at line 62 of file contact.cpp.

◆ BoundaryEleOp

Definition at line 63 of file contact.cpp.

◆ BoundaryLhsBCs

Definition at line 163 of file contact.cpp.

◆ BoundaryRhsBCs

using BoundaryRhsBCs = NaturalBC<BoundaryEleOp>::Assembly<AT>::LinearForm<IT>

Definition at line 160 of file contact.cpp.

◆ DomainEle

Definition at line 60 of file contact.cpp.

◆ DomainEleOp

Definition at line 61 of file contact.cpp.

◆ DomainRhsBCs

using DomainRhsBCs = NaturalBC<DomainEleOp>::Assembly<AT>::LinearForm<IT>

Definition at line 157 of file contact.cpp.

◆ EntData

Definition at line 59 of file contact.cpp.

◆ OpBoundaryLhsBCs

using OpBoundaryLhsBCs = BoundaryLhsBCs::OpFlux<ContactOps::BoundaryBCs, 1, SPACE_DIM>

Definition at line 165 of file contact.cpp.

◆ OpBoundaryRhsBCs

using OpBoundaryRhsBCs = BoundaryRhsBCs::OpFlux<ContactOps::BoundaryBCs, 1, SPACE_DIM>

Definition at line 162 of file contact.cpp.

◆ OpDomainRhsBCs

using OpDomainRhsBCs = DomainRhsBCs::OpFlux<ContactOps::DomainBCs, 1, SPACE_DIM>

Definition at line 159 of file contact.cpp.

◆ OpSpringLhs

[Operators used for contact]

Definition at line 118 of file contact.cpp.

◆ OpSpringRhs

using OpSpringRhs = FormsIntegrators<BoundaryEleOp>::Assembly<AT>::LinearForm< IT>::OpBaseTimesVector<1, SPACE_DIM, 1>

Definition at line 120 of file contact.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

[Register MoFEM discrete manager in PETSc]

[Register MoFEM discrete manager in PETSc

[Create MoAB]

< mesh database

< mesh database interface

[Create MoAB]

[Create MoFEM]

< finite element database

< finite element database interface

[Create MoFEM]

[Load mesh]

[Load mesh]

[CONTACT]

[CONTACT]

Definition at line 934 of file contact.cpp.

934  {
935 
936 #ifdef PYTHON_SDF
937  Py_Initialize();
938  np::initialize();
939 #endif
940 
941  // Initialisation of MoFEM/PETSc and MOAB data structures
942  const char param_file[] = "param_file.petsc";
943  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
944 
945  // Add logging channel for CONTACT
946  auto core_log = logging::core::get();
947  core_log->add_sink(
948  LogManager::createSink(LogManager::getStrmWorld(), "CONTACT"));
949  LogManager::setLog("CONTACT");
950  MOFEM_LOG_TAG("CONTACT", "Indent");
951 
952  try {
953 
954  //! [Register MoFEM discrete manager in PETSc]
955  DMType dm_name = "DMMOFEM";
956  CHKERR DMRegister_MoFEM(dm_name);
957  //! [Register MoFEM discrete manager in PETSc
958 
959  //! [Create MoAB]
960  moab::Core mb_instance; ///< mesh database
961  moab::Interface &moab = mb_instance; ///< mesh database interface
962  //! [Create MoAB]
963 
964  //! [Create MoFEM]
965  MoFEM::Core core(moab); ///< finite element database
966  MoFEM::Interface &m_field = core; ///< finite element database interface
967  //! [Create MoFEM]
968 
969  //! [Load mesh]
970  Simple *simple = m_field.getInterface<Simple>();
971  CHKERR simple->getOptions();
972  CHKERR simple->loadFile("");
973  //! [Load mesh]
974 
975  //! [CONTACT]
976  Contact ex(m_field);
977  CHKERR ex.runProblem();
978  //! [CONTACT]
979  }
980  CATCH_ERRORS;
981 
983 
984 #ifdef PYTHON_SDF
985  if (Py_FinalizeEx() < 0) {
986  exit(120);
987  }
988 #endif
989 
990  return 0;
991 }

Variable Documentation

◆ alpha_damping

double alpha_damping = 0

Definition at line 133 of file contact.cpp.

◆ AT

constexpr AssemblyType AT
constexpr
Initial value:

Definition at line 34 of file contact.cpp.

◆ atom_test

int atom_test = 0

Definition at line 139 of file contact.cpp.

◆ contact_order

int contact_order = 2

Definition at line 126 of file contact.cpp.

◆ CONTACT_SPACE

constexpr FieldSpace CONTACT_SPACE = ElementsAndOps<SPACE_DIM>::CONTACT_SPACE
constexpr

[Specialisation for assembly]

Definition at line 114 of file contact.cpp.

◆ geom_order

int geom_order = 1

Definition at line 127 of file contact.cpp.

◆ help

char help[] = "...\n\n"
static

[Check]

Definition at line 932 of file contact.cpp.

◆ is_axisymmetric

PetscBool is_axisymmetric = PETSC_FALSE
Examples
ContactOps.hpp.

Definition at line 137 of file contact.cpp.

◆ is_quasi_static

PetscBool is_quasi_static = PETSC_TRUE

[Operators used for contact]

Definition at line 123 of file contact.cpp.

◆ IT

constexpr IntegrationType IT
constexpr
Initial value:

Definition at line 37 of file contact.cpp.

◆ order

int order = 2

Definition at line 125 of file contact.cpp.

◆ poisson_ratio

double poisson_ratio = 0.25

Definition at line 129 of file contact.cpp.

◆ rho

double rho = 0.0

Definition at line 130 of file contact.cpp.

◆ scale

double scale = 1.

Definition at line 135 of file contact.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM
constexpr
Initial value:

Definition at line 53 of file contact.cpp.

◆ spring_stiffness

double spring_stiffness = 0.0

Definition at line 131 of file contact.cpp.

◆ vis_spring_stiffness

double vis_spring_stiffness = 0.0

Definition at line 132 of file contact.cpp.

◆ young_modulus

double young_modulus = 100

Definition at line 128 of file contact.cpp.

MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.
Definition: UnknownInterface.hpp:93
MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
MoFEM::PETSC
@ PETSC
Definition: FormsIntegrators.hpp:104
MoFEM::CoreTmp< 0 >::Finalize
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:112
MoFEM::Simple
Simple interface for fast problem set-up.
Definition: Simple.hpp:27
SCHUR_ASSEMBLE
#define SCHUR_ASSEMBLE
Definition: contact.cpp:18
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1975
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
simple
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
Contact
Definition: contact.cpp:169
MoFEM::DMRegister_MoFEM
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:47
MoFEM::GAUSS
@ GAUSS
Definition: FormsIntegrators.hpp:128
EXECUTABLE_DIMENSION
#define EXECUTABLE_DIMENSION
Definition: contact.cpp:14
MOFEM_LOG_TAG
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
MoFEM::CoreTmp< 0 >::Initialize
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:72
CATCH_ERRORS
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1094
help
static char help[]
[Check]
Definition: contact.cpp:932
MoFEM::SCHUR
@ SCHUR
Definition: FormsIntegrators.hpp:104