v0.14.0
Public Member Functions | Private Attributes | List of all members
LevelSet::WrapperClassErrorProjection Struct Reference

Use peculated errors on all levels while mesh projection. More...

Inheritance diagram for LevelSet::WrapperClassErrorProjection:
[legend]
Collaboration diagram for LevelSet::WrapperClassErrorProjection:
[legend]

Public Member Functions

 WrapperClassErrorProjection (boost::shared_ptr< double > max_ptr)
 
MoFEMErrorCode setBits (LevelSet &level_set, int l)
 Set bit ref level to problem. More...
 
MoFEMErrorCode runCalcs (LevelSet &level_set, int l)
 Run calculations. More...
 
MoFEMErrorCode setAggregateBit (LevelSet &level_set, int l)
 Add bit to current element, so it aggregate all previious current elements. More...
 
double getThreshold (const double max)
 
- Public Member Functions inherited from LevelSet::WrapperClass
 WrapperClass ()=default
 

Private Attributes

boost::shared_ptr< doublemaxPtr
 

Detailed Description

Use peculated errors on all levels while mesh projection.

Definition at line 315 of file level_set.cpp.

Constructor & Destructor Documentation

◆ WrapperClassErrorProjection()

LevelSet::WrapperClassErrorProjection::WrapperClassErrorProjection ( boost::shared_ptr< double max_ptr)
inline

Definition at line 316 of file level_set.cpp.

317  : maxPtr(max_ptr) {}

Member Function Documentation

◆ getThreshold()

double LevelSet::WrapperClassErrorProjection::getThreshold ( const double  max)
inlinevirtual

Implements LevelSet::WrapperClass.

Definition at line 335 of file level_set.cpp.

335 { return 0.05 * (*maxPtr); }

◆ runCalcs()

MoFEMErrorCode LevelSet::WrapperClassErrorProjection::runCalcs ( LevelSet level_set,
int  l 
)
inlinevirtual

Run calculations.

Implements LevelSet::WrapperClass.

Definition at line 320 of file level_set.cpp.

320 { return 0; }

◆ setAggregateBit()

MoFEMErrorCode LevelSet::WrapperClassErrorProjection::setAggregateBit ( LevelSet level_set,
int  l 
)
inlinevirtual

Add bit to current element, so it aggregate all previious current elements.

Implements LevelSet::WrapperClass.

Definition at line 321 of file level_set.cpp.

321  {
322  auto bit_mng = level_set.mField.getInterface<BitRefManager>();
323  auto set_bit = [](auto l) { return BitRefLevel().set(l); };
325  Range level;
326  CHKERR bit_mng->getEntitiesByRefLevel(set_bit(start_bit + l),
327  BitRefLevel().set(), level);
329  ->synchroniseEntities(level);
330  CHKERR bit_mng->setNthBitRefLevel(current_bit, false);
331  CHKERR bit_mng->setNthBitRefLevel(level, current_bit, true);
332  CHKERR bit_mng->setNthBitRefLevel(level, aggregate_bit, true);
334  }

◆ setBits()

MoFEMErrorCode LevelSet::WrapperClassErrorProjection::setBits ( LevelSet level_set,
int  l 
)
inlinevirtual

Set bit ref level to problem.

Implements LevelSet::WrapperClass.

Definition at line 319 of file level_set.cpp.

319 { return 0; };

Member Data Documentation

◆ maxPtr

boost::shared_ptr<double> LevelSet::WrapperClassErrorProjection::maxPtr
private

Definition at line 338 of file level_set.cpp.


The documentation for this struct was generated from the following file:
MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Definition: UnknownInterface.hpp:93
LevelSet::WrapperClassErrorProjection::maxPtr
boost::shared_ptr< double > maxPtr
Definition: level_set.cpp:338
aggregate_bit
constexpr int aggregate_bit
all bits for advection problem
Definition: level_set.cpp:66
current_bit
constexpr int current_bit
dofs bit used to do calculations
Definition: level_set.cpp:63
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
start_bit
constexpr int start_bit
Definition: level_set.cpp:60
LevelSet::mField
MoFEM::Interface & mField
integrate skeleton operators on khs
Definition: level_set.cpp:346
Range
MoFEM::CommInterface
Managing BitRefLevels.
Definition: CommInterface.hpp:21
MoFEM::BitRefManager
Managing BitRefLevels.
Definition: BitRefManager.hpp:21
MoFEM::Types::BitRefLevel
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:40
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21