Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject > Interface Template Referenceabstract

Interface class for all objects, which depend on other LevelSetObjects. More...

Inheritance diagram for bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >:
Inheritance graph
[legend]
Collaboration diagram for bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >:
Collaboration graph
[legend]

Public Member Functions

virtual const SourceLevelSetObject * getCellReferenceObject (long id) const =0
 
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
 
virtual const SourceLevelSetObject * getReferenceObject (const std::array< double, 3 > &point) const =0
 
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
 
virtual std::vector< const SourceLevelSetObject * > getSourceObjects () const =0
 
bool isCellInNarrowBand (long id) const override
 
bool isInNarrowBand (const std::array< double, 3 > &point) const override
 
bool isPrimary () const override
 
- Public Member Functions inherited from bitpit::LevelSetObject
virtual ~LevelSetObject ()
 
 BITPIT_DEPRECATED_FOR (double getValue(long cellId) const, double evalCellValue(long id, bool signedLevelSet) const)
 
 BITPIT_DEPRECATED_FOR (short getSign(long cellId) const, short evalCellSign(long id) const)
 
 BITPIT_DEPRECATED_FOR (std::array< double BITPIT_COMMA 3 > getGradient(long cellId) const, std::array< double BITPIT_COMMA 3 > evalCellGradient(long id, bool signedLevelSet) const)
 
virtual LevelSetObjectclone () const =0
 
std::array< double BITPIT_COMMA 3 > computeProjectionPoint (const std::array< double, 3 > &point) const
 
std::array< double BITPIT_COMMA 3 > computeProjectionPoint (long cellId) const
 
std::array< double BITPIT_COMMA 3 > computeVertexProjectionPoint (long vertexId) const
 
void disableFieldCellCache (LevelSetField field)
 
virtual bool empty () const =0
 
void enableFieldCellCache (LevelSetField field, LevelSetCacheMode cacheMode)
 
void enableVTKOutput (const LevelSetFieldset &fieldset, bool enable=true)
 
void enableVTKOutput (const LevelSetFieldset &fieldset, const std::string &objectName, bool enable=true)
 
void enableVTKOutput (LevelSetField field, bool enable=true)
 
void enableVTKOutput (LevelSetField field, const std::string &objectName, bool enable=true)
 
void enableVTKOutput (LevelSetWriteField field, bool enable=true)
 
void enableVTKOutput (LevelSetWriteField fieldset, const std::string &objectName, bool enable=true)
 
virtual std::array< double, 3 > evalCellGradient (long id, bool signedLevelSet) const
 
virtual std::array< double, 3 > evalCellProjectionPoint (long id) const
 
virtual short evalCellSign (long id) const
 
virtual double evalCellValue (long id, bool signedLevelSet) const
 
virtual std::array< double, 3 > evalGradient (const std::array< double, 3 > &point, bool signedLevelSet) const
 
virtual std::array< double, 3 > evalProjectionPoint (const std::array< double, 3 > &point) const
 
virtual short evalSign (const std::array< double, 3 > &point) const
 
virtual double evalValue (const std::array< double, 3 > &point, bool signedLevelSet) const
 
void flushData (std::fstream &, const std::string &, VTKFormat) override
 
LevelSetBulkEvaluationMode getCellBulkEvaluationMode () const
 
LevelSetCacheMode getFieldCellCacheMode (LevelSetField field) const
 
int getId () const
 
virtual const LevelSetKernelgetKernel () const
 
LevelSetInfo getLevelSetInfo (long cellId) const
 
double getLS (long cellId) const
 
double getNarrowBandSize () const
 
std::size_t getReferenceCount () const
 
double getSizeNarrowBand () const
 
virtual LevelSetFieldset getSupportedFields () const
 
LevelSetIntersectionStatus intersectSurface (long, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const
 
void setCellBulkEvaluationMode (LevelSetBulkEvaluationMode evaluationMode)
 
void update (const std::vector< adaption::Info > &adaptionData)
 
- Public Member Functions inherited from bitpit::VTKBaseStreamer
virtual void absorbData (std::fstream &, const std::string &, VTKFormat, uint64_t, uint8_t, VTKDataType)
 
template<typename T >
void flushValue (std::fstream &, VTKFormat, const T &value) const
 
template<typename T >
void flushValue (std::fstream &, VTKFormat, const T *values, int nValues) const
 

Protected Member Functions

 LevelSetProxyObject (int)
 
void fillCellLocationCache () override
 
void fillCellLocationCache (const std::vector< adaption::Info > &adaptionData) override
 
virtual void replaceSourceObject (const SourceLevelSetObject *current, const SourceLevelSetObject *updated)=0
 
- Protected Member Functions inherited from bitpit::LevelSetObject
 LevelSetObject (const LevelSetObject &other)
 
 LevelSetObject (int)
 
 LevelSetObject (LevelSetObject &&other)
 
virtual std::array< double, 3 > _evalCellGradient (long id, bool signedLevelSet) const =0
 
virtual short _evalCellSign (long id) const =0
 
virtual double _evalCellValue (long id, bool signedLevelSet) const =0
 
virtual std::array< double, 3 > _evalGradient (const std::array< double, 3 > &point, bool signedLevelSet) const =0
 
virtual short _evalSign (const std::array< double, 3 > &point) const
 
virtual double _evalValue (const std::array< double, 3 > &point, bool signedLevelSet) const =0
 
virtual LevelSetIntersectionStatus _intersectSurface (long, double distance, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const
 
void adaptCellCaches (const std::vector< adaption::Info > &adaptionData)
 
virtual void addVTKOutputData (LevelSetField field, const std::string &objectName)
 
void clearCellCache (std::size_t cacheId, bool release)
 
void completeCellCacheExchange (const std::unordered_map< int, std::vector< long > > &sendCellIds, std::size_t cacheIds, DataCommunicator *)
 
void completeCellCachesExchange (const std::unordered_map< int, std::vector< long > > &sendCellIds, const std::vector< std::size_t > &cacheIds, DataCommunicator *)
 
template<typename value_t >
std::size_t createCellCache (LevelSetFillIn expectedFillIn, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
 
virtual std::size_t createCellLocationCache (std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
 
virtual std::size_t createCellPropagatedSignCache (std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
 
virtual std::size_t createFieldCellCache (LevelSetField field, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
 
template<typename value_t >
std::size_t createFieldCellCache (LevelSetField field, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
 
void destroyCellBulkData ()
 
void destroyCellCache (std::size_t cacheId)
 
void destroyCellLocationCache ()
 
void destroyCellNarrowBandData ()
 
void destroyCellPropagatedSignCache ()
 
virtual void destroyFieldCellCache (LevelSetField field)
 
virtual void dump (std::ostream &)
 
std::vector< long > evalCellCacheFillIds (LevelSetZone zone, LevelSetCacheMode cacheMode) const
 
std::vector< long > evalCellCacheFillIds (LevelSetZone zone, LevelSetCacheMode cacheMode, const std::vector< adaption::Info > &adaptionData) const
 
std::vector< long > evalCellCacheStaleIds (const std::vector< adaption::Info > &adaptionData) const
 
template<typename value_t , typename evaluator_t , typename fallback_t >
value_t evalCellField (LevelSetField field, long id, const evaluator_t &evaluator, const fallback_t &fallback) const
 
template<typename value_t , typename evaluator_t , typename fallback_t >
value_t evalCellFieldCached (LevelSetField field, long id, const evaluator_t &evaluator, const fallback_t &fallback) const
 
std::vector< long > evalCellFullCacheFillIds (LevelSetZone zone) const
 
std::vector< long > evalCellFullCacheFillIds (LevelSetZone zone, const std::vector< adaption::Info > &adaptionData) const
 
std::vector< long > evalCellNarrowBandCacheFillIds (LevelSetZone zone) const
 
std::vector< long > evalCellNarrowBandCacheFillIds (LevelSetZone zone, const std::vector< adaption::Info > &adaptionData) const
 
std::vector< long > evalCellOnDemandCacheFillIds (LevelSetZone zone) const
 
std::vector< long > evalCellOnDemandCacheFillIds (LevelSetZone zone, const std::vector< adaption::Info > &adaptionData) const
 
void evaluate ()
 
void evaluateCellBulkData ()
 
void evaluateCellNarrowBandData ()
 
short evalValueSign (double value) const
 
virtual LevelSetCellLocation fillCellGeometricNarrowBandLocationCache (long id)
 
virtual void fillCellPropagatedSignCache ()
 
void fillFieldCellCache (LevelSetField field, const std::vector< long > &cellIds)
 
virtual void fillFieldCellCache (LevelSetField field, long id)
 
template<typename value_t >
void fillFieldCellCache (LevelSetField field, long id, const value_t &value) const
 
void fillFieldCellCaches (LevelSetZone zone, const std::vector< LevelSetField > &fields)
 
void fillFieldCellCaches (LevelSetZone zone, const std::vector< LevelSetField > &fields, const std::vector< adaption::Info > &adaptionData)
 
virtual void flushVTKOutputData (std::fstream &stream, VTKFormat format, LevelSetField field) const
 
template<typename value_t , typename evaluator_t , typename fallback_t >
void flushVTKOutputData (std::fstream &stream, VTKFormat format, LevelSetField field, const evaluator_t evluator, const fallback_t fallback) const
 
template<typename value_t >
CellCacheCollection::ValueCache< value_t > * getCellCache (std::size_t cacheId) const
 
CellCacheCollection::CachegetCellCache (std::size_t cacheId) const
 
LevelSetCellLocation getCellLocation (long id) const
 
LevelSetZone getCellZone (long id) const
 
template<typename value_t >
CellCacheCollection::ValueCache< value_t > * getFieldCellCache (LevelSetField field) const
 
CellCacheCollection::CachegetFieldCellCache (LevelSetField field) const
 
std::size_t getFieldCellCacheId (LevelSetField field) const
 
virtual LevelSetKernelgetKernel ()
 
std::string getVTKOutputDataName (LevelSetField field, const std::string &objectName) const
 
virtual std::string getVTKOutputFieldName (LevelSetField field) const
 
bool hasVTKOutputData (LevelSetField field, const std::string &objectName) const
 
void pruneCellCache (std::size_t cacheId, const std::vector< long > &cellIds)
 
void removeVTKOutputData (LevelSetField field, const std::string &objectName)
 
virtual void restore (std::istream &)
 
void setDefaultLevelSetSigndness (bool signedLevelSet)
 
virtual void setKernel (LevelSetKernel *)
 
void setNarrowBandSize (double size)
 
void setSizeNarrowBand (double)
 
void startCellCacheExchange (const std::unordered_map< int, std::vector< long > > &recvCellIds, std::size_t cacheIds, DataCommunicator *) const
 
void startCellCachesExchange (const std::unordered_map< int, std::vector< long > > &recvCellIds, const std::vector< std::size_t > &cacheIds, DataCommunicator *) const
 
void update ()
 
void updateCellBulkData (const std::vector< adaption::Info > &adaptionData)
 
void updateCellNarrowBandData (const std::vector< adaption::Info > &adaptionData)
 

Additional Inherited Members

- Public Types inherited from bitpit::LevelSetObject
typedef LevelSetCachedKernel::CellCacheCollection CellCacheCollection
 
- Protected Types inherited from bitpit::LevelSetObject
template<typename data_t >
using CellCacheEntry = typename CellCacheCollection::ValueCache<data_t>::Entry
 
- Protected Attributes inherited from bitpit::LevelSetObject
std::size_t m_cellLocationCacheId
 Id of the cache that will keep track if cell zones.
 
std::size_t m_cellPropagatedSignCacheId
 Id of the cache that will keep track if cell propagated sign.
 
bool m_defaultSignedLevelSet
 
LevelSetFieldMap< std::string > m_enabledOutputFields
 
LevelSetKernelm_kernel
 
double m_narrowBandSize
 Size of narrow band.
 
- Static Protected Attributes inherited from bitpit::LevelSetObject
static const bool CELL_CACHE_IS_SIGNED = false
 
static const LevelSetIntersectionMode CELL_LOCATION_INTERSECTION_MODE = LevelSetIntersectionMode::FAST_GUARANTEE_FALSE
 

Detailed Description

template<typename SourceLevelSetObject, typename BaseLevelSetObject = LevelSetObject>
interface bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >

Interface class for all objects, which depend on other LevelSetObjects.

Definition at line 50 of file levelSetProxyObject.hpp.

Constructor & Destructor Documentation

◆ LevelSetProxyObject()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::LevelSetProxyObject ( int id)
protected

Constructor

Definition at line 40 of file levelSetProxyObject.tpp.

Member Function Documentation

◆ fillCellLocationCache() [1/2]

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
void bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::fillCellLocationCache ( )
overrideprotectedvirtual

Fill the cache that contains the zone associated to the cells.

A cell can be either in the narrow band or in the bulk. It will be considered inside the narrow band if one of the following conditions holds:

  • its distance from the surface is less than the narrow band size;
  • it intersects the zero-levelset iso-surface (intersections are checked using the FAST_GUARANTEE_FALSE criterium);
  • one of its neighbors intersects the zero-levelset iso-surface.

Implements bitpit::LevelSetObject.

Definition at line 68 of file levelSetProxyObject.tpp.

◆ fillCellLocationCache() [2/2]

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
void bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::fillCellLocationCache ( const std::vector< adaption::Info > & adaptionData)
overrideprotectedvirtual

Fill the cache that contains the zone associated to the cells.

A cell can be either in the narrow band or in the bulk. It will be considered inside the narrow band if one of the following conditions holds:

  • its distance from the surface is less than the narrow band size;
  • it intersects the zero-levelset iso-surface (intersections are checked using the FAST_GUARANTEE_FALSE criterium);
  • one of its neighbors intersects the zero-levelset iso-surface.
Parameters
adaptionDataare the information about the mesh update

Implements bitpit::LevelSetObject.

Definition at line 100 of file levelSetProxyObject.tpp.

◆ getCellReferenceObject()

template<typename SourceLevelSetObject , typename BaseLevelSetObject = LevelSetObject>
virtual const SourceLevelSetObject * bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getCellReferenceObject ( long id) const
pure virtual

◆ getCellReferenceObjectId()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
int bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getCellReferenceObjectId ( long id) const
overridevirtual

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

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

Implements bitpit::LevelSetProxyBaseObject.

Definition at line 225 of file levelSetProxyObject.tpp.

◆ getCellReferencePrimaryObject()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
const SourceLevelSetObject * bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getCellReferencePrimaryObject ( long id) const
virtual

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

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

Definition at line 171 of file levelSetProxyObject.tpp.

◆ getCellReferencePrimaryObjectId()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
int bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getCellReferencePrimaryObjectId ( long id) const
overridevirtual

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

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

Implements bitpit::LevelSetProxyBaseObject.

Definition at line 244 of file levelSetProxyObject.tpp.

◆ getPrimaryObjectId()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
int bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getPrimaryObjectId ( long id) const

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

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

Definition at line 382 of file levelSetProxyObject.tpp.

◆ getPrimarySourceObjectIds()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
std::vector< int > bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getPrimarySourceObjectIds ( ) const
overridevirtual

Get all primary objects that compose the meta object.

Returns
identifiers of all primary objects involved in the definition of the meta object levelset information.

Implements bitpit::LevelSetProxyBaseObject.

Definition at line 359 of file levelSetProxyObject.tpp.

◆ getPrimarySourceObjects()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
std::vector< const SourceLevelSetObject * > bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getPrimarySourceObjects ( ) const
virtual

Get all primary objects that compose the proxy object.

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

Definition at line 316 of file levelSetProxyObject.tpp.

◆ getReferenceObject()

template<typename SourceLevelSetObject , typename BaseLevelSetObject = LevelSetObject>
virtual const SourceLevelSetObject * bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getReferenceObject ( const std::array< double, 3 > & point) const
pure virtual

◆ getReferenceObjectId()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
int bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getReferenceObjectId ( const std::array< double, 3 > & point) const
overridevirtual

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

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

Implements bitpit::LevelSetProxyBaseObject.

Definition at line 271 of file levelSetProxyObject.tpp.

◆ getReferencePrimaryObject()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
const SourceLevelSetObject * bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getReferencePrimaryObject ( const std::array< double, 3 > & point) const
virtual

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

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

Definition at line 198 of file levelSetProxyObject.tpp.

◆ getReferencePrimaryObjectId()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
int bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getReferencePrimaryObjectId ( const std::array< double, 3 > & point) const
overridevirtual

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

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

Implements bitpit::LevelSetProxyBaseObject.

Definition at line 290 of file levelSetProxyObject.tpp.

◆ getSourceObjectIds()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
std::vector< int > bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getSourceObjectIds ( ) const
overridevirtual

Get all primary objects that compose the meta object.

Returns
identifiers of all primary objects involved in the definition of the meta object levelset information.

Implements bitpit::LevelSetProxyBaseObject.

Definition at line 338 of file levelSetProxyObject.tpp.

◆ getSourceObjects()

template<typename SourceLevelSetObject , typename BaseLevelSetObject = LevelSetObject>
virtual std::vector< const SourceLevelSetObject * > bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::getSourceObjects ( ) const
pure virtual

◆ isCellInNarrowBand()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
bool bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::isCellInNarrowBand ( long id) const
overridevirtual

Check if the specified cell lies inside the narrow band.

A cell is considered inside the narrow band if one of the following conditions hold:

  • its distance from the surface is less than the narrow band size;
  • it intersects the zero-levelset iso-surface (intersections are checked using the FAST_GUARANTEE_FALSE criterium);
  • one of its neighbors intersects the zero-levelset iso-surface.

If no caches with "narrow band" mode have been filled, the function may return wrong results if the cell is on the last layer of ghosts.

Parameters
[in]idis the cell id
Returns
Return true if the cell is in the narrow band, false otherwise.

Implements bitpit::LevelSetObject.

Definition at line 144 of file levelSetProxyObject.tpp.

◆ isInNarrowBand()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
bool bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::isInNarrowBand ( const std::array< double, 3 > & point) const
overridevirtual

Check if the specified point lies inside the narrow band.

The value of the levelset is evaluated and compared with the specified narrow band size.

Parameters
[in]idis the cell id
Returns
Return true if the cell is in the narrow band, false otherwise.

Implements bitpit::LevelSetObject.

Definition at line 158 of file levelSetProxyObject.tpp.

◆ isPrimary()

template<typename SourceLevelSetObject , typename BaseLevelSetObject >
bool bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::isPrimary ( ) const
overridevirtual

Checks if the object is a primary object (e.g. of a surface triangulation) or not (e.g. derived by boolean operations between two levelsets).

Proxy-objects are non-primary objects by definition.

Returns
Returns always true, because proxy-objects are non-primary objects by definition.

Implements bitpit::LevelSetObject.

Definition at line 53 of file levelSetProxyObject.tpp.

◆ replaceSourceObject()

template<typename SourceLevelSetObject , typename BaseLevelSetObject = LevelSetObject>
virtual void bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >::replaceSourceObject ( const SourceLevelSetObject * current,
const SourceLevelSetObject * updated )
protectedpure virtual

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