Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject > Class Template Reference

Base class which deals with boolean operation between two LevelSetObjects. More...

Inheritance diagram for bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >:
Inheritance graph
[legend]
Collaboration diagram for bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >:
Collaboration graph
[legend]

Public Member Functions

bool empty () const override
 
const SourceLevelSetObject * getCellReferenceObject (long id) const override
 
const SourceLevelSetObject * getReferenceObject (const std::array< double, 3 > &point) const override
 
std::vector< const SourceLevelSetObject * > getSourceObjects () const override
 
- Public Member Functions inherited from bitpit::LevelSetProxyObject< SourceLevelSetObject, SourceLevelSetObject >
int getCellReferenceObjectId (long id) const override
 
virtual const SourceLevelSetObject * getCellReferencePrimaryObject (long id) const
 
int getCellReferencePrimaryObjectId (long id) const override
 
int getPrimaryObjectId (long) const
 
std::vector< int > getPrimarySourceObjectIds () const override
 
virtual std::vector< const SourceLevelSetObject * > getPrimarySourceObjects () const
 
int getReferenceObjectId (const std::array< double, 3 > &point) const override
 
virtual const SourceLevelSetObject * getReferencePrimaryObject (const std::array< double, 3 > &point) const
 
int getReferencePrimaryObjectId (const std::array< double, 3 > &point) const override
 
std::vector< int > getSourceObjectIds () const override
 
bool isCellInNarrowBand (long id) const override
 
bool isInNarrowBand (const std::array< double, 3 > &point) const override
 
bool isPrimary () const override
 

Protected Member Functions

 LevelSetBooleanBaseObject (int, LevelSetBooleanOperation, const SourceLevelSetObject *, const SourceLevelSetObject *)
 
 LevelSetBooleanBaseObject (int, LevelSetBooleanOperation, const std::vector< const SourceLevelSetObject * > &)
 
template<typename data_t , typename function_t >
data_t _evalCellFunction (long id, bool signedLevelSet, const function_t &function) const
 
std::array< double, 3 > _evalCellGradient (long id, bool signedLevelSet) const override
 
short _evalCellSign (long id) const override
 
double _evalCellValue (long id, bool signedLevelSet) const override
 
template<typename data_t , typename function_t >
data_t _evalFunction (const std::array< double, 3 > &point, bool signedLevelSet, const function_t &function) const
 
std::array< double, 3 > _evalGradient (const std::array< double, 3 > &point, bool signedLevelSet) const override
 
double _evalValue (const std::array< double, 3 > &point, bool signedLevelSet) const override
 
void fillCellPropagatedSignCache () override
 
void replaceSourceObject (const SourceLevelSetObject *current, const SourceLevelSetObject *updated) override
 
- Protected Member Functions inherited from bitpit::LevelSetProxyObject< SourceLevelSetObject, SourceLevelSetObject >
 LevelSetProxyObject (int)
 
void fillCellLocationCache () override
 
void fillCellLocationCache (const std::vector< adaption::Info > &adaptionData) override
 

Detailed Description

template<typename SourceLevelSetObject>
class bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >

Base class which deals with boolean operation between two LevelSetObjects.

Definition at line 68 of file levelSetBooleanObject.hpp.

Constructor & Destructor Documentation

◆ LevelSetBooleanBaseObject() [1/2]

template<typename SourceLevelSetObject >
bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::LevelSetBooleanBaseObject ( int id,
LevelSetBooleanOperation op,
const SourceLevelSetObject * source1,
const SourceLevelSetObject * source2 )
protected

Constructor taking two objects.

Parameters
[in]ididentifier of object
[in]optype of boolean operation
[in]source1pointer to first source object
[in]source2pointer to second source object

Definition at line 144 of file levelSetBooleanObject.tpp.

◆ LevelSetBooleanBaseObject() [2/2]

template<typename SourceLevelSetObject >
bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::LevelSetBooleanBaseObject ( int id,
LevelSetBooleanOperation op,
const std::vector< const SourceLevelSetObject * > & sourceObjects )
protected

Constructor taking a vector of objects. The boolean operation will be applied recursivly on each entry.

Parameters
[in]ididentifier of object
[in]optype of boolean operation
[in]sourceObjectspointers to source objects

Definition at line 160 of file levelSetBooleanObject.tpp.

Member Function Documentation

◆ _evalCellFunction()

template<typename SourceLevelSetObject >
template<typename data_t , typename function_t >
data_t bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::_evalCellFunction ( long id,
bool signedLevelSet,
const function_t & function ) const
protected

Evaluate the specified function at the specified cell.

Parameters
[in]idcell index
[in]functionis the function that will be evaluated
Returns
The value of the function at specified cell.

Definition at line 412 of file levelSetBooleanObject.tpp.

◆ _evalCellGradient()

template<typename SourceLevelSetObject >
std::array< double, 3 > bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::_evalCellGradient ( long id,
bool signedLevelSet ) const
overrideprotected

Evaluate levelset gradient at the specified cell.

Parameters
idis the id of the cell
Returns
The gradient of the levelset at the specified cell.

Definition at line 342 of file levelSetBooleanObject.tpp.

◆ _evalCellSign()

template<typename SourceLevelSetObject >
short bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::_evalCellSign ( long id) const
overrideprotected

Evaluate levelset sign at the specified cell.

Parameters
idis the id of the cell
Returns
The sign of the levelset at the specified cell.

Definition at line 311 of file levelSetBooleanObject.tpp.

◆ _evalCellValue()

template<typename SourceLevelSetObject >
double bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::_evalCellValue ( long id,
bool signedLevelSet ) const
overrideprotected

Evaluate levelset value at the specified cell.

Parameters
idis the id of the cell
signedLevelSetcontrols if signed levelset function will be used
Returns
The value of the levelset at the specified cell.

Definition at line 323 of file levelSetBooleanObject.tpp.

◆ _evalFunction()

template<typename SourceLevelSetObject >
template<typename data_t , typename function_t >
data_t bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::_evalFunction ( const std::array< double, 3 > & point,
bool signedLevelSet,
const function_t & function ) const
protected

Evaluate the specified function at the specified point.

Parameters
pointare the coordinates of the point
[in]functionis the function that will be evaluated
Returns
The value of the function at specified point.

Definition at line 428 of file levelSetBooleanObject.tpp.

◆ _evalGradient()

template<typename SourceLevelSetObject >
std::array< double, 3 > bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::_evalGradient ( const std::array< double, 3 > & point,
bool signedLevelSet ) const
overrideprotected

Evaluate levelset gradient at the specified cell.

Parameters
pointare the coordinates of the point
signedLevelSetcontrols if signed levelset function will be used
Returns
The gradient of the levelset at the specified cell.

Definition at line 387 of file levelSetBooleanObject.tpp.

◆ _evalValue()

template<typename SourceLevelSetObject >
double bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::_evalValue ( const std::array< double, 3 > & point,
bool signedLevelSet ) const
overrideprotected

Evaluate levelset value at the specified cell.

Parameters
pointare the coordinates of the point
signedLevelSetcontrols if signed levelset function will be used
Returns
The value of the levelset at the specified cell.

Definition at line 367 of file levelSetBooleanObject.tpp.

◆ empty()

template<typename SourceLevelSetObject >
bool bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::empty ( ) const
override

Checks if the object is empty.

Returns
Returns true is the object is empty, false otherwise.

Definition at line 172 of file levelSetBooleanObject.tpp.

◆ fillCellPropagatedSignCache()

template<typename SourceLevelSetObject >
void bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::fillCellPropagatedSignCache ( )
overrideprotected

Fill the cache that contains the propagated cell sign.

Definition at line 258 of file levelSetBooleanObject.tpp.

◆ getCellReferenceObject()

template<typename SourceLevelSetObject >
const SourceLevelSetObject * bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::getCellReferenceObject ( long id) const
overridevirtual

Get the object that defines the levelset information for the specified cell.

Parameters
[in]idcell index
Returns
The object that defines the levelset information for the specified cell.

Implements bitpit::LevelSetProxyObject< SourceLevelSetObject, SourceLevelSetObject >.

Definition at line 443 of file levelSetBooleanObject.tpp.

◆ getReferenceObject()

template<typename SourceLevelSetObject >
const SourceLevelSetObject * bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::getReferenceObject ( const std::array< double, 3 > & point) const
overridevirtual

Get the object that defines the levelset information for the specified point.

Parameters
[in]pointare the coordinates of the point
Returns
The object that defines the levelset information for the specified point.

Implements bitpit::LevelSetProxyObject< SourceLevelSetObject, SourceLevelSetObject >.

Definition at line 469 of file levelSetBooleanObject.tpp.

◆ getSourceObjects()

template<typename SourceLevelSetObject >
std::vector< const SourceLevelSetObject * > bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::getSourceObjects ( ) const
overridevirtual

Get all objects that compose the boolean object

Returns
pointers to all primary objects involved in the definition of the boolean object levelset information.

Implements bitpit::LevelSetProxyObject< SourceLevelSetObject, SourceLevelSetObject >.

Definition at line 494 of file levelSetBooleanObject.tpp.

◆ replaceSourceObject()

template<typename SourceLevelSetObject >
void bitpit::LevelSetBooleanBaseObject< SourceLevelSetObject >::replaceSourceObject ( const SourceLevelSetObject * current,
const SourceLevelSetObject * updated )
overrideprotectedvirtual

Replace a source object.

Parameters
[in]currentcurrent source object
[in]updatedupdated source object

Implements bitpit::LevelSetProxyObject< SourceLevelSetObject, SourceLevelSetObject >.

Definition at line 240 of file levelSetBooleanObject.tpp.


The documentation for this class was generated from the following files:
--- layout: doxygen_footer ---