Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject > Class Reference
Inheritance diagram for bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject >:
Inheritance graph
[legend]
Collaboration diagram for bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject >:
Collaboration graph
[legend]

Public Member Functions

 LevelSetComplementObject (int id, const LevelSetSegmentationBaseObject *source)
 
LevelSetComplementObject< LevelSetSegmentationBaseObject > * clone () const override
 
- Public Member Functions inherited from bitpit::LevelSetComplementBaseObject< LevelSetSegmentationBaseObject >
bool empty () const override
 
const LevelSetSegmentationBaseObjectgetCellReferenceObject (long id) const override
 
const LevelSetSegmentationBaseObjectgetReferenceObject (const std::array< double, 3 > &point) const override
 
virtual const LevelSetSegmentationBaseObjectgetSourceObject () const
 
std::vector< const LevelSetSegmentationBaseObject * > getSourceObjects () const override
 
- Public Member Functions inherited from bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >
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
 
- 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)
 
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)
 
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

std::array< double, 3 > _evalCellNormal (long id, bool signedLevelSet) const override
 
int _evalCellPart (long id) const override
 
long _evalCellSupport (long id, double searchRadius=AUTOMATIC_SEARCH_RADIUS) const override
 
const SurfUnstructured_evalCellSurface (long id) const override
 
int _evalPart (const std::array< double, 3 > &point) const override
 
void _evalProjection (const std::array< double, 3 > &point, bool signedLevelSet, std::array< double, 3 > *projectionPoint, std::array< double, 3 > *projectionNormal) const override
 
long _evalSupport (const std::array< double, 3 > &point) const override
 
long _evalSupport (const std::array< double, 3 > &point, double searchRadius) const override
 
const SurfUnstructured_evalSurface (const std::array< double, 3 > &point) const override
 
- Protected Member Functions inherited from bitpit::LevelSetComplementBaseObject< LevelSetSegmentationBaseObject >
 LevelSetComplementBaseObject (int id, const LevelSetSegmentationBaseObject *source)
 
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
 
std::array< double, 3 > _evalGradient (const std::array< double, 3 > &point, bool signedLevelSet) const override
 
short _evalSign (const std::array< double, 3 > &point) const override
 
double _evalValue (const std::array< double, 3 > &point, bool signedLevelSet) const override
 
void fillCellPropagatedSignCache () override
 
void replaceSourceObject (const LevelSetSegmentationBaseObject *current, const LevelSetSegmentationBaseObject *updated) override
 
- Protected Member Functions inherited from bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >
 LevelSetProxyObject (int)
 
void fillCellLocationCache () override
 
void fillCellLocationCache (const std::vector< adaption::Info > &adaptionData) override
 
- Protected Member Functions inherited from bitpit::LevelSetObject
 LevelSetObject (const LevelSetObject &other)
 
 LevelSetObject (int)
 
 LevelSetObject (LevelSetObject &&other)
 
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)
 
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

Definition at line 271 of file levelSetSegmentationObject.hpp.

Constructor & Destructor Documentation

◆ LevelSetComplementObject()

Constructor.

Parameters
[in]ididentifier of object
[in]sourcepointer to source object

Definition at line 3378 of file levelSetSegmentationObject.cpp.

Member Function Documentation

◆ _evalCellNormal()

std::array< double, 3 > bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject >::_evalCellNormal ( long id,
bool signedLevelSet ) const
overrideprotected

Evaluate the normal of the surface at the segment closest to the specified cell.

Parameters
idis the id of the cell
signedLevelSetcontrols if signed levelset function will be used
Returns
The normal of the surface at the segment closest to the specified cell.

Definition at line 3437 of file levelSetSegmentationObject.cpp.

◆ _evalCellPart()

int bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject >::_evalCellPart ( long id) const
overrideprotected

Evaluate the part associated with the segment closest to the specified cell.

Parameters
idis the id of the cell
Returns
The part associated with the segment closest to the specified cell.

Definition at line 3425 of file levelSetSegmentationObject.cpp.

◆ _evalCellSupport()

long bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject >::_evalCellSupport ( long id,
double searchRadius = AUTOMATIC_SEARCH_RADIUS ) const
overrideprotected

Evaluate the segment closest to the specified cell.

Parameters
idis the id of the cell
searchRadiusall segments whose distance is greater than the search radius will not be considered for the evaluation of the support. If the search radius is set equal to the constant AUTOMATIC_SEARCH_RADIUS, the object will try to evaluate the optional search radius for the specified cell. The automatic evaluation of the search radius is possible only for a limited number of cases, when the automatic evaluation cannot be performed, an infinite search radius will be used.
Returns
The segment closest to the specified cell.

Definition at line 3414 of file levelSetSegmentationObject.cpp.

◆ _evalCellSurface()

const SurfUnstructured & bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject >::_evalCellSurface ( long id) const
overrideprotected

Evaluate the surface associated with the segment closest to the specified cell.

Parameters
idis the id of the cell
Returns
The surface associated with the segment closest to the specified cell.

Definition at line 3397 of file levelSetSegmentationObject.cpp.

◆ _evalPart()

int bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject >::_evalPart ( const std::array< double, 3 > & point) const
overrideprotected

Evaluate the part associated with the segment closest to the specified point.

Parameters
pointare the coordinates of the point
Returns
The part associated with the segment closest to the specified point.

Definition at line 3488 of file levelSetSegmentationObject.cpp.

◆ _evalProjection()

void bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject >::_evalProjection ( const std::array< double, 3 > & point,
bool signedLevelSet,
std::array< double, 3 > * projectionPoint,
std::array< double, 3 > * projectionNormal ) const
overrideprotected

Evaluate the projection of the given point on the surface created based on the points representing the specified segment. The surface passes from these points and is verical to the normal vectors associated with them.

Parameters
[in]pointare the coordinates of the given point
[in]signedLevelSetcontrols if signed levelset function will be used
[out]projectionPointThe coordinates of the projection point on the surface.
[out]projectionNormalThe coordinates of the norrmal to the surface vector on the surface projection point.

Definition at line 3504 of file levelSetSegmentationObject.cpp.

◆ _evalSupport() [1/2]

long bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject >::_evalSupport ( const std::array< double, 3 > & point) const
overrideprotected

Evaluate the closest segment to the specified point.

Parameters
pointare the coordinates of the point
Returns
The closest segment to the specified point.

Definition at line 3464 of file levelSetSegmentationObject.cpp.

◆ _evalSupport() [2/2]

long bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject >::_evalSupport ( const std::array< double, 3 > & point,
double searchRadius ) const
overrideprotected

Evaluate the closest segment to the specified point.

Parameters
pointare the coordinates of the point
searchRadiusall segments whose distance is greater than the search radius will not be considered for the evaluation of the support
Returns
The closest segment to the specified point.

Definition at line 3477 of file levelSetSegmentationObject.cpp.

◆ _evalSurface()

const SurfUnstructured & bitpit::LevelSetComplementObject< LevelSetSegmentationBaseObject >::_evalSurface ( const std::array< double, 3 > & point) const
overrideprotected

Evaluate the surface associated with the segment closest to the specified point.

Parameters
pointare the coordinates of the point
Returns
The surface associated with the segment closest to the specified point.

Definition at line 3453 of file levelSetSegmentationObject.cpp.

◆ clone()

Clones the object

Returns
pointer to cloned object

Implements bitpit::LevelSetObject.

Definition at line 3387 of file levelSetSegmentationObject.cpp.


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