v0.15.0
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
between_meshes_dg_projection.cpp File Reference
#include <MoFEM.hpp>

Go to the source code of this file.

Classes

struct  Example
 [Example] More...
 
struct  Example::CommonData
 [Example] More...
 
struct  Example::OpError< FIELD_DIM >
 

Typedefs

using DomainEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::DomainEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using EntData = EntitiesFieldData::EntData
 
using PostProcFaceEle = PostProcBrokenMeshInMoab< DomainEle >
 
using OpDomainMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< BASE_DIM, FIELD_DIM >
 
using OpDomainSource = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< BASE_DIM, FIELD_DIM >
 

Functions

int main (int argc, char *argv[])
 [Re-setup problem after mesh modification]
 

Variables

static char help []
 
constexpr char FIELD_NAME_U [] = "U"
 
constexpr char FIELD_NAME_S [] = "S"
 
constexpr int BASE_DIM = 1
 
constexpr int FIELD_DIM = 1
 
constexpr int SPACE_DIM = 2
 
constexpr int order = 2
 
auto fun
 
auto save_range
 

Typedef Documentation

◆ DomainEle

Definition at line 24 of file between_meshes_dg_projection.cpp.

◆ DomainEleOp

Definition at line 25 of file between_meshes_dg_projection.cpp.

◆ EntData

Definition at line 26 of file between_meshes_dg_projection.cpp.

◆ OpDomainMass

Definition at line 34 of file between_meshes_dg_projection.cpp.

◆ OpDomainSource

using OpDomainSource = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpSource<BASE_DIM, FIELD_DIM>

Definition at line 37 of file between_meshes_dg_projection.cpp.

◆ PostProcFaceEle

Definition at line 28 of file between_meshes_dg_projection.cpp.

Function Documentation

◆ main()

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

[Re-setup problem after mesh modification]

[Register MoFEM discrete manager in PETSc]

[Register MoFEM discrete manager in PETSc]

[Create MoAB]

[Create MoAB]

[Create MoFEM]

[Create MoFEM]

[Execute DG Projection Test]

[Execute DG Projection Test]

Definition at line 804 of file between_meshes_dg_projection.cpp.

804 {
805
806 MoFEM::Core::Initialize(&argc, &argv, NULL, help);
807
808 try {
809
810 //! [Register MoFEM discrete manager in PETSc]
811 DMType dm_name = "DMMOFEM";
812 CHKERR DMRegister_MoFEM(dm_name);
813 //! [Register MoFEM discrete manager in PETSc]
814
815 //! [Create MoAB]
816 moab::Core mb_instance;
817 moab::Interface &moab = mb_instance;
818 //! [Create MoAB]
819
820 //! [Create MoFEM]
821 MoFEM::Core core(moab);
822 MoFEM::Interface &m_field = core;
823 //! [Create MoFEM]
824
825 //! [Execute DG Projection Test]
826 Example ex(m_field);
827 CHKERR ex.runProblem();
828 //! [Execute DG Projection Test]
829 }
831
833}
static char help[]
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
[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.

Variable Documentation

◆ BASE_DIM

constexpr int BASE_DIM = 1
constexpr

Definition at line 19 of file between_meshes_dg_projection.cpp.

◆ FIELD_DIM

constexpr int FIELD_DIM = 1
constexpr

Definition at line 20 of file between_meshes_dg_projection.cpp.

◆ FIELD_NAME_S

constexpr char FIELD_NAME_S[] = "S"
constexpr

◆ FIELD_NAME_U

constexpr char FIELD_NAME_U[] = "U"
constexpr

◆ fun

auto fun
Initial value:
= [](const double x, const double y, const double z) {
return x + y + x * x + y * y;
}

Definition at line 30 of file between_meshes_dg_projection.cpp.

30 {
31 return x + y + x * x + y * y;
32};

◆ help

char help[]
static
Initial value:
= "DG Projection Test - validates discontinuous Galerkin "
"projection accuracy\n\n"

Definition at line 14 of file between_meshes_dg_projection.cpp.

◆ order

constexpr int order = 2
constexpr

Definition at line 22 of file between_meshes_dg_projection.cpp.

◆ save_range

auto save_range
Initial value:
= [](moab::Interface &moab, const std::string name,
const Range r, std::vector<Tag> tags = {}) {
auto out_meshset = get_temp_meshset_ptr(moab);
CHKERR moab.add_entities(*out_meshset, r);
if (r.size()) {
CHKERR moab.write_file(name.c_str(), "VTK", "", out_meshset->get_ptr(), 1,
tags.data(), tags.size());
} else {
MOFEM_LOG("SELF", Sev::warning) << "Empty range for " << name;
}
}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MOFEM_LOG(channel, severity)
Log.
auto get_temp_meshset_ptr(moab::Interface &moab)
Create smart pointer to temporary meshset.

Definition at line 73 of file between_meshes_dg_projection.cpp.

74 {}) {
76 auto out_meshset = get_temp_meshset_ptr(moab);
77 CHKERR moab.add_entities(*out_meshset, r);
78 if (r.size()) {
79 CHKERR moab.write_file(name.c_str(), "VTK", "", out_meshset->get_ptr(), 1,
80 tags.data(), tags.size());
81 } else {
82 MOFEM_LOG("SELF", Sev::warning) << "Empty range for " << name;
83 }
85};
int r
Definition sdf.py:8

◆ SPACE_DIM

constexpr int SPACE_DIM = 2
constexpr

Definition at line 21 of file between_meshes_dg_projection.cpp.