v0.15.0
Loading...
Searching...
No Matches
contact.cpp File Reference
#include <MoFEM.hpp>
#include <MatrixFunction.hpp>
#include <GenericElementInterface.hpp>
#include <HenckyOps.hpp>
#include <HookeOps.hpp>
#include <ContactOps.hpp>
#include <PostProcContact.hpp>
#include <ContactNaturalBC.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< 2 >
 
struct  ElementsAndOps< 3 >
 
struct  Contact
 
struct  Contact::ScaledTimeScale
 
struct  SetUpSchur
 [Push operators to pipeline] More...
 
struct  SetUpSchurImpl
 

Namespaces

namespace  ContactOps
 

Macros

#define EXECUTABLE_DIMENSION   3
 
#define SCHUR_ASSEMBLE   0
 

Typedefs

using DomainEle = ElementsAndOps<SPACE_DIM>::DomainEle
 
using BoundaryEle = ElementsAndOps<SPACE_DIM>::BoundaryEle
 
using SideEle = ElementsAndOps<SPACE_DIM>::FaceSideEle
 
using OpSpringLhs
 [Operators used for contact]
 
using OpSpringRhs
 
using DomainRhsBCs = NaturalBC<DomainEleOp>::Assembly<AT>::LinearForm<IT>
 
using OpDomainRhsBCs
 
using BoundaryRhsBCs = NaturalBC<BoundaryEleOp>::Assembly<AT>::LinearForm<IT>
 
using OpBoundaryRhsBCs
 
using BoundaryLhsBCs = NaturalBC<BoundaryEleOp>::Assembly<AT>::BiLinearForm<IT>
 
using OpBoundaryLhsBCs
 

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]
 
PetscBool is_quasi_static = PETSC_TRUE
 [Operators used for contact]
 
int order = 2
 
int contact_order = 2
 
int sigma_order = 1
 
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
 
PetscBool is_large_strain = PETSC_FALSE
 
PetscBool is_plane_strain = PETSC_FALSE
 
int atom_test = 0
 
double ContactOps::cn_contact = 0.1
 
static char help [] = "...\n\n"
 [Check]
 

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, and test_broken_space.cpp.

Definition at line 18 of file contact.cpp.

Typedef Documentation

◆ BoundaryEle

Definition at line 64 of file contact.cpp.

◆ BoundaryLhsBCs

Definition at line 120 of file contact.cpp.

◆ BoundaryRhsBCs

Definition at line 117 of file contact.cpp.

◆ DomainEle

Definition at line 62 of file contact.cpp.

◆ DomainRhsBCs

Definition at line 114 of file contact.cpp.

◆ OpBoundaryLhsBCs

◆ OpBoundaryRhsBCs

◆ OpDomainRhsBCs

◆ OpSpringLhs

using OpSpringLhs
Initial value:

[Operators used for contact]

Definition at line 72 of file contact.cpp.

◆ OpSpringRhs

using OpSpringRhs
Initial value:

Definition at line 74 of file contact.cpp.

◆ SideEle

Definition at line 66 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 959 of file contact.cpp.

959 {
960
961#ifdef ENABLE_PYTHON_BINDING
962 Py_Initialize();
963 np::initialize();
964#endif
965
966 // Initialisation of MoFEM/PETSc and MOAB data structures
967 const char param_file[] = "param_file.petsc";
968 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
969
970 // Add logging channel for CONTACT
971 auto core_log = logging::core::get();
972 core_log->add_sink(
974 LogManager::setLog("CONTACT");
975 MOFEM_LOG_TAG("CONTACT", "Indent");
976
977 try {
978
979 //! [Register MoFEM discrete manager in PETSc]
980 DMType dm_name = "DMMOFEM";
981 CHKERR DMRegister_MoFEM(dm_name);
982 DMType dm_name_mg = "DMMOFEM_MG";
984 //! [Register MoFEM discrete manager in PETSc
985
986 //! [Create MoAB]
987 moab::Core mb_instance; ///< mesh database
988 moab::Interface &moab = mb_instance; ///< mesh database interface
989 //! [Create MoAB]
990
991 //! [Create MoFEM]
992 MoFEM::Core core(moab); ///< finite element database
993 MoFEM::Interface &m_field = core; ///< finite element database interface
994 //! [Create MoFEM]
995
996 //! [Load mesh]
997 Simple *simple = m_field.getInterface<Simple>();
999 CHKERR simple->loadFile("");
1000 //! [Load mesh]
1001
1002 //! [CONTACT]
1003 Contact ex(m_field);
1004 CHKERR ex.runProblem();
1005 //! [CONTACT]
1006 }
1008
1010
1011#ifdef ENABLE_PYTHON_BINDING
1012 if (Py_FinalizeEx() < 0) {
1013 exit(120);
1014 }
1015#endif
1016
1017 return 0;
1018}
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition acoustic.cpp:69
static char help[]
[Check]
Definition contact.cpp:957
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
MoFEMErrorCode DMRegister_MGViaApproxOrders(const char sname[])
Register DM for Multi-Grid via approximation orders.
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Core (interface) class.
Definition Core.hpp:82
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
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:118
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Simple interface for fast problem set-up.
Definition Simple.hpp:27
MoFEMErrorCode getOptions()
get options
Definition Simple.cpp:180
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.

Variable Documentation

◆ alpha_damping

double alpha_damping = 0

Definition at line 89 of file contact.cpp.

◆ AT

AssemblyType AT
constexpr
Initial value:
=
( 0 ) ? AssemblyType::BLOCK_SCHUR
AssemblyType
[Storage and set boundary conditions]

Definition at line 36 of file contact.cpp.

◆ atom_test

int atom_test = 0

Definition at line 96 of file contact.cpp.

◆ contact_order

int contact_order = 2

Definition at line 81 of file contact.cpp.

◆ CONTACT_SPACE

FieldSpace CONTACT_SPACE = ElementsAndOps<SPACE_DIM>::CONTACT_SPACE
constexpr

[Specialisation for assembly]

Definition at line 69 of file contact.cpp.

◆ geom_order

int geom_order = 1

Definition at line 83 of file contact.cpp.

◆ help

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

[Check]

Definition at line 957 of file contact.cpp.

◆ is_axisymmetric

PetscBool is_axisymmetric = PETSC_FALSE
Examples
ContactOps.hpp.

Definition at line 93 of file contact.cpp.

◆ is_large_strain

PetscBool is_large_strain = PETSC_FALSE

Definition at line 94 of file contact.cpp.

◆ is_plane_strain

PetscBool is_plane_strain = PETSC_FALSE
Examples
HenckyOps.hpp, and mofem/tutorials/vec-7/adjoint.cpp.

Definition at line 95 of file contact.cpp.

◆ is_quasi_static

PetscBool is_quasi_static = PETSC_TRUE

[Operators used for contact]

Definition at line 78 of file contact.cpp.

◆ IT

IntegrationType IT
constexpr
Initial value:
=
IntegrationType::GAUSS

Definition at line 39 of file contact.cpp.

◆ order

int order = 2

Definition at line 80 of file contact.cpp.

◆ poisson_ratio

double poisson_ratio = 0.25

Definition at line 85 of file contact.cpp.

◆ rho

double rho = 0.0

Definition at line 86 of file contact.cpp.

◆ scale

double scale = 1.

Definition at line 91 of file contact.cpp.

◆ sigma_order

int sigma_order = 1

Definition at line 82 of file contact.cpp.

◆ SPACE_DIM

int SPACE_DIM
constexpr
Initial value:
=
3

Definition at line 55 of file contact.cpp.

◆ spring_stiffness

double spring_stiffness = 0.0

Definition at line 87 of file contact.cpp.

◆ vis_spring_stiffness

double vis_spring_stiffness = 0.0

Definition at line 88 of file contact.cpp.

◆ young_modulus

double young_modulus = 100

Definition at line 84 of file contact.cpp.