v0.14.0
Loading...
Searching...
No Matches
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< 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

namespace  ContactOps
 

Macros

#define EXECUTABLE_DIMENSION   3
 

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 = AssemblyType::SCHUR
 
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 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.
 
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.

Typedef Documentation

◆ BoundaryEle

Definition at line 54 of file contact.cpp.

◆ BoundaryEleOp

Definition at line 55 of file contact.cpp.

◆ BoundaryLhsBCs

Definition at line 146 of file contact.cpp.

◆ BoundaryRhsBCs

Definition at line 143 of file contact.cpp.

◆ DomainEle

Definition at line 52 of file contact.cpp.

◆ DomainEleOp

Definition at line 53 of file contact.cpp.

◆ DomainRhsBCs

Definition at line 140 of file contact.cpp.

◆ EntData

Definition at line 51 of file contact.cpp.

◆ OpBoundaryLhsBCs

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

Definition at line 147 of file contact.cpp.

◆ OpBoundaryRhsBCs

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

Definition at line 144 of file contact.cpp.

◆ OpDomainRhsBCs

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

Definition at line 141 of file contact.cpp.

◆ OpSpringLhs

[Operators used for contact]

Definition at line 109 of file contact.cpp.

◆ OpSpringRhs

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

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

767 {
768
769#ifdef PYTHON_SFD
770 Py_Initialize();
771#endif
772
773 // Initialisation of MoFEM/PETSc and MOAB data structures
774 const char param_file[] = "param_file.petsc";
776
777 // Add logging channel for CONTACT
778 auto core_log = logging::core::get();
779 core_log->add_sink(
781 LogManager::setLog("CONTACT");
782 MOFEM_LOG_TAG("CONTACT", "Indent");
783
784 try {
785
786 //! [Register MoFEM discrete manager in PETSc]
787 DMType dm_name = "DMMOFEM";
788 CHKERR DMRegister_MoFEM(dm_name);
789 //! [Register MoFEM discrete manager in PETSc
790
791 //! [Create MoAB]
792 moab::Core mb_instance; ///< mesh database
793 moab::Interface &moab = mb_instance; ///< mesh database interface
794 //! [Create MoAB]
795
796 //! [Create MoFEM]
797 MoFEM::Core core(moab); ///< finite element database
798 MoFEM::Interface &m_field = core; ///< finite element database interface
799 //! [Create MoFEM]
800
801 //! [Load mesh]
802 Simple *simple = m_field.getInterface<Simple>();
803 CHKERR simple->getOptions();
804 CHKERR simple->loadFile("");
805 //! [Load mesh]
806
807 //! [CONTACT]
808 Contact ex(m_field);
809 CHKERR ex.runProblem();
810 //! [CONTACT]
811 }
813
815
816#ifdef PYTHON_SFD
817 if (Py_FinalizeEx() < 0) {
818 exit(120);
819 }
820#endif
821
822 return 0;
823}
std::string param_file
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
static char help[]
[Check]
Definition: contact.cpp:765
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
#define CHKERR
Inline error check.
Definition: definitions.h:535
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:47
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
Definition: LogManager.cpp:389
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
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:112
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
Definition: LogManager.cpp:298
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Definition: LogManager.cpp:344
Simple interface for fast problem set-up.
Definition: Simple.hpp:27
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.

Variable Documentation

◆ alpha_damping

double alpha_damping = 0

Definition at line 126 of file contact.cpp.

◆ AT

constexpr AssemblyType AT = AssemblyType::SCHUR
constexpr

Definition at line 28 of file contact.cpp.

◆ CONTACT_SPACE

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

[Specialisation for assembly]

Definition at line 106 of file contact.cpp.

◆ geom_order

int geom_order = 1

Definition at line 120 of file contact.cpp.

◆ help

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

[Check]

Definition at line 765 of file contact.cpp.

◆ is_quasi_static

PetscBool is_quasi_static = PETSC_TRUE

[Operators used for contact]

Definition at line 117 of file contact.cpp.

◆ IT

constexpr IntegrationType IT
constexpr
Initial value:
=
IntegrationType::GAUSS

Definition at line 29 of file contact.cpp.

◆ order

int order = 2

Definition at line 119 of file contact.cpp.

◆ poisson_ratio

double poisson_ratio = 0.25

Definition at line 122 of file contact.cpp.

◆ rho

double rho = 0.0

Definition at line 123 of file contact.cpp.

◆ scale

double scale = 1.

Definition at line 128 of file contact.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM
constexpr
Initial value:
=
#define EXECUTABLE_DIMENSION
Definition: contact.cpp:14

Definition at line 45 of file contact.cpp.

◆ spring_stiffness

double spring_stiffness = 0.0

Definition at line 124 of file contact.cpp.

◆ vis_spring_stiffness

double vis_spring_stiffness = 0.0

Definition at line 125 of file contact.cpp.

◆ young_modulus

double young_modulus = 100

Definition at line 121 of file contact.cpp.