v0.14.0
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 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< 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
 
constexpr int current_bit
 dofs bit used to do calculations More...
 
constexpr int skeleton_bit = 2 * start_bit + 2
 skeleton elemets 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 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 437 of file level_set.cpp.

437 {
438
439 // Initialisation of MoFEM/PETSc and MOAB data structures
440 const char param_file[] = "param_file.petsc";
442
443 try {
444
445 // Create MoAB database
446 moab::Core moab_core;
447 moab::Interface &moab = moab_core;
448
449 // Create MoFEM database and link it to MoAB
450 MoFEM::Core mofem_core(moab);
451 MoFEM::Interface &m_field = mofem_core;
452
453 // Register DM Manager
454 DMType dm_name = "DMMOFEM";
455 CHKERR DMRegister_MoFEM(dm_name);
456
457 // Add logging channel for example
458 auto core_log = logging::core::get();
459 core_log->add_sink(
461 LogManager::setLog("LevelSet");
462 MOFEM_LOG_TAG("LevelSet", "LevelSet");
463
464 LevelSet level_set(m_field);
465 CHKERR level_set.runProblem();
466 }
468
469 // finish work cleaning memory, getting statistics, etc.
471
472 return 0;
473}
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:389
#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:298
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Definition: LogManager.cpp:344

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
constexpr
Initial value:
=
2 * start_bit + 3
constexpr int start_bit
Definition: level_set.cpp:43

all bits for advection problem

Examples
level_set.cpp.

Definition at line 49 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 53 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 46 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 552 of file level_set.cpp.

◆ j

Definition at line 553 of file level_set.cpp.

◆ k

Definition at line 554 of file level_set.cpp.

◆ level_set_raw_ptr

LevelSet* level_set_raw_ptr = nullptr
Examples
level_set.cpp.

Definition at line 1883 of file level_set.cpp.

◆ nb_levels

constexpr int nb_levels = 3
constexpr
Examples
free_surface.cpp, and 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
constexpr
Initial value:
=
2 * start_bit + 4
Examples
level_set.cpp.

Definition at line 51 of file level_set.cpp.

◆ skeleton_bit

constexpr int skeleton_bit = 2 * start_bit + 2
constexpr

skeleton elemets bit

Examples
level_set.cpp.

Definition at line 48 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
constexpr
Initial value:
=
constexpr int nb_levels
Definition: level_set.cpp:41
Examples
level_set.cpp.

Definition at line 43 of file level_set.cpp.

◆ ts_ctx

MoFEM::TsCtx* ts_ctx