v0.13.2
Loading...
Searching...
No Matches
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 refinment. 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< SPACE_DIM >::DomainEle
 
using DomianParentEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::DomianParentEle
 
using BoundaryEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::BoundaryEle
 
using FaceSideEle = PipelineManager::ElementsAndOpsByDim< SPACE_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 SPACE_DIM = EXECUTABLE_DIMENSION
 [Define dimension] More...
 
constexpr AssemblyType A = AssemblyType::PETSC
 
constexpr IntegrationType I
 
constexpr FieldSpace potential_velocity_space = SPACE_DIM == 2 ? H1 : HCURL
 
constexpr size_t potential_velocity_field_dim = SPACE_DIM == 2 ? 1 : 3
 
constexpr bool debug = false
 
constexpr int nb_levels = 3
 
constexpr int start_bit = nb_levels + 1
 
constexpr int current_bit = 2 * start_bit + 1
 
constexpr int skeleton_bit = 2 * start_bit + 2
 
constexpr int aggregate_bit = 2 * start_bit + 3
 
constexpr int projection_bit = 2 * start_bit + 4
 
constexpr int aggregate_projection_bit = 2 * start_bit + 5
 
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 26 of file level_set.cpp.

◆ BoundaryEleOp

Definition at line 32 of file level_set.cpp.

◆ DomainEle

Definition at line 23 of file level_set.cpp.

◆ DomainEleOp

Examples
level_set.cpp.

Definition at line 31 of file level_set.cpp.

◆ DomianParentEle

Definition at line 24 of file level_set.cpp.

◆ EntData

Definition at line 22 of file level_set.cpp.

◆ FaceSideEle

Definition at line 28 of file level_set.cpp.

◆ FaceSideEleOp

Definition at line 33 of file level_set.cpp.

◆ PostProcEle

Definition at line 35 of file level_set.cpp.

Function Documentation

◆ main()

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

Definition at line 432 of file level_set.cpp.

432 {
433
434 // Initialisation of MoFEM/PETSc and MOAB data structures
435 const char param_file[] = "param_file.petsc";
437
438 try {
439
440 // Create MoAB database
441 moab::Core moab_core;
442 moab::Interface &moab = moab_core;
443
444 // Create MoFEM database and link it to MoAB
445 MoFEM::Core mofem_core(moab);
446 MoFEM::Interface &m_field = mofem_core;
447
448 // Register DM Manager
449 DMType dm_name = "DMMOFEM";
450 CHKERR DMRegister_MoFEM(dm_name);
451
452 // Add logging channel for example
453 auto core_log = logging::core::get();
454 core_log->add_sink(
456 LogManager::setLog("LevelSet");
457 MOFEM_LOG_TAG("LevelSet", "LevelSet");
458
459 LevelSet level_set(m_field);
460 CHKERR level_set.runProblem();
461 }
463
464 // finish work cleaning memory, getting statistics, etc.
466
467 return 0;
468}
std::string param_file
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
#define CHKERR
Inline error check.
Definition: definitions.h:535
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:47
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
Definition: LogManager.cpp:391
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
static char help[]
Definition: level_set.cpp:14
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:112
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
Definition: LogManager.cpp:300
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Definition: LogManager.cpp:346

Variable Documentation

◆ A

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

Definition at line 18 of file level_set.cpp.

◆ aggregate_bit

constexpr int aggregate_bit = 2 * start_bit + 3
constexpr
Examples
level_set.cpp.

Definition at line 47 of file level_set.cpp.

◆ aggregate_projection_bit

constexpr int aggregate_projection_bit = 2 * start_bit + 5
constexpr
Examples
level_set.cpp.

Definition at line 49 of file level_set.cpp.

◆ current_bit

constexpr int current_bit = 2 * start_bit + 1
constexpr
Examples
level_set.cpp.

Definition at line 45 of file level_set.cpp.

◆ debug

constexpr bool debug = false
constexpr
Examples
level_set.cpp.

Definition at line 40 of file level_set.cpp.

◆ help

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

Definition at line 14 of file level_set.cpp.

◆ I

constexpr IntegrationType I
constexpr
Initial value:
=
IntegrationType::GAUSS
Examples
level_set.cpp.

Definition at line 19 of file level_set.cpp.

◆ i

Examples
level_set.cpp.

Definition at line 544 of file level_set.cpp.

◆ j

Definition at line 545 of file level_set.cpp.

◆ k

Definition at line 546 of file level_set.cpp.

◆ level_set_raw_ptr

LevelSet* level_set_raw_ptr = nullptr
Examples
level_set.cpp.

Definition at line 1875 of file level_set.cpp.

◆ nb_levels

constexpr int nb_levels = 3
constexpr
Examples
level_set.cpp.

Definition at line 41 of file level_set.cpp.

◆ potential_velocity_field_dim

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

Definition at line 38 of file level_set.cpp.

◆ potential_velocity_space

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

Definition at line 37 of file level_set.cpp.

◆ projection_bit

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

Definition at line 48 of file level_set.cpp.

◆ skeleton_bit

constexpr int skeleton_bit = 2 * start_bit + 2
constexpr
Examples
level_set.cpp.

Definition at line 46 of file level_set.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = EXECUTABLE_DIMENSION
constexpr

[Define dimension]

Examples
level_set.cpp.

Definition at line 17 of file level_set.cpp.

◆ start_bit

constexpr int start_bit = nb_levels + 1
constexpr
Examples
level_set.cpp.

Definition at line 43 of file level_set.cpp.

◆ ts_ctx

MoFEM::TsCtx* ts_ctx