v0.15.0
Loading...
Searching...
No Matches
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.
 
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

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
Examples
level_set.cpp.

Definition at line 268 of file level_set.cpp.

269 : WrapperClass(), maxPtr(max_ptr) {}
boost::shared_ptr< double > maxPtr

Member Function Documentation

◆ getThreshold()

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

Implements LevelSet::WrapperClass.

Examples
level_set.cpp.

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.

Examples
level_set.cpp.

Definition at line 281 of file level_set.cpp.

281 {
285 }
#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.
MoFEMErrorCode initialiseFieldLevelSet(boost::function< double(double, double, double)> level_fun=get_level_set)
initialise field set

◆ 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.

Examples
level_set.cpp.

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 }
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::WrapperClassInitalSolution::setBits ( LevelSet & level_set,
int l )
inlinevirtual

Set bit ref level to problem.

Implements LevelSet::WrapperClass.

Examples
level_set.cpp.

Definition at line 271 of file level_set.cpp.

271 {
273 auto simple = level_set.mField.getInterface<Simple>();
276 simple->getBitRefLevelMask() = BitRefLevel().set();
277 simple->reSetUp(true);
279 };
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition acoustic.cpp:69
constexpr int skeleton_bit
skeleton elements bit
Definition level_set.cpp:65
Simple interface for fast problem set-up.
Definition Simple.hpp:27
BitRefLevel & getBitRefLevel()
Get the BitRefLevel.
Definition Simple.hpp:375

Member Data Documentation

◆ maxPtr

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

Definition at line 308 of file level_set.cpp.


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