v0.14.0
Classes | Typedefs | Functions | Variables
level_set.cpp File Reference
#include <MoFEM.hpp>

Go to the source code of this file.

Classes

struct  LevelSet
 
struct  LevelSet::SideData
 data structure carrying information on skeleton on both sides. More...
 
struct  LevelSet::WrapperClass
 Wrapper executing stages while mesh refinement. More...
 
struct  LevelSet::WrapperClassInitalSolution
 Used to execute inital mesh approximation while mesh refinement. More...
 
struct  LevelSet::WrapperClassErrorProjection
 Use peculated errors on all levels while mesh projection. More...
 
struct  LevelSet::OpRhsDomain
 
struct  LevelSet::OpLhsDomain
 
struct  LevelSet::OpRhsSkeleton
 
struct  LevelSet::OpLhsSkeleton
 

Typedefs

using EntData = EntitiesFieldData::EntData
 
using DomainEle = PipelineManager::ElementsAndOpsByDim< FE_DIM >::DomainEle
 
using DomianParentEle = PipelineManager::ElementsAndOpsByDim< FE_DIM >::DomianParentEle
 
using BoundaryEle = PipelineManager::ElementsAndOpsByDim< FE_DIM >::BoundaryEle
 
using FaceSideEle = PipelineManager::ElementsAndOpsByDim< FE_DIM >::FaceSideEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 
using FaceSideEleOp = FaceSideEle::UserDataOperator
 
using PostProcEle = PostProcBrokenMeshInMoab< DomainEle >
 

Functions

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

Variables

static char help [] = "...\n\n"
 
constexpr int FE_DIM = EXECUTABLE_DIMENSION
 [Define dimension] More...
 
constexpr int SPACE_DIM = FE_DIM
 
constexpr int DIM1 = 1
 
constexpr int DIM2 = 1
 
FTensor::Index< 'I', DIM1I
 
FTensor::Index< 'J', DIM1J
 
constexpr AssemblyType A = AssemblyType::PETSC
 
constexpr IntegrationType G
 
constexpr FieldSpace potential_velocity_space = FE_DIM == 2 ? H1 : HCURL
 
constexpr size_t potential_velocity_field_dim = FE_DIM == 2 ? 1 : 3
 
constexpr bool debug = true
 
constexpr int nb_levels = 3
 
constexpr int start_bit
 
constexpr int current_bit
 dofs bit used to do calculations More...
 
constexpr int skeleton_bit = 2 * start_bit + 2
 skeleton elements bit More...
 
constexpr int aggregate_bit
 all bits for advection problem More...
 
constexpr int projection_bit
 
constexpr int aggregate_projection_bit
 all bits for projection problem More...
 
FTensor::Index< 'i', SPACE_DIMi
 
FTensor::Index< 'j', SPACE_DIMj
 
FTensor::Index< 'k', SPACE_DIMk
 
LevelSetlevel_set_raw_ptr = nullptr
 
MoFEM::TsCtxts_ctx
 

Typedef Documentation

◆ BoundaryEle

Definition at line 40 of file level_set.cpp.

◆ BoundaryEleOp

Definition at line 44 of file level_set.cpp.

◆ DomainEle

Definition at line 37 of file level_set.cpp.

◆ DomainEleOp

Examples
level_set.cpp.

Definition at line 43 of file level_set.cpp.

◆ DomianParentEle

Definition at line 39 of file level_set.cpp.

◆ EntData

Examples
level_set.cpp.

Definition at line 36 of file level_set.cpp.

◆ FaceSideEle

Definition at line 41 of file level_set.cpp.

◆ FaceSideEleOp

Definition at line 45 of file level_set.cpp.

◆ PostProcEle

Definition at line 47 of file level_set.cpp.

Function Documentation

◆ main()

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

Definition at line 464 of file level_set.cpp.

464  {
465 
466  // Initialisation of MoFEM/PETSc and MOAB data structures
467  const char param_file[] = "param_file.petsc";
468  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
469 
470  try {
471 
472  // Create MoAB database
473  moab::Core moab_core;
474  moab::Interface &moab = moab_core;
475 
476  // Create MoFEM database and link it to MoAB
477  MoFEM::Core mofem_core(moab);
478  MoFEM::Interface &m_field = mofem_core;
479 
480  // Register DM Manager
481  DMType dm_name = "DMMOFEM";
482  CHKERR DMRegister_MoFEM(dm_name);
483 
484  // Add logging channel for example
485  auto core_log = logging::core::get();
486  core_log->add_sink(
487  LogManager::createSink(LogManager::getStrmWorld(), "LevelSet"));
488  LogManager::setLog("LevelSet");
489  MOFEM_LOG_TAG("LevelSet", "LevelSet");
490 
491  LevelSet level_set(m_field);
492  CHKERR level_set.runProblem();
493  }
494  CATCH_ERRORS;
495 
496  // finish work cleaning memory, getting statistics, etc.
498 
499  return 0;
500 }

Variable Documentation

◆ A

constexpr AssemblyType A = AssemblyType::PETSC
constexpr
Examples
level_set.cpp.

Definition at line 32 of file level_set.cpp.

◆ aggregate_bit

constexpr int aggregate_bit
constexpr
Initial value:
=
2 * start_bit + 3

all bits for advection problem

Examples
level_set.cpp.

Definition at line 66 of file level_set.cpp.

◆ aggregate_projection_bit

constexpr int aggregate_projection_bit
constexpr
Initial value:
=
2 * start_bit + 5

all bits for projection problem

Examples
level_set.cpp.

Definition at line 70 of file level_set.cpp.

◆ current_bit

constexpr int current_bit
constexpr
Initial value:
=
2 * start_bit + 1

dofs bit used to do calculations

Examples
level_set.cpp.

Definition at line 63 of file level_set.cpp.

◆ debug

constexpr bool debug = true
constexpr
Examples
level_set.cpp.

Definition at line 53 of file level_set.cpp.

◆ DIM1

constexpr int DIM1 = 1
constexpr
Examples
level_set.cpp.

Definition at line 21 of file level_set.cpp.

◆ DIM2

constexpr int DIM2 = 1
constexpr
Examples
level_set.cpp.

Definition at line 22 of file level_set.cpp.

◆ FE_DIM

constexpr int FE_DIM = EXECUTABLE_DIMENSION
constexpr

[Define dimension]

Examples
level_set.cpp.

Definition at line 19 of file level_set.cpp.

◆ G

constexpr IntegrationType G
constexpr
Initial value:
Examples
level_set.cpp.

Definition at line 33 of file level_set.cpp.

◆ help

char help[] = "...\n\n"
static
Examples
level_set.cpp.

Definition at line 14 of file level_set.cpp.

◆ I

Examples
level_set.cpp.

Definition at line 29 of file level_set.cpp.

◆ i

Examples
level_set.cpp.

Definition at line 579 of file level_set.cpp.

◆ J

Examples
level_set.cpp, Remodeling.cpp, and Remodeling.hpp.

Definition at line 30 of file level_set.cpp.

◆ j

Examples
level_set.cpp.

Definition at line 580 of file level_set.cpp.

◆ k

Examples
level_set.cpp.

Definition at line 581 of file level_set.cpp.

◆ level_set_raw_ptr

LevelSet* level_set_raw_ptr = nullptr
Examples
level_set.cpp.

Definition at line 1931 of file level_set.cpp.

◆ nb_levels

constexpr int nb_levels = 3
constexpr
Examples
level_set.cpp.

Definition at line 58 of file level_set.cpp.

◆ potential_velocity_field_dim

constexpr size_t potential_velocity_field_dim = FE_DIM == 2 ? 1 : 3
constexpr
Examples
level_set.cpp.

Definition at line 50 of file level_set.cpp.

◆ potential_velocity_space

constexpr FieldSpace potential_velocity_space = FE_DIM == 2 ? H1 : HCURL
constexpr
Examples
level_set.cpp.

Definition at line 49 of file level_set.cpp.

◆ projection_bit

constexpr int projection_bit
constexpr
Initial value:
=
2 * start_bit + 4
Examples
level_set.cpp.

Definition at line 68 of file level_set.cpp.

◆ skeleton_bit

constexpr int skeleton_bit = 2 * start_bit + 2
constexpr

skeleton elements bit

Examples
level_set.cpp.

Definition at line 65 of file level_set.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = FE_DIM
constexpr
Examples
level_set.cpp.

Definition at line 20 of file level_set.cpp.

◆ start_bit

constexpr int start_bit
constexpr
Initial value:
=
Examples
level_set.cpp.

Definition at line 60 of file level_set.cpp.

◆ ts_ctx

MoFEM::TsCtx* ts_ctx
MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
help
static char help[]
Definition: level_set.cpp:14
nb_levels
constexpr int nb_levels
Definition: level_set.cpp:58
MoFEM::CoreTmp< 0 >::Finalize
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:112
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:2010
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
start_bit
constexpr int start_bit
Definition: level_set.cpp:60
MoFEM::DMRegister_MoFEM
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:43
MoFEM::GAUSS
@ GAUSS
Definition: FormsIntegrators.hpp:136
MOFEM_LOG_TAG
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
MoFEM::CoreTmp< 0 >::Initialize
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
CATCH_ERRORS
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:385
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1148
LevelSet
Definition: level_set.cpp:73