v0.10.0
Classes | Typedefs | Functions | Variables
dynamic_elastic.cpp File Reference
#include <MoFEM.hpp>
#include <OpPostProcElastic.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
 [Push operators to pipeline] More...
 

Typedefs

using EntData = DataForcesAndSourcesCore::EntData
 
using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using DomainEleOp = ElementsAndOps< SPACE_DIM >::DomainEleOp
 
using PostProcEle = ElementsAndOps< SPACE_DIM >::PostProcEle
 
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 >
 
using OpInternalForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesSymTensor< 1, SPACE_DIM, SPACE_DIM >
 
using OpBodyForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< 1, SPACE_DIM >
 
using OpInertiaForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 1, SPACE_DIM, 1 >
 

Functions

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

Variables

constexpr int SPACE_DIM = 2
 
constexpr double rho = 1
 
constexpr double omega = 2.4
 
constexpr double young_modulus = 1
 
constexpr double poisson_ratio = 0.25
 
constexpr double bulk_modulus_K = young_modulus / (3 * (1 - 2 * poisson_ratio))
 
constexpr double shear_modulus_G = young_modulus / (2 * (1 + poisson_ratio))
 
static doublets_time_ptr
 
static doublets_aa_ptr
 
static char help [] = "...\n\n"
 [Check] More...
 

Typedef Documentation

◆ DomainEle

Definition at line 44 of file dynamic_elastic.cpp.

◆ DomainEleOp

Definition at line 45 of file dynamic_elastic.cpp.

◆ EntData

Examples
dynamic_elastic.cpp.

Definition at line 43 of file dynamic_elastic.cpp.

◆ OpBodyForce

using OpBodyForce = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpSource<1, SPACE_DIM>
Examples
dynamic_elastic.cpp.

Definition at line 55 of file dynamic_elastic.cpp.

◆ OpInertiaForce

using OpInertiaForce = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpBaseTimesVector<1, SPACE_DIM, 1>
Examples
dynamic_elastic.cpp.

Definition at line 57 of file dynamic_elastic.cpp.

◆ OpInternalForce

using OpInternalForce = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpGradTimesSymTensor<1, SPACE_DIM, SPACE_DIM>
Examples
dynamic_elastic.cpp.

Definition at line 53 of file dynamic_elastic.cpp.

◆ OpK

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

Definition at line 49 of file dynamic_elastic.cpp.

◆ OpMass

using OpMass = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<1, SPACE_DIM>
Examples
dynamic_elastic.cpp.

Definition at line 51 of file dynamic_elastic.cpp.

◆ PostProcEle

Definition at line 46 of file dynamic_elastic.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)
Examples
dynamic_elastic.cpp.

Definition at line 411 of file dynamic_elastic.cpp.

411  {
412 
413  // Initialisation of MoFEM/PETSc and MOAB data structures
414  const char param_file[] = "param_file.petsc";
415  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
416 
417  // Add logging channel for example
418  auto core_log = logging::core::get();
419  core_log->add_sink(
420  LogManager::createSink(LogManager::getStrmWorld(), "EXAMPLE"));
421  LogManager::setLog("EXAMPLE");
422  MOFEM_LOG_TAG("EXAMPLE", "example");
423 
424  try {
425 
426  //! [Register MoFEM discrete manager in PETSc]
427  DMType dm_name = "DMMOFEM";
428  CHKERR DMRegister_MoFEM(dm_name);
429  //! [Register MoFEM discrete manager in PETSc
430 
431  //! [Create MoAB]
432  moab::Core mb_instance; ///< mesh database
433  moab::Interface &moab = mb_instance; ///< mesh database interface
434  //! [Create MoAB]
435 
436  //! [Create MoFEM]
437  MoFEM::Core core(moab); ///< finite element database
438  MoFEM::Interface &m_field = core; ///< finite element database insterface
439  //! [Create MoFEM]
440 
441  //! [Example]
442  Example ex(m_field);
443  CHKERR ex.runProblem();
444  //! [Example]
445  }
446  CATCH_ERRORS;
447 
449 }
Deprecated interface functions.
CoreTmp< 0 > Core
Definition: Core.hpp:1129
[Example]
#define MOFEM_LOG_TAG(channel, tag)
Tag channelTag channel tag is set until MOFEM_LOG_CHANNEL is called, then new tag can be set.
Definition: LogManager.hpp:334
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:60
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:48
#define CHKERR
Inline error check.
Definition: definitions.h:604
static char help[]
[Check]
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1943
Core (interface) class.
Definition: Core.hpp:77
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:441
std::string param_file
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:100

Variable Documentation

◆ bulk_modulus_K

constexpr double bulk_modulus_K = young_modulus / (3 * (1 - 2 * poisson_ratio))
Examples
dynamic_elastic.cpp.

Definition at line 63 of file dynamic_elastic.cpp.

◆ help

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

[Check]

Examples
dynamic_elastic.cpp.

Definition at line 409 of file dynamic_elastic.cpp.

◆ omega

constexpr double omega = 2.4
Examples
dynamic_elastic.cpp, and EshelbianOperators.cpp.

Definition at line 60 of file dynamic_elastic.cpp.

◆ poisson_ratio

constexpr double poisson_ratio = 0.25
Examples
dynamic_elastic.cpp.

Definition at line 62 of file dynamic_elastic.cpp.

◆ rho

constexpr double rho = 1
Examples
dynamic_elastic.cpp.

Definition at line 59 of file dynamic_elastic.cpp.

◆ shear_modulus_G

constexpr double shear_modulus_G = young_modulus / (2 * (1 + poisson_ratio))
Examples
dynamic_elastic.cpp.

Definition at line 64 of file dynamic_elastic.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 2
Examples
dynamic_elastic.cpp.

Definition at line 41 of file dynamic_elastic.cpp.

◆ ts_aa_ptr

double* ts_aa_ptr
static
Examples
dynamic_elastic.cpp.

Definition at line 70 of file dynamic_elastic.cpp.

◆ ts_time_ptr

double* ts_time_ptr
static
Examples
dynamic_elastic.cpp.

Definition at line 69 of file dynamic_elastic.cpp.

◆ young_modulus

constexpr double young_modulus = 1
Examples
dynamic_elastic.cpp.

Definition at line 61 of file dynamic_elastic.cpp.