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"
 
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 23 of file between_meshes_dg_projection.cpp.

◆ DomainEleOp

Definition at line 24 of file between_meshes_dg_projection.cpp.

◆ EntData

Definition at line 25 of file between_meshes_dg_projection.cpp.

◆ OpDomainMass

Definition at line 33 of file between_meshes_dg_projection.cpp.

◆ OpDomainSource

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

Definition at line 36 of file between_meshes_dg_projection.cpp.

◆ PostProcFaceEle

Definition at line 27 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 576 of file between_meshes_dg_projection.cpp.

576 {
577
578 MoFEM::Core::Initialize(&argc, &argv, NULL, help);
579
580 try {
581
582 //! [Register MoFEM discrete manager in PETSc]
583 DMType dm_name = "DMMOFEM";
584 CHKERR DMRegister_MoFEM(dm_name);
585 //! [Register MoFEM discrete manager in PETSc]
586
587 //! [Create MoAB]
588 moab::Core mb_instance;
589 moab::Interface &moab = mb_instance;
590 //! [Create MoAB]
591
592 //! [Create MoFEM]
593 MoFEM::Core core(moab);
594 MoFEM::Interface &m_field = core;
595 //! [Create MoFEM]
596
597 //! [Execute DG Projection Test]
598 Example ex(m_field);
599 CHKERR ex.runProblem();
600 //! [Execute DG Projection Test]
601 }
603
605}
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 18 of file between_meshes_dg_projection.cpp.

◆ FIELD_DIM

constexpr int FIELD_DIM = 1
constexpr

Definition at line 19 of file between_meshes_dg_projection.cpp.

◆ FIELD_NAME

constexpr char FIELD_NAME[] = "U"
constexpr

Definition at line 17 of file between_meshes_dg_projection.cpp.

◆ fun

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

Definition at line 29 of file between_meshes_dg_projection.cpp.

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

◆ 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 21 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 70 of file between_meshes_dg_projection.cpp.

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

◆ SPACE_DIM

constexpr int SPACE_DIM = 2
constexpr

Definition at line 20 of file between_meshes_dg_projection.cpp.