v0.15.0
Loading...
Searching...
No Matches
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.
 
MoFEMErrorCode runCalcs (LevelSet &level_set, int l)
 Run calculations.
 
MoFEMErrorCode setAggregateBit (LevelSet &level_set, int l)
 Add bit to current element, so it aggregate all previious current elements.
 
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
Examples
level_set.cpp.

Definition at line 316 of file level_set.cpp.

317 : maxPtr(max_ptr) {}
boost::shared_ptr< double > maxPtr

Member Function Documentation

◆ getThreshold()

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

Implements LevelSet::WrapperClass.

Examples
level_set.cpp.

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.

Examples
level_set.cpp.

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.

Examples
level_set.cpp.

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 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
constexpr int current_bit
dofs bit used to do calculations
Definition level_set.cpp:63
constexpr int start_bit
Definition level_set.cpp:60
constexpr int aggregate_bit
all bits for advection problem
Definition level_set.cpp:66
FTensor::Index< 'l', 3 > l
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition Types.hpp:40
MoFEM::Interface & mField
integrate skeleton operators on khs
Managing BitRefLevels.
Managing BitRefLevels.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.

◆ setBits()

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

Set bit ref level to problem.

Implements LevelSet::WrapperClass.

Examples
level_set.cpp.

Definition at line 319 of file level_set.cpp.

319{ return 0; };

Member Data Documentation

◆ maxPtr

boost::shared_ptr<double> LevelSet::WrapperClassErrorProjection::maxPtr
private
Examples
level_set.cpp.

Definition at line 338 of file level_set.cpp.


The documentation for this struct was generated from the following file: