v0.16.0
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
eigen_elastic.cpp File Reference
#include <MoFEM.hpp>
#include <slepceps.h>

Go to the source code of this file.

Classes

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

Typedefs

using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using PostProcEle = PostProcBrokenMeshInMoab< DomainEle >
 
using OpDomainGradGrad = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradSymTensorGrad< 1, SPACE_DIM, SPACE_DIM, 0 >
 
using OpDomainMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM >
 

Functions

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

Variables

constexpr int SPACE_DIM
 
double rho = 7829e-9
 [Operators_definition]
 
double young_modulus = 2.07e8
 
double poisson_ratio = 0.33
 
double bulk_modulus_K
 
double shear_modulus_G
 
int order = 2
 [Physical_parameters]
 
static char help [] = "...\n\n"
 [Check]
 

Typedef Documentation

◆ DomainEle

Definition at line 29 of file eigen_elastic.cpp.

◆ DomainEleOp

Definition at line 30 of file eigen_elastic.cpp.

◆ OpDomainGradGrad

using OpDomainGradGrad = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpGradSymTensorGrad<1, SPACE_DIM, SPACE_DIM, 0>

Definition at line 33 of file eigen_elastic.cpp.

◆ OpDomainMass

Definition at line 36 of file eigen_elastic.cpp.

◆ PostProcEle

Definition at line 31 of file eigen_elastic.cpp.

Function Documentation

◆ main()

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

[Main]

[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 insterface

[Create MoFEM]

[Example]

[Example]

Definition at line 474 of file eigen_elastic.cpp.

474 {
475
476 // Initialisation of MoFEM/PETSc and MOAB data structures
477 const char param_file[] = "param_file.petsc";
478 SlepcInitialize(&argc, &argv, param_file, help);
479 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
480
481 // Add logging channel for example
482 auto core_log = logging::core::get();
483 core_log->add_sink(
485 LogManager::setLog("EXAMPLE");
486 MOFEM_LOG_TAG("EXAMPLE", "example");
487
488 try {
489
490 //! [Register MoFEM discrete manager in PETSc]
491 DMType dm_name = "DMMOFEM";
492 CHKERR DMRegister_MoFEM(dm_name);
493 //! [Register MoFEM discrete manager in PETSc
494
495 //! [Create MoAB]
496 moab::Core mb_instance; ///< mesh database
497 moab::Interface &moab = mb_instance; ///< mesh database interface
498 //! [Create MoAB]
499
500 //! [Create MoFEM]
501 MoFEM::Core core(moab); ///< finite element database
502 MoFEM::Interface &m_field = core; ///< finite element database insterface
503 //! [Create MoFEM]
504
505 //! [Example]
506 Example ex(m_field);
507 CHKERR ex.runProblem();
508 //! [Example]
509 }
511
512 SlepcFinalize();
514}
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
static char help[]
[Check]
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
[Example]
Definition plastic.cpp:217
Core (interface) class.
Definition Core.hpp:83
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition Core.cpp:68
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:123
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.

Variable Documentation

◆ bulk_modulus_K

double bulk_modulus_K

Definition at line 45 of file eigen_elastic.cpp.

◆ help

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

[Check]

Definition at line 471 of file eigen_elastic.cpp.

◆ order

int order = 2

[Physical_parameters]

Definition at line 49 of file eigen_elastic.cpp.

◆ poisson_ratio

double poisson_ratio = 0.33

Definition at line 43 of file eigen_elastic.cpp.

◆ rho

double rho = 7829e-9

[Operators_definition]

[Physical_parameters]

Definition at line 41 of file eigen_elastic.cpp.

◆ shear_modulus_G

double shear_modulus_G

Definition at line 46 of file eigen_elastic.cpp.

◆ SPACE_DIM

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

Definition at line 26 of file eigen_elastic.cpp.

◆ young_modulus

double young_modulus = 2.07e8

Definition at line 42 of file eigen_elastic.cpp.