v0.16.0
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
elastic_adaptive.cpp File Reference

elastic adaptive example More...

#include <MoFEM.hpp>
#include <ElasticAdaptiveExample.hpp>

Go to the source code of this file.

Classes

struct  DomainBCs
 [Define entities] More...
 
struct  BoundaryBCs
 Boundary conditions marker. More...
 

Typedefs

using EntData = EntitiesFieldData::EntData
 [Define entities]
 
using DomainEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::DomainEle
 
using BoundaryEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::BoundaryEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 
using EleOnSide = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::FaceSideEle
 
using SideEleOp = EleOnSide::UserDataOperator
 
using DomainRhsBCs = NaturalBC< DomainEleOp >::Assembly< A >::LinearForm< I >
 
using OpDomainRhsBCs = DomainRhsBCs::OpFlux< DomainBCs, 1, SPACE_DIM >
 
using BoundaryRhsBCs = NaturalBC< BoundaryEleOp >::Assembly< A >::LinearForm< I >
 
using OpBoundaryRhsBCs = BoundaryRhsBCs::OpFlux< BoundaryBCs, 1, SPACE_DIM >
 
using BoundaryLhsBCs = NaturalBC< BoundaryEleOp >::Assembly< A >::BiLinearForm< I >
 
using OpBoundaryLhsBCs = BoundaryLhsBCs::OpFlux< BoundaryBCs, 1, SPACE_DIM >
 
using PostProcEleDomain = PostProcBrokenMeshInMoabBaseCont< DomainEle >
 
using PostProcEleBdy = PostProcBrokenMeshInMoabBaseCont< BoundaryEle >
 
using SideEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::FaceSideEle
 

Functions

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

Variables

constexpr int BASE_DIM = 1
 
constexpr int SPACE_DIM = 3
 [Define dimension]
 
constexpr AssemblyType A = AssemblyType::PETSC
 [Define dimension]
 
constexpr IntegrationType I = IntegrationType::GAUSS
 
static char help [] = "...\n\n"
 

Detailed Description

elastic adaptive example

Version
0.15.0
Date
2025-10-08

Definition in file elastic_adaptive.cpp.

Typedef Documentation

◆ BoundaryEle

Definition at line 27 of file elastic_adaptive.cpp.

◆ BoundaryEleOp

Definition at line 30 of file elastic_adaptive.cpp.

◆ BoundaryLhsBCs

Definition at line 42 of file elastic_adaptive.cpp.

◆ BoundaryRhsBCs

Definition at line 40 of file elastic_adaptive.cpp.

◆ DomainEle

Definition at line 26 of file elastic_adaptive.cpp.

◆ DomainEleOp

Definition at line 29 of file elastic_adaptive.cpp.

◆ DomainRhsBCs

Definition at line 38 of file elastic_adaptive.cpp.

◆ EleOnSide

Definition at line 31 of file elastic_adaptive.cpp.

◆ EntData

[Define entities]

Definition at line 25 of file elastic_adaptive.cpp.

◆ OpBoundaryLhsBCs

Definition at line 43 of file elastic_adaptive.cpp.

◆ OpBoundaryRhsBCs

Definition at line 41 of file elastic_adaptive.cpp.

◆ OpDomainRhsBCs

Definition at line 39 of file elastic_adaptive.cpp.

◆ PostProcEleBdy

Definition at line 46 of file elastic_adaptive.cpp.

◆ PostProcEleDomain

Definition at line 45 of file elastic_adaptive.cpp.

◆ SideEle

Definition at line 48 of file elastic_adaptive.cpp.

◆ SideEleOp

Definition at line 32 of file elastic_adaptive.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 56 of file elastic_adaptive.cpp.

56 {
57
58 // Initialisation of MoFEM/PETSc and MOAB data structures
59 const char param_file[] = "param_file.petsc";
60 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
61
62 auto core_log = logging::core::get();
63 core_log->add_sink(
65
66 core_log->add_sink(
68 LogManager::setLog("FieldEvaluator");
69 MOFEM_LOG_TAG("FieldEvaluator", "field_eval");
70
71 try {
72
73 //! [Register MoFEM discrete manager in PETSc]
74 DMType dm_name = "DMMOFEM";
75 CHKERR DMRegister_MoFEM(dm_name);
76 DMType dm_name_mg = "DMMOFEM_MG";
78 //! [Register MoFEM discrete manager in PETSc
79
80 //! [Create MoAB]
81 moab::Core mb_instance; ///< mesh database
82 moab::Interface &moab = mb_instance; ///< mesh database interface
83 //! [Create MoAB]
84
85 //! [Create MoFEM]
86 MoFEM::Core core(moab); ///< finite element database
87 MoFEM::Interface &m_field = core; ///< finite element database interface
88 //! [Create MoFEM]
89
90 //! [Example]
91 ElasticAdaptiveExample ex(m_field);
92 CHKERR ex.runProblem();
93 //! [Example]
94 }
96
98}
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
static char help[]
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
MoFEMErrorCode DMRegister_MGViaApproxOrders(const char sname[])
Register DM for Multi-Grid via approximation orders.
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
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.
static boost::shared_ptr< std::ostream > getStrmSync()
Get the strm sync object.

Variable Documentation

◆ A

constexpr AssemblyType A = AssemblyType::PETSC
constexpr

[Define dimension]

Definition at line 20 of file elastic_adaptive.cpp.

◆ BASE_DIM

constexpr int BASE_DIM = 1
constexpr

Definition at line 15 of file elastic_adaptive.cpp.

◆ help

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

Definition at line 54 of file elastic_adaptive.cpp.

◆ I

constexpr IntegrationType I = IntegrationType::GAUSS
constexpr

Definition at line 22 of file elastic_adaptive.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 3
constexpr

[Define dimension]

Definition at line 18 of file elastic_adaptive.cpp.