v0.13.2
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
elastic.cpp File Reference

elastic example More...

#include <MoFEM.hpp>
#include <ElasticSpring.hpp>
#include <NaturalDomainBC.hpp>
#include <NaturalBoundaryBC.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 2 >
 
struct  ElementsAndOps< 3 >
 
struct  DomainBCs
 
struct  BoundaryBCs
 
struct  Example
 [Example] More...
 

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 PostProcEle = PostProcBrokenMeshInMoab< DomainEle >
 
using OpK = FormsIntegrators< DomainEleOp >::Assembly< A >::BiLinearForm< I >::OpGradSymTensorGrad< 1, SPACE_DIM, SPACE_DIM, 0 >
 
using OpInternalForce = FormsIntegrators< DomainEleOp >::Assembly< A >::LinearForm< I >::OpGradTimesSymTensor< 1, SPACE_DIM, SPACE_DIM >
 
using DomainRhsBCs = NaturalBC< DomainEleOp >::Assembly< A >::LinearForm< I >
 
using OpDomainRhsBCs = DomainRhsBCs::OpFlux< DomainBCs, 1, SPACE_DIM >
 
using BoundaryRhsBCs = NaturalBC< BoundaryEleOp >::Assembly< A >::LinearForm< I >
 
using OpBoundaryRhsBCs = BoundaryRhsBCs::OpFlux< BoundaryBCs, 1, SPACE_DIM >
 
using BoundaryLhsBCs = NaturalBC< BoundaryEleOp >::Assembly< A >::BiLinearForm< I >
 
using OpBoundaryLhsBCs = BoundaryLhsBCs::OpFlux< BoundaryBCs, 1, SPACE_DIM >
 

Functions

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

Variables

constexpr int SPACE_DIM
 [Define dimension] More...
 
constexpr AssemblyType A = AssemblyType::PETSC
 
constexpr IntegrationType I
 
constexpr double young_modulus = 1
 
constexpr double poisson_ratio = 0.3
 
constexpr double bulk_modulus_K = young_modulus / (3 * (1 - 2 * poisson_ratio))
 
constexpr double shear_modulus_G = young_modulus / (2 * (1 + poisson_ratio))
 
static char help [] = "...\n\n"
 [Check] More...
 

Detailed Description

elastic example

Version
0.13.2
Date
2022-09-19

Definition in file elastic.cpp.

Typedef Documentation

◆ BoundaryEle

Definition at line 37 of file elastic.cpp.

◆ BoundaryEleOp

Definition at line 38 of file elastic.cpp.

◆ BoundaryLhsBCs

Definition at line 53 of file elastic.cpp.

◆ BoundaryRhsBCs

Definition at line 51 of file elastic.cpp.

◆ DomainEle

Definition at line 35 of file elastic.cpp.

◆ DomainEleOp

Definition at line 36 of file elastic.cpp.

◆ DomainRhsBCs

Definition at line 49 of file elastic.cpp.

◆ EntData

Definition at line 34 of file elastic.cpp.

◆ OpBoundaryLhsBCs

Definition at line 54 of file elastic.cpp.

◆ OpBoundaryRhsBCs

Definition at line 52 of file elastic.cpp.

◆ OpDomainRhsBCs

Definition at line 50 of file elastic.cpp.

◆ OpInternalForce

using OpInternalForce = FormsIntegrators<DomainEleOp>::Assembly<A>::LinearForm< I>::OpGradTimesSymTensor<1, SPACE_DIM, SPACE_DIM>
Examples
nonlinear_elastic.cpp.

Definition at line 43 of file elastic.cpp.

◆ OpK

using OpK = FormsIntegrators<DomainEleOp>::Assembly<A>::BiLinearForm< I>::OpGradSymTensorGrad<1, SPACE_DIM, SPACE_DIM, 0>

Definition at line 41 of file elastic.cpp.

◆ PostProcEle

Definition at line 39 of file elastic.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]

[Example]

[Example]

Definition at line 522 of file elastic.cpp.

522 {
523
524 // Initialisation of MoFEM/PETSc and MOAB data structures
525 const char param_file[] = "param_file.petsc";
527
528 try {
529
530 //! [Register MoFEM discrete manager in PETSc]
531 DMType dm_name = "DMMOFEM";
532 CHKERR DMRegister_MoFEM(dm_name);
533 //! [Register MoFEM discrete manager in PETSc
534
535 //! [Create MoAB]
536 moab::Core mb_instance; ///< mesh database
537 moab::Interface &moab = mb_instance; ///< mesh database interface
538 //! [Create MoAB]
539
540 //! [Create MoFEM]
541 MoFEM::Core core(moab); ///< finite element database
542 MoFEM::Interface &m_field = core; ///< finite element database interface
543 //! [Create MoFEM]
544
545 //! [Example]
546 Example ex(m_field);
547 CHKERR ex.runProblem();
548 //! [Example]
549 }
551
553}
std::string param_file
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
#define CHKERR
Inline error check.
Definition: definitions.h:535
static char help[]
[Check]
Definition: elastic.cpp:520
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:47
[Example]
Definition: plastic.cpp:138
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.

Variable Documentation

◆ A

constexpr AssemblyType A = AssemblyType::PETSC
constexpr

Definition at line 30 of file elastic.cpp.

◆ bulk_modulus_K

constexpr double bulk_modulus_K = young_modulus / (3 * (1 - 2 * poisson_ratio))
constexpr

◆ help

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

[Check]

Definition at line 520 of file elastic.cpp.

◆ I

constexpr IntegrationType I
constexpr
Initial value:
=
IntegrationType::GAUSS

Definition at line 31 of file elastic.cpp.

◆ poisson_ratio

constexpr double poisson_ratio = 0.3
constexpr

Definition at line 61 of file elastic.cpp.

◆ shear_modulus_G

constexpr double shear_modulus_G = young_modulus / (2 * (1 + poisson_ratio))
constexpr

◆ SPACE_DIM

constexpr int SPACE_DIM
constexpr
Initial value:
=
#define EXECUTABLE_DIMENSION
Definition: plastic.cpp:10

[Define dimension]

Definition at line 28 of file elastic.cpp.

◆ young_modulus

constexpr double young_modulus = 1
constexpr

Definition at line 60 of file elastic.cpp.