Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
bitpit::LevelSetSegmentationObject Class Reference

Implements visitor pattern fo segmentated geometries. More...

Inheritance diagram for bitpit::LevelSetSegmentationObject:
Inheritance graph
[legend]
Collaboration diagram for bitpit::LevelSetSegmentationObject:
Collaboration graph
[legend]

Public Member Functions

 LevelSetSegmentationObject (const LevelSetSegmentationObject &other)
 
 LevelSetSegmentationObject (int)
 
 LevelSetSegmentationObject (int, const SurfUnstructured *surface, double featureAngle, LevelSetSurfaceSmoothing surfaceSmoothing)
 
 LevelSetSegmentationObject (int, const SurfUnstructured *surface, double featureAngle=2. *BITPIT_PI)
 
 LevelSetSegmentationObject (int, std::unique_ptr< const SurfUnstructured > &&surface, double featureAngle=2. *BITPIT_PI)
 
 LevelSetSegmentationObject (LevelSetSegmentationObject &&other)=default
 
LevelSetSegmentationObjectclone () const override
 
bool empty () const override
 
double getFeatureAngle () const
 
double getMaxSurfaceFeatureSize () const
 
double getMinSurfaceFeatureSize () const
 
const SurfaceSkdTreegetSearchTree () const
 
const SurfUnstructuredgetSurface () const
 
LevelSetSurfaceSmoothing getSurfaceSmoothing () const
 
void setSurface (const SurfUnstructured *surface, bool force=false)
 
void setSurface (const SurfUnstructured *surface, double featureAngle, bool force=false)
 
void setSurface (const SurfUnstructured *surface, double featureAngle, LevelSetSurfaceSmoothing surfaceSmoothing, bool force=false)
 
void setSurface (std::unique_ptr< const SurfUnstructured > &&surface, bool force=false)
 
void setSurface (std::unique_ptr< const SurfUnstructured > &&surface, double featureAngle, bool force=false)
 
- Public Member Functions inherited from bitpit::LevelSetSegmentationBaseObject
std::array< double, 3 > evalCellNormal (long id, bool signedLevelSet) const
 
int evalCellPart (long id) const
 
long evalCellSupport (long id, double searchRadius=AUTOMATIC_SEARCH_RADIUS) const
 
const SurfUnstructuredevalCellSurface (long id) const
 
std::array< double, 3 > evalNormal (const std::array< double, 3 > &point, bool signedLevelSet) const
 
int evalPart (const std::array< double, 3 > &point) const
 
void evalProjection (const std::array< double, 3 > &point, bool signedLevelSet, std::array< double, 3 > *projectionPoint, std::array< double, 3 > *projectionNormal) const
 
long evalSupport (const std::array< double, 3 > &point) const
 
long evalSupport (const std::array< double, 3 > &point, double searchRadius) const
 
const SurfUnstructuredevalSurface (const std::array< double, 3 > &point) const
 
std::array< double BITPIT_COMMA 3 > getNormal (const std::array< double, 3 > &point) const
 
std::array< double BITPIT_COMMA 3 > getNormal (long cellId) const
 
int getPart (const std::array< double, 3 > &point) const
 
int getPart (long cellId) const
 
long getSupport (const std::array< double, 3 > &point) const
 
long getSupport (long cellId) const
 
LevelSetFieldset getSupportedFields () const override
 
double getSurfaceFeatureSize (const std::array< double, 3 > &point) const
 
double getSurfaceFeatureSize (long cellId) const
 
 LevelSetObject (const LevelSetObject &other)
 
 LevelSetObject (int)
 
 LevelSetObject (LevelSetObject &&other)
 
- 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
 
LevelSetIntersectionStatus intersectSurface (long, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const
 
virtual bool isCellInNarrowBand (long id) const
 
virtual bool isInNarrowBand (const std::array< double, 3 > &point) const
 
virtual bool isPrimary () 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 > _evalCellGradient (long id, bool signedLevelSet) const override
 
std::array< double, 3 > _evalCellNormal (long id, bool signedLevelSet) const override
 
short _evalCellSign (long id) const override
 
long _evalCellSupport (long id, double searchRadius=AUTOMATIC_SEARCH_RADIUS) const override
 
const SurfUnstructured_evalCellSurface (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
 
void _evalProjection (const std::array< double, 3 > &point, bool signedLevelSet, std::array< double, 3 > *projectionPoint, std::array< double, 3 > *projectionNormal) const override
 
short _evalSign (const std::array< double, 3 > &point) 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
 
double _evalValue (const std::array< double, 3 > &point, bool signedLevelSet) const override
 
LevelSetCellLocation fillCellGeometricNarrowBandLocationCache (long id) override
 
void fillCellLocationCache () override
 
void fillCellLocationCache (const std::vector< adaption::Info > &adaptionData) override
 
- Protected Member Functions inherited from bitpit::LevelSetSegmentationBaseObject
 LevelSetSegmentationBaseObject (int, const LevelSetSegmentationSurfaceInfo *surfaceInfo)
 
virtual int _evalCellPart (long id) const
 
virtual int _evalPart (const std::array< double, 3 > &point) const
 
LevelSetIntersectionStatus _intersectSurface (long, double distance, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const override
 
void addVTKOutputData (LevelSetField field, const std::string &objectName) override
 
template<typename value_t >
std::size_t createFieldCellCache (LevelSetField field, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
 
virtual std::size_t createFieldCellCache (LevelSetField field, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
 
std::size_t createFieldCellCache (LevelSetField field, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID) override
 
void fillFieldCellCache (LevelSetField field, const std::vector< long > &cellIds)
 
virtual void fillFieldCellCache (LevelSetField field, long id)
 
void fillFieldCellCache (LevelSetField field, long id) override
 
template<typename value_t >
void fillFieldCellCache (LevelSetField field, long id, const value_t &value) const
 
virtual void flushVTKOutputData (std::fstream &stream, VTKFormat format, LevelSetField field) const
 
void flushVTKOutputData (std::fstream &stream, VTKFormat format, LevelSetField field) const override
 
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
 
std::string getVTKOutputFieldName (LevelSetField field) const override
 
- Protected Member Functions inherited from bitpit::LevelSetObject
void adaptCellCaches (const std::vector< adaption::Info > &adaptionData)
 
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)
 
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 void fillCellPropagatedSignCache ()
 
void fillFieldCellCaches (LevelSetZone zone, const std::vector< LevelSetField > &fields)
 
void fillFieldCellCaches (LevelSetZone zone, const std::vector< LevelSetField > &fields, const std::vector< adaption::Info > &adaptionData)
 
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
 
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
 
- Static Public Attributes inherited from bitpit::LevelSetSegmentationBaseObject
static BITPIT_PUBLIC_API const double AUTOMATIC_SEARCH_RADIUS = -1
 
- 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

Implements visitor pattern fo segmentated geometries.

Definition at line 186 of file levelSetSegmentationObject.hpp.

Constructor & Destructor Documentation

◆ LevelSetSegmentationObject() [1/5]

bitpit::LevelSetSegmentationObject::LevelSetSegmentationObject ( int id)

Constructor

Parameters
[in]ididentifier of object

Definition at line 2289 of file levelSetSegmentationObject.cpp.

◆ LevelSetSegmentationObject() [2/5]

bitpit::LevelSetSegmentationObject::LevelSetSegmentationObject ( int id,
std::unique_ptr< const SurfUnstructured > && surface,
double featureAngle = 2. * BITPIT_PI )

Constructor

Parameters
[in]ididentifier of object
[in]surfaceunique pointer to surface mesh
[in]featureAnglefeature angle. If the angle between two segments is bigger than this angle, the enclosed edge is considered as a sharp edge

Definition at line 2301 of file levelSetSegmentationObject.cpp.

◆ LevelSetSegmentationObject() [3/5]

bitpit::LevelSetSegmentationObject::LevelSetSegmentationObject ( int id,
const SurfUnstructured * surface,
double featureAngle = 2. * BITPIT_PI )

Constructor

Parameters
[in]ididentifier of object
[in]surfacepointer to surface mesh
[in]featureAnglefeature angle; if the angle between two segments is bigger than this angle, the enclosed edge is considered as a sharp edge.

Definition at line 2313 of file levelSetSegmentationObject.cpp.

◆ LevelSetSegmentationObject() [4/5]

bitpit::LevelSetSegmentationObject::LevelSetSegmentationObject ( int id,
const SurfUnstructured * surface,
double featureAngle,
LevelSetSurfaceSmoothing surfaceSmoothing )

Constructor

Parameters
[in]ididentifier of object
[in]surfacepointer to surface mesh
[in]featureAnglefeature angle; if the angle between two segments is bigger than this angle, the enclosed edge is considered as a sharp edge.
[in]surfaceSmoothingis the given surface snoothing order

Definition at line 2326 of file levelSetSegmentationObject.cpp.

◆ LevelSetSegmentationObject() [5/5]

bitpit::LevelSetSegmentationObject::LevelSetSegmentationObject ( const LevelSetSegmentationObject & other)

Copy constructor.

Parameters
otheris another object whose content is copied in this object

Definition at line 2337 of file levelSetSegmentationObject.cpp.

Member Function Documentation

◆ _evalCellGradient()

std::array< double, 3 > bitpit::LevelSetSegmentationObject::_evalCellGradient ( long id,
bool signedLevelSet ) const
overrideprotectedvirtual

Evaluate levelset gradient at the specified cell.

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

Implements bitpit::LevelSetObject.

Definition at line 2859 of file levelSetSegmentationObject.cpp.

◆ _evalCellNormal()

std::array< double, 3 > bitpit::LevelSetSegmentationObject::_evalCellNormal ( long id,
bool signedLevelSet ) const
overrideprotectedvirtual

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.

Implements bitpit::LevelSetSegmentationBaseObject.

Definition at line 2893 of file levelSetSegmentationObject.cpp.

◆ _evalCellSign()

short bitpit::LevelSetSegmentationObject::_evalCellSign ( long id) const
overrideprotectedvirtual

Evaluate levelset sign at the specified cell.

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

Implements bitpit::LevelSetObject.

Definition at line 2829 of file levelSetSegmentationObject.cpp.

◆ _evalCellSupport()

long bitpit::LevelSetSegmentationObject::_evalCellSupport ( long id,
double searchRadius = AUTOMATIC_SEARCH_RADIUS ) const
overrideprotectedvirtual

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.

Implements bitpit::LevelSetSegmentationBaseObject.

Definition at line 2879 of file levelSetSegmentationObject.cpp.

◆ _evalCellSurface()

const SurfUnstructured & bitpit::LevelSetSegmentationObject::_evalCellSurface ( long id) const
overrideprotectedvirtual

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.

Implements bitpit::LevelSetSegmentationBaseObject.

Definition at line 2816 of file levelSetSegmentationObject.cpp.

◆ _evalCellValue()

double bitpit::LevelSetSegmentationObject::_evalCellValue ( long id,
bool signedLevelSet ) const
overrideprotectedvirtual

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.

Implements bitpit::LevelSetObject.

Definition at line 2844 of file levelSetSegmentationObject.cpp.

◆ _evalGradient()

std::array< double, 3 > bitpit::LevelSetSegmentationObject::_evalGradient ( const std::array< double, 3 > & point,
bool signedLevelSet ) const
overrideprotectedvirtual

Evaluate levelset gradient at the specified point.

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

Implements bitpit::LevelSetObject.

Definition at line 2952 of file levelSetSegmentationObject.cpp.

◆ _evalProjection()

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

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.

Implements bitpit::LevelSetSegmentationBaseObject.

Definition at line 2970 of file levelSetSegmentationObject.cpp.

◆ _evalSign()

short bitpit::LevelSetSegmentationObject::_evalSign ( const std::array< double, 3 > & point) const
overrideprotectedvirtual

Evaluate levelset sign at the specified point.

Parameters
pointare the coordinates of the point
Returns
The sign of the levelset at the specified point.

Implements bitpit::LevelSetObject.

Definition at line 2924 of file levelSetSegmentationObject.cpp.

◆ _evalSupport() [1/2]

long bitpit::LevelSetSegmentationObject::_evalSupport ( const std::array< double, 3 > & point) const
overrideprotectedvirtual

Evaluate the closest segment to the specified point.

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

Implements bitpit::LevelSetSegmentationBaseObject.

Definition at line 3094 of file levelSetSegmentationObject.cpp.

◆ _evalSupport() [2/2]

long bitpit::LevelSetSegmentationObject::_evalSupport ( const std::array< double, 3 > & point,
double searchRadius ) const
overrideprotectedvirtual

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.

Implements bitpit::LevelSetSegmentationBaseObject.

Definition at line 3107 of file levelSetSegmentationObject.cpp.

◆ _evalSurface()

const SurfUnstructured & bitpit::LevelSetSegmentationObject::_evalSurface ( const std::array< double, 3 > & point) const
overrideprotectedvirtual

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.

Implements bitpit::LevelSetSegmentationBaseObject.

Definition at line 2911 of file levelSetSegmentationObject.cpp.

◆ _evalValue()

double bitpit::LevelSetSegmentationObject::_evalValue ( const std::array< double, 3 > & point,
bool signedLevelSet ) const
overrideprotectedvirtual

Evaluate levelset value at the specified point.

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

Implements bitpit::LevelSetObject.

Definition at line 2938 of file levelSetSegmentationObject.cpp.

◆ clone()

LevelSetSegmentationObject * bitpit::LevelSetSegmentationObject::clone ( ) const
overridevirtual

Clones the object

Returns
pointer to cloned object

Implements bitpit::LevelSetObject.

Definition at line 2361 of file levelSetSegmentationObject.cpp.

◆ empty()

bool bitpit::LevelSetSegmentationObject::empty ( ) const
overridevirtual

Checks if the object is empty.

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

Implements bitpit::LevelSetObject.

Definition at line 2352 of file levelSetSegmentationObject.cpp.

◆ fillCellGeometricNarrowBandLocationCache()

LevelSetCellLocation bitpit::LevelSetSegmentationObject::fillCellGeometricNarrowBandLocationCache ( long id)
overrideprotectedvirtual

Fill location cache for the specified cell if it is geometrically inside the narrow band

A cell is geometrically inside the narrow band if its distance from the surface is smaller than the narrow band side or if it intersects the surface.

This function may require the evaluation of some levelset fields. To improve performance, it is important to attempt filling the cache of the evaluated fields. It is then up to the caches to decide if the fields can be cached.

Parameters
[in]idis the cell id
Returns
The cell location of the cache or LevelSetCellLocation::UNKNOWN if the cell location was not identified.

Implements bitpit::LevelSetObject.

Definition at line 2761 of file levelSetSegmentationObject.cpp.

◆ fillCellLocationCache() [1/2]

void bitpit::LevelSetSegmentationObject::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 2538 of file levelSetSegmentationObject.cpp.

◆ fillCellLocationCache() [2/2]

void bitpit::LevelSetSegmentationObject::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 2562 of file levelSetSegmentationObject.cpp.

◆ getFeatureAngle()

double bitpit::LevelSetSegmentationObject::getFeatureAngle ( ) const

Get feature angle

Returns
feature angle used when calculating face normals.

Definition at line 2515 of file levelSetSegmentationObject.cpp.

◆ getMaxSurfaceFeatureSize()

double bitpit::LevelSetSegmentationObject::getMaxSurfaceFeatureSize ( ) const

Get the largest characteristic size within the triangulation. This function is only provided for guarantee backwards compatibility with older versions. It is out of the levelset scope to evaluate the feature size of the surface.

Returns
largest characteristic size within the triangulation

Definition at line 3194 of file levelSetSegmentationObject.cpp.

◆ getMinSurfaceFeatureSize()

double bitpit::LevelSetSegmentationObject::getMinSurfaceFeatureSize ( ) const

Get the smallest characteristic size within the triangulation This function is only provided for guarantee backwards compatibility with older versions. It is out of the levelset scope to evaluate the feature size of the surface.

Returns
smallest characteristic size within the triangulation

Definition at line 3165 of file levelSetSegmentationObject.cpp.

◆ getSearchTree()

const SurfaceSkdTree & bitpit::LevelSetSegmentationObject::getSearchTree ( ) const

Get search tree

Returns
search tree;

Definition at line 2507 of file levelSetSegmentationObject.cpp.

◆ getSurface()

const SurfUnstructured & bitpit::LevelSetSegmentationObject::getSurface ( ) const

Get segmentation surface

Returns
segmentation surface;

Definition at line 2369 of file levelSetSegmentationObject.cpp.

◆ getSurfaceSmoothing()

bitpit::LevelSetSurfaceSmoothing bitpit::LevelSetSegmentationObject::getSurfaceSmoothing ( ) const

Get smoothing order (low or high) imposed on surface when calculating the projection point and normal on the surface

Returns
the ssurface smoothing order

Definition at line 2524 of file levelSetSegmentationObject.cpp.

◆ setSurface() [1/5]

void bitpit::LevelSetSegmentationObject::setSurface ( const SurfUnstructured * surface,
bool force = false )

Set the surface

Unless explicitly forced, it is not possible to replace an existing surface. Also, when the surface is replaced, the object will not recalculate the levelset on the newly set surface (nor will tell the proxy objects that may depend on the current object to update the levelset values).

The feature angle will be set to the defualt value specified by the constant LevelSetSegmentationSurfaceInfo::DEFAULT_FEATURE_ANGLE.

Parameters
[in]surfaceis the surface that will be set
[in]forcecontrols if it is possible to replace an existing surface.

Definition at line 2436 of file levelSetSegmentationObject.cpp.

◆ setSurface() [2/5]

void bitpit::LevelSetSegmentationObject::setSurface ( const SurfUnstructured * surface,
double featureAngle,
bool force = false )

Set the surface

Unless explicitly forced, it is not possible to replace an existing surface. Also, when the surface is replaced, the object will not recalculate the levelset on the newly set surface (nor will tell the proxy objects that may depend on the current object to update the levelset values).

Parameters
[in]surfaceis the surface that will be set
[in]featureAngleis the angle that is used to identify sharp edges. If the angle between two segments is bigger than this angle, the enclosed edge is considered as a sharp edge
[in]forcecontrols if it is possible to replace an existing surface.

Definition at line 2453 of file levelSetSegmentationObject.cpp.

◆ setSurface() [3/5]

void bitpit::LevelSetSegmentationObject::setSurface ( const SurfUnstructured * surface,
double featureAngle,
LevelSetSurfaceSmoothing surfaceSmoothing,
bool force = false )

Set the surface

Unless explicitly forced, it is not possible to replace an existing surface. Also, when the surface is replaced, the object will not recalculate the levelset on the newly set surface (nor will tell the proxy objects that may depend on the current object to update the levelset values).

Parameters
[in]surfaceis the surface that will be set
[in]featureAngleis the angle that is used to identify sharp edges. If the angle between two segments is bigger than this angle, the enclosed edge is considered as a sharp edge
[in]surfaceSmoothingis the given surface snoothing order
[in]forcecontrols if it is possible to replace an existing surface.

Definition at line 2485 of file levelSetSegmentationObject.cpp.

◆ setSurface() [4/5]

void bitpit::LevelSetSegmentationObject::setSurface ( std::unique_ptr< const SurfUnstructured > && surface,
bool force = false )

Set the surface

Unless explicitly forced, it is not possible to replace an existing surface. Also, when the surface is replaced, the object will not recalculate the levelset on the newly set surface (nor will tell the proxy objects that may depend on the current object to update the levelset values).

The feature angle will be set to the defualt value specified by the constant LevelSetSegmentationSurfaceInfo::DEFAULT_FEATURE_ANGLE.

Parameters
[in]surfaceis the surface that will be set
[in]forcecontrols if it is possible to replace an existing surface.

Definition at line 2387 of file levelSetSegmentationObject.cpp.

◆ setSurface() [5/5]

void bitpit::LevelSetSegmentationObject::setSurface ( std::unique_ptr< const SurfUnstructured > && surface,
double featureAngle,
bool force = false )

Set the surface

Unless explicitly forced, it is not possible to replace an existing surface. Also, when the surface is replaced, the object will not recalculate the levelset on the newly set surface (nor will tell the proxy objects that may depend on the current object to update the levelset values).

Parameters
[in]surfaceis the surface that will be set
[in]featureAngleis the angle that is used to identify sharp edges. If the angle between two segments is bigger than this angle, the enclosed edge is considered as a sharp edge
[in]forcecontrols if it is possible to replace an existing surface.

Definition at line 2404 of file levelSetSegmentationObject.cpp.


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