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

Used to execute inital mesh approximation while mesh refinement. More...

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

Public Member Functions

 WrapperClassInitalSolution (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

Used to execute inital mesh approximation while mesh refinement.

Definition at line 266 of file level_set.cpp.

Constructor & Destructor Documentation

◆ WrapperClassInitalSolution()

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

Definition at line 268 of file level_set.cpp.

269  : WrapperClass(), maxPtr(max_ptr) {}

Member Function Documentation

◆ getThreshold()

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

Implements LevelSet::WrapperClass.

Definition at line 302 of file level_set.cpp.

302  {
303  *maxPtr = std::max(*maxPtr, max);
304  return 0.05 * (*maxPtr);
305  }

◆ runCalcs()

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

Run calculations.

Implements LevelSet::WrapperClass.

Definition at line 281 of file level_set.cpp.

281  {
283  CHKERR level_set.initialiseFieldLevelSet();
285  }

◆ setAggregateBit()

MoFEMErrorCode LevelSet::WrapperClassInitalSolution::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 287 of file level_set.cpp.

287  {
288  auto bit_mng = level_set.mField.getInterface<BitRefManager>();
289  auto set_bit = [](auto l) { return BitRefLevel().set(l); };
291  Range level;
292  CHKERR bit_mng->getEntitiesByRefLevel(set_bit(start_bit + l),
293  BitRefLevel().set(), level);
295  ->synchroniseEntities(level);
296  CHKERR bit_mng->setNthBitRefLevel(current_bit, false);
297  CHKERR bit_mng->setNthBitRefLevel(level, current_bit, true);
298  CHKERR bit_mng->setNthBitRefLevel(level, aggregate_bit, true);
300  }

◆ setBits()

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

Set bit ref level to problem.

Implements LevelSet::WrapperClass.

Definition at line 271 of file level_set.cpp.

271  {
273  auto simple = level_set.mField.getInterface<Simple>();
274  simple->getBitRefLevel() =
276  simple->getBitRefLevelMask() = BitRefLevel().set();
277  simple->reSetUp(true);
279  };

Member Data Documentation

◆ maxPtr

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

Definition at line 308 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::WrapperClassInitalSolution::maxPtr
boost::shared_ptr< double > maxPtr
Definition: level_set.cpp:308
aggregate_bit
constexpr int aggregate_bit
all bits for advection problem
Definition: level_set.cpp:66
LevelSet::initialiseFieldLevelSet
MoFEMErrorCode initialiseFieldLevelSet(boost::function< double(double, double, double)> level_fun=get_level_set)
initialise field set
Definition: level_set.cpp:1693
MoFEM::Simple
Simple interface for fast problem set-up.
Definition: Simple.hpp:27
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
simple
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
start_bit
constexpr int start_bit
Definition: level_set.cpp:60
LevelSet::WrapperClass::WrapperClass
WrapperClass()=default
LevelSet::mField
MoFEM::Interface & mField
integrate skeleton operators on khs
Definition: level_set.cpp:346
Range
MoFEM::CommInterface
Managing BitRefLevels.
Definition: CommInterface.hpp:21
skeleton_bit
constexpr int skeleton_bit
skeleton elements bit
Definition: level_set.cpp:65
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