v0.15.0
Loading...
Searching...
No Matches
eigen_elastic.cpp File Reference
#include <MoFEM.hpp>
#include <slepceps.h>

Go to the source code of this file.

Classes

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

Typedefs

using DomainEle = ElementsAndOps<SPACE_DIM>::DomainEle
 
using PostProcEle = PostProcBrokenMeshInMoab<DomainEle>
 
using OpK
 
using OpMass
 

Functions

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

Variables

constexpr int SPACE_DIM
 
double rho = 7829e-12
 
double young_modulus = 207e3
 
double poisson_ratio = 0.33
 
double bulk_modulus_K = young_modulus / (3 * (1 - 2 * poisson_ratio))
 
double shear_modulus_G = young_modulus / (2 * (1 + poisson_ratio))
 
int order = 1
 
static char help [] = "...\n\n"
 [Check]
 

Typedef Documentation

◆ DomainEle

Definition at line 29 of file eigen_elastic.cpp.

◆ OpK

using OpK
Initial value:
Examples
PoissonOperators.hpp, eigen_elastic.cpp, and simple_elasticity.cpp.

Definition at line 33 of file eigen_elastic.cpp.

◆ OpMass

◆ PostProcEle

Definition at line 31 of file eigen_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 insterface

[Create MoFEM]

[Example]

[Example]

Definition at line 484 of file eigen_elastic.cpp.

484 {
485
486 // Initialisation of MoFEM/PETSc and MOAB data structures
487 const char param_file[] = "param_file.petsc";
488 SlepcInitialize(&argc, &argv, param_file, help);
489 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
490
491 // Add logging channel for example
492 auto core_log = logging::core::get();
493 core_log->add_sink(
495 LogManager::setLog("EXAMPLE");
496 MOFEM_LOG_TAG("EXAMPLE", "example");
497
498 try {
499
500 //! [Register MoFEM discrete manager in PETSc]
501 DMType dm_name = "DMMOFEM";
502 CHKERR DMRegister_MoFEM(dm_name);
503 //! [Register MoFEM discrete manager in PETSc
504
505 //! [Create MoAB]
506 moab::Core mb_instance; ///< mesh database
507 moab::Interface &moab = mb_instance; ///< mesh database interface
508 //! [Create MoAB]
509
510 //! [Create MoFEM]
511 MoFEM::Core core(moab); ///< finite element database
512 MoFEM::Interface &m_field = core; ///< finite element database insterface
513 //! [Create MoFEM]
514
515 //! [Example]
516 Example ex(m_field);
517 CHKERR ex.runProblem();
518 //! [Example]
519 }
521
522 SlepcFinalize();
524}
#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:216
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.

Variable Documentation

◆ bulk_modulus_K

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

Definition at line 42 of file eigen_elastic.cpp.

◆ help

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

[Check]

Definition at line 482 of file eigen_elastic.cpp.

◆ order

int order = 1

Definition at line 45 of file eigen_elastic.cpp.

◆ poisson_ratio

double poisson_ratio = 0.33

Definition at line 40 of file eigen_elastic.cpp.

◆ rho

double rho = 7829e-12

Definition at line 38 of file eigen_elastic.cpp.

◆ shear_modulus_G

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

Definition at line 43 of file eigen_elastic.cpp.

◆ SPACE_DIM

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

Definition at line 25 of file eigen_elastic.cpp.

◆ young_modulus

double young_modulus = 207e3

Definition at line 39 of file eigen_elastic.cpp.