v0.13.2
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
nonlinear_elastic.cpp File Reference
#include <MoFEM.hpp>
#include <MatrixFunction.hpp>
#include <HenckyOps.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 2 >
 
struct  ElementsAndOps< 3 >
 
struct  Example
 [Example] More...
 
struct  Monitor
 Monitor solution. More...
 

Typedefs

using EntData = EntitiesFieldData::EntData
 
using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using BoundaryEle = ElementsAndOps< SPACE_DIM >::BoundaryEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 
using PostProcEle = PostProcBrokenMeshInMoab< DomainEle >
 
using OpK = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradTensorGrad< 1, SPACE_DIM, SPACE_DIM, 1 >
 
using OpInternalForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesTensor< 1, SPACE_DIM, SPACE_DIM >
 
using DomainNaturalBC = NaturalBC< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >
 
using OpBodyForce = DomainNaturalBC::OpFlux< NaturalMeshsetType< BLOCKSET >, 1, SPACE_DIM >
 
using BoundaryNaturalBC = NaturalBC< BoundaryEleOp >::Assembly< PETSC >::LinearForm< GAUSS >
 
using OpForce = BoundaryNaturalBC::OpFlux< NaturalForceMeshsets, 1, SPACE_DIM >
 

Functions

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

Variables

constexpr int SPACE_DIM = 3
 
constexpr double young_modulus = 100
 
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...
 

Typedef Documentation

◆ BoundaryEle

Definition at line 30 of file nonlinear_elastic.cpp.

◆ BoundaryEleOp

Definition at line 32 of file nonlinear_elastic.cpp.

◆ BoundaryNaturalBC

using BoundaryNaturalBC = NaturalBC<BoundaryEleOp>::Assembly<PETSC>::LinearForm<GAUSS>

Definition at line 46 of file nonlinear_elastic.cpp.

◆ DomainEle

Definition at line 29 of file nonlinear_elastic.cpp.

◆ DomainEleOp

Definition at line 31 of file nonlinear_elastic.cpp.

◆ DomainNaturalBC

using DomainNaturalBC = NaturalBC<DomainEleOp>::Assembly<PETSC>::LinearForm<GAUSS>

Definition at line 41 of file nonlinear_elastic.cpp.

◆ EntData

Definition at line 28 of file nonlinear_elastic.cpp.

◆ OpBodyForce

Definition at line 43 of file nonlinear_elastic.cpp.

◆ OpForce

Definition at line 48 of file nonlinear_elastic.cpp.

◆ OpInternalForce

Definition at line 38 of file nonlinear_elastic.cpp.

◆ OpK

using OpK = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpGradTensorGrad<1, SPACE_DIM, SPACE_DIM, 1>

Definition at line 36 of file nonlinear_elastic.cpp.

◆ PostProcEle

Definition at line 34 of file nonlinear_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 408 of file nonlinear_elastic.cpp.

408 {
409
410 // Initialisation of MoFEM/PETSc and MOAB data structures
411 const char param_file[] = "param_file.petsc";
413
414 // Add logging channel for example
415 auto core_log = logging::core::get();
416 core_log->add_sink(
418 LogManager::setLog("EXAMPLE");
419 MOFEM_LOG_TAG("EXAMPLE", "example");
420
421 try {
422
423 //! [Register MoFEM discrete manager in PETSc]
424 DMType dm_name = "DMMOFEM";
425 CHKERR DMRegister_MoFEM(dm_name);
426 //! [Register MoFEM discrete manager in PETSc
427
428 //! [Create MoAB]
429 moab::Core mb_instance; ///< mesh database
430 moab::Interface &moab = mb_instance; ///< mesh database interface
431 //! [Create MoAB]
432
433 //! [Create MoFEM]
434 MoFEM::Core core(moab); ///< finite element database
435 MoFEM::Interface &m_field = core; ///< finite element database interface
436 //! [Create MoFEM]
437
438 //! [Example]
439 Example ex(m_field);
440 CHKERR ex.runProblem();
441 //! [Example]
442 }
444
446}
std::string param_file
#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:391
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
[Example]
Definition: plastic.cpp:141
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:300
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Definition: LogManager.cpp:346
static char help[]
[Check]

Variable Documentation

◆ bulk_modulus_K

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

Definition at line 52 of file nonlinear_elastic.cpp.

◆ help

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

[Check]

Definition at line 406 of file nonlinear_elastic.cpp.

◆ poisson_ratio

constexpr double poisson_ratio = 0.3
constexpr

Definition at line 51 of file nonlinear_elastic.cpp.

◆ shear_modulus_G

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

Definition at line 53 of file nonlinear_elastic.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 3
constexpr

Definition at line 26 of file nonlinear_elastic.cpp.

◆ young_modulus

constexpr double young_modulus = 100
constexpr

Definition at line 50 of file nonlinear_elastic.cpp.