v0.13.1
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 >
 
struct  ElementsAndOps< 2 >
 
struct  ElementsAndOps< 3 >
 
struct  Example
 [Example] More...
 

Typedefs

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

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] More...
 

Detailed Description

\FSI eigen_elastic.cpp

Calculate natural frequencies in 2d and 3d problems.

Definition in file eigen_elastic.cpp.

Typedef Documentation

◆ DomainEle

Definition at line 29 of file eigen_elastic.cpp.

◆ DomainEleOp

Definition at line 30 of file eigen_elastic.cpp.

◆ EntData

Definition at line 28 of file eigen_elastic.cpp.

◆ OpK

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

Definition at line 33 of file eigen_elastic.cpp.

◆ OpMass

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

Definition at line 35 of file eigen_elastic.cpp.

◆ 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 489 of file eigen_elastic.cpp.

489 {
490
491 // Initialisation of MoFEM/PETSc and MOAB data structures
492 const char param_file[] = "param_file.petsc";
493 SlepcInitialize(&argc, &argv, param_file, help);
495
496 // Add logging channel for example
497 auto core_log = logging::core::get();
498 core_log->add_sink(
500 LogManager::setLog("EXAMPLE");
501 MOFEM_LOG_TAG("EXAMPLE", "example");
502
503 try {
504
505 //! [Register MoFEM discrete manager in PETSc]
506 DMType dm_name = "DMMOFEM";
507 CHKERR DMRegister_MoFEM(dm_name);
508 //! [Register MoFEM discrete manager in PETSc
509
510 //! [Create MoAB]
511 moab::Core mb_instance; ///< mesh database
512 moab::Interface &moab = mb_instance; ///< mesh database interface
513 //! [Create MoAB]
514
515 //! [Create MoFEM]
516 MoFEM::Core core(moab); ///< finite element database
517 MoFEM::Interface &m_field = core; ///< finite element database insterface
518 //! [Create MoFEM]
519
520 //! [Example]
521 Example ex(m_field);
522 CHKERR ex.runProblem();
523 //! [Example]
524 }
526
527 SlepcFinalize();
529}
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]
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:47
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
Definition: LogManager.cpp:364
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:332
[Example]
Definition: plastic.cpp:137
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:279
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Definition: LogManager.cpp:323

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 487 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

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

Definition at line 25 of file eigen_elastic.cpp.

◆ young_modulus

double young_modulus = 207e3

Definition at line 39 of file eigen_elastic.cpp.