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<FE_DIM>::DomainEle
 
using 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]
 
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
 
constexpr int skeleton_bit = 2 * start_bit + 2
 skeleton elements bit
 
constexpr int aggregate_bit
 all bits for advection problem
 
constexpr int projection_bit
 
constexpr int aggregate_projection_bit
 all bits for projection problem
 
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

Definition at line 43 of file level_set.cpp.

◆ DomianParentEle

◆ EntData

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[] )

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";
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(
488 LogManager::setLog("LevelSet");
489 MOFEM_LOG_TAG("LevelSet", "LevelSet");
490
491 LevelSet level_set(m_field);
492 CHKERR level_set.runProblem();
493 }
495
496 // finish work cleaning memory, getting statistics, etc.
498
499 return 0;
500}
std::string param_file
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
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.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
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.
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.

Variable Documentation

◆ A

constexpr AssemblyType A = AssemblyType::PETSC
constexpr

Definition at line 32 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:60

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
ContactOps.hpp, and level_set.cpp.

Definition at line 21 of file level_set.cpp.

◆ DIM2

constexpr int DIM2 = 1
constexpr
Examples
ContactOps.hpp, and 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, and shallow_wave.cpp.

Definition at line 19 of file level_set.cpp.

◆ G

constexpr IntegrationType G
constexpr
Initial value:
=
IntegrationType::GAUSS

Definition at line 33 of file level_set.cpp.

◆ help

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

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.

Definition at line 30 of file level_set.cpp.

◆ j

Definition at line 580 of file level_set.cpp.

◆ k

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
free_surface.cpp, and 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:
=
constexpr int nb_levels
Definition level_set.cpp:58
Examples
level_set.cpp.

Definition at line 60 of file level_set.cpp.

◆ ts_ctx

MoFEM::TsCtx* ts_ctx