Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
bitpit::LevelSetSegmentationBaseObject Class Referenceabstract

Implements visitor pattern fo segmentated geometries. More...

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

Public Member Functions

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)
 
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
 
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
 

Static Public Attributes

static BITPIT_PUBLIC_API const double AUTOMATIC_SEARCH_RADIUS = -1
 

Protected Member Functions

 LevelSetSegmentationBaseObject (int, const LevelSetSegmentationSurfaceInfo *surfaceInfo)
 
virtual std::array< double, 3 > _evalCellNormal (long id, bool signedLevelSet) const =0
 
virtual int _evalCellPart (long id) const
 
virtual long _evalCellSupport (long id, double searchRadius=AUTOMATIC_SEARCH_RADIUS) const =0
 
virtual const SurfUnstructured_evalCellSurface (long id) const =0
 
virtual int _evalPart (const std::array< double, 3 > &point) const
 
virtual void _evalProjection (const std::array< double, 3 > &point, bool signedLevelSet, std::array< double, 3 > *projectionPoint, std::array< double, 3 > *projectionNormal) const =0
 
virtual long _evalSupport (const std::array< double, 3 > &point) const =0
 
virtual long _evalSupport (const std::array< double, 3 > &point, double searchRadius) const =0
 
virtual const SurfUnstructured_evalSurface (const std::array< double, 3 > &point) const =0
 
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
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
 
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 LevelSetCellLocation fillCellGeometricNarrowBandLocationCache (long id)
 
virtual void fillCellLocationCache ()
 
virtual void fillCellLocationCache (const std::vector< adaption::Info > &adaptionData)
 
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)
 

Friends

class LevelSetBooleanObject< LevelSetSegmentationBaseObject >
 

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

Implements visitor pattern fo segmentated geometries.

Definition at line 126 of file levelSetSegmentationObject.hpp.

Member Function Documentation

◆ _evalCellNormal()

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

◆ _evalCellPart()

int bitpit::LevelSetSegmentationBaseObject::_evalCellPart ( long id) const
protectedvirtual

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 2051 of file levelSetSegmentationObject.cpp.

◆ _evalCellSupport()

virtual long bitpit::LevelSetSegmentationBaseObject::_evalCellSupport ( long id,
double searchRadius = AUTOMATIC_SEARCH_RADIUS ) const
protectedpure virtual

◆ _evalCellSurface()

virtual const SurfUnstructured & bitpit::LevelSetSegmentationBaseObject::_evalCellSurface ( long id) const
protectedpure virtual

◆ _evalPart()

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

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 2066 of file levelSetSegmentationObject.cpp.

◆ _evalProjection()

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

◆ _evalSupport() [1/2]

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

◆ _evalSupport() [2/2]

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

◆ _evalSurface()

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

◆ _intersectSurface()

LevelSetIntersectionStatus bitpit::LevelSetSegmentationBaseObject::_intersectSurface ( long id,
double distance,
LevelSetIntersectionMode mode = LevelSetIntersectionMode::FAST_FUZZY ) const
overrideprotectedvirtual

Check if cell intersects the surface.

If mode==LevelSetIntersectionMode::FAST_FUZZY the method will compare the levelset value to tangent and bounding radius of a cell. If the value is smaller than the tangent radius LevelSetIntersectionStatus::TRUE is returned, if it is larger than the bounding radius LevelSetIntersectionStatus::FALSE is returned. If it is in-between LevelSetIntersectionStatus::CLOSE is returned.

If mode==LevelSetIntersectionMode::FAST_GUARANTEE_TRUE and the levelset value is smaller than the rangent radius LevelSetIntersectionStatus::TRUE is returned, otherwise LevelSetIntersectionStatus::FALSE.

If mode==LevelSetIntersectionMode::FAST_GURANTEE_FALSE and the levelset value is larger than the bounding radius LevelSetIntersectionStatus::FALSE is returned, otherwise LevelSetIntersectionStatus::TRUE.

If mode==LevelSetIntersectionMode::ACCURATE, the same checks of fuzzy mode are performed, however, in the cases where fuzzy mode would return CLOSE, an additional check on the intersection between the tangent plane at the projection point and the cell is performed. Errors of the method are related to the ratio of surface curvature over cell size.

The bounding sphere is the sphere with the minimum radius that contains all the cell vertices and has the center in the cell centroid.

The tangent sphere is a sphere having the center in the level centroid and tangent to the cell.

Parameters
[in]idcell id
[in]distanceis the unsigned distance of the cell centroid from the zero-levelset iso-surface
[in]modedescribes the types of check that should be performed
Returns
indicator regarding intersection

Implements bitpit::LevelSetObject.

Definition at line 1806 of file levelSetSegmentationObject.cpp.

◆ addVTKOutputData()

void bitpit::LevelSetSegmentationBaseObject::addVTKOutputData ( LevelSetField field,
const std::string & objectName )
overrideprotectedvirtual

Add the VTK data associated with the specified field.

Parameters
[in]fieldis the field
[in]objectNameis the name that will be associated with the object

Implements bitpit::LevelSetObject.

Definition at line 2081 of file levelSetSegmentationObject.cpp.

◆ createFieldCellCache() [1/3]

template<typename value_t >
std::size_t bitpit::LevelSetObject::createFieldCellCache ( LevelSetField field,
std::size_t cacheId = CellCacheCollection::NULL_CACHE_ID )
protectedvirtual

Create the cache that will be used for storing cell information of the specified field.

Parameters
fieldis the field for which the caches will be added
cacheIdis the id that will be associated with the cache, if a NULL_ID is specified the cache id will be assigned automatically
Returns
The id associated with the registered cache.

Implements bitpit::LevelSetObject.

Definition at line 235 of file levelSetObject.tpp.

◆ createFieldCellCache() [2/3]

std::size_t bitpit::LevelSetObject::createFieldCellCache ( LevelSetField field,
std::size_t cacheId = CellCacheCollection::NULL_CACHE_ID )
protectedvirtual

Create the cache that will be used for storing cell information of the specified field.

Parameters
fieldis the field for which the caches will be added
cacheIdis the id that will be associated with the cache, if a NULL_ID is specified the cache id will be assigned automatically
Returns
The id associated with the cache.

Implements bitpit::LevelSetObject.

Definition at line 233 of file levelSetObject.cpp.

◆ createFieldCellCache() [3/3]

std::size_t bitpit::LevelSetSegmentationBaseObject::createFieldCellCache ( LevelSetField field,
std::size_t cacheId = CellCacheCollection::NULL_CACHE_ID )
overrideprotectedvirtual

Create the cache that will be used for storing cell information of the specified field.

Parameters
fieldis the field for which the caches will be registered
cacheIdis the id that will be associated with the cache, if a NULL_ID is specified the cache id will be assigned automatically
Returns
The id associated with the registered cache.

Implements bitpit::LevelSetObject.

Definition at line 1687 of file levelSetSegmentationObject.cpp.

◆ evalCellNormal()

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

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 1827 of file levelSetSegmentationObject.cpp.

◆ evalCellPart()

int bitpit::LevelSetSegmentationBaseObject::evalCellPart ( long id) const

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 1751 of file levelSetSegmentationObject.cpp.

◆ evalCellSupport()

long bitpit::LevelSetSegmentationBaseObject::evalCellSupport ( long id,
double searchRadius = AUTOMATIC_SEARCH_RADIUS ) const

Evaluate the segment closest to the specified cell.

The result is cached only if there is a segment within the search range.

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 1875 of file levelSetSegmentationObject.cpp.

◆ evalCellSurface()

const SurfUnstructured & bitpit::LevelSetSegmentationBaseObject::evalCellSurface ( long id) const

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 1740 of file levelSetSegmentationObject.cpp.

◆ evalNormal()

std::array< double, 3 > bitpit::LevelSetSegmentationBaseObject::evalNormal ( const std::array< double, 3 > & point,
bool signedLevelSet ) const

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

Parameters
pointare the coordinates of the point
signedLevelSetcontrols if signed levelset function will be used
Returns
The normal of the surface at the segment closest to the specified point.

Definition at line 1992 of file levelSetSegmentationObject.cpp.

◆ evalPart()

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

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 1980 of file levelSetSegmentationObject.cpp.

◆ evalProjection()

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

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 2037 of file levelSetSegmentationObject.cpp.

◆ evalSupport() [1/2]

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

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 2008 of file levelSetSegmentationObject.cpp.

◆ evalSupport() [2/2]

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

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 2021 of file levelSetSegmentationObject.cpp.

◆ evalSurface()

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

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 1969 of file levelSetSegmentationObject.cpp.

◆ fillFieldCellCache() [1/4]

void bitpit::LevelSetObject::fillFieldCellCache ( LevelSetField field,
const std::vector< long > & cellIds )
protected

Fill the cache values associated with the given cell ids for the specified field.

Parameters
fieldis the field whose cache will be filled
cellIdsare the ids of the cells whose values will be filled

Implements bitpit::LevelSetObject.

Definition at line 224 of file levelSetObject.cpp.

◆ fillFieldCellCache() [2/4]

void bitpit::LevelSetObject::fillFieldCellCache ( LevelSetField field,
long id )
protectedvirtual

Fill the specified field cache of the given cell.

Parameters
fieldis the field whose cache will be filled
idis the id of the cell whose cache will be filled

Implements bitpit::LevelSetObject.

Definition at line 225 of file levelSetObject.cpp.

◆ fillFieldCellCache() [3/4]

void bitpit::LevelSetSegmentationBaseObject::fillFieldCellCache ( LevelSetField field,
long id )
overrideprotectedvirtual

Fill the specified field cache of the given cell.

Parameters
fieldis the field whose cache will be filled
idis the id of the cell whose cache will be filled

Implements bitpit::LevelSetObject.

Definition at line 1720 of file levelSetSegmentationObject.cpp.

◆ fillFieldCellCache() [4/4]

template<typename value_t >
void bitpit::LevelSetObject::fillFieldCellCache ( LevelSetField field,
long id,
const value_t & value ) const
protected

Fill the cache value associated with the given cell ids for the specified field.

Depending on the cache mode and on the bulk evaluation mode the cached may not need to be filled for the specified cell. If the cache already contains a value for the specified cell, that value will be replaced with the given one.

Parameters
[in]fieldis the field that should be evaluated
[in]idis the id of the cell where the field should be evaluated
[in]valueis the value that will be added to the cell

Implements bitpit::LevelSetObject.

Definition at line 227 of file levelSetObject.tpp.

◆ flushVTKOutputData() [1/3]

void bitpit::LevelSetObject::flushVTKOutputData ( std::fstream & stream,
VTKFormat format,
LevelSetField field ) const
protectedvirtual

Write the VTK data associated with the specified field to the given stream.

Only data currently stored in the cache will be written, no new field data will be evaluated by the function.

Parameters
[in]fieldis the field
[in]streamis the output stream
[in]formatis the format which must be used. Supported options are "ascii" or "appended". For "appended" type an unformatted binary stream must be used

Implements bitpit::LevelSetObject.

Definition at line 252 of file levelSetObject.cpp.

◆ flushVTKOutputData() [2/3]

void bitpit::LevelSetSegmentationBaseObject::flushVTKOutputData ( std::fstream & stream,
VTKFormat format,
LevelSetField field ) const
overrideprotectedvirtual

Write the specified field to the given stream.

Parameters
[in]streamoutput stream
[in]formatis the format which must be used. Supported options are "ascii" or "appended". For "appended" type an unformatted binary stream must be used
[in]fieldis the field that will be written

Implements bitpit::LevelSetObject.

Definition at line 2141 of file levelSetSegmentationObject.cpp.

◆ flushVTKOutputData() [3/3]

template<typename value_t , typename evaluator_t , typename fallback_t >
void bitpit::LevelSetObject::flushVTKOutputData ( std::fstream & stream,
VTKFormat format,
LevelSetField field,
const evaluator_t evaluator,
const fallback_t fallback ) const
protected

Write the VTK data associated with the specified field to the given stream.

Only data currently stored in the cache will be written, no new field data will be evaluated by the function.

Parameters
[in]streamis the output stream
[in]formatis the format which must be used. Supported options are "ascii" or "appended". For "appended" type an unformatted binary stream must be used
[in]fieldis the field
[in]evaluatoris the functor that should be used to evaluate the field
[in]fallbackis the functor that should be used to evaluate the field fallback value

Implements bitpit::LevelSetObject.

Definition at line 255 of file levelSetObject.tpp.

◆ getNormal() [1/2]

std::array< double, 3 > bitpit::LevelSetSegmentationBaseObject::getNormal ( const std::array< double, 3 > & point) const

Get the normal of the surface at the segment closest to the specified point.

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

Definition at line 2245 of file levelSetSegmentationObject.cpp.

◆ getNormal() [2/2]

std::array< double, 3 > bitpit::LevelSetSegmentationBaseObject::getNormal ( long cellId) const

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

Parameters
cellIdis the id of the cell
Returns
The normal of the surface at the segment closest to the specified cell.

Definition at line 2194 of file levelSetSegmentationObject.cpp.

◆ getPart() [1/2]

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

Get 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 2234 of file levelSetSegmentationObject.cpp.

◆ getPart() [2/2]

int bitpit::LevelSetSegmentationBaseObject::getPart ( long cellId) const

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

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

Definition at line 2183 of file levelSetSegmentationObject.cpp.

◆ getSupport() [1/2]

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

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 2256 of file levelSetSegmentationObject.cpp.

◆ getSupport() [2/2]

long bitpit::LevelSetSegmentationBaseObject::getSupport ( long cellId) const

Evaluate the segment closest to the specified cell.

Parameters
cellIdis the id of the cell
Returns
The segment closest to the specified cell.

Definition at line 2205 of file levelSetSegmentationObject.cpp.

◆ getSupportedFields()

LevelSetFieldset bitpit::LevelSetSegmentationBaseObject::getSupportedFields ( ) const
overridevirtual

Get the list of supported field.

Returns
The list of supported field.

Implements bitpit::LevelSetObject.

Definition at line 1704 of file levelSetSegmentationObject.cpp.

◆ getSurfaceFeatureSize() [1/2]

double bitpit::LevelSetSegmentationBaseObject::getSurfaceFeatureSize ( const std::array< double, 3 > & point) const

Get the size of the segment closest to the specified point.

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

Definition at line 2267 of file levelSetSegmentationObject.cpp.

◆ getSurfaceFeatureSize() [2/2]

double bitpit::LevelSetSegmentationBaseObject::getSurfaceFeatureSize ( long cellId) const

Get the size of the segment closest to the specified cell.

Parameters
cellIdis the id of the cell
Returns
The size of the segment closest to the specified cell.

Definition at line 2216 of file levelSetSegmentationObject.cpp.

◆ getVTKOutputFieldName()

std::string bitpit::LevelSetSegmentationBaseObject::getVTKOutputFieldName ( LevelSetField field) const
overrideprotectedvirtual

Get the name that will be used by the VTK writer for the specifed field.

Parameters
[in]fieldis the field
Returns
The name that will be used by the VTK writer for the specifed field.

Implements bitpit::LevelSetObject.

Definition at line 2113 of file levelSetSegmentationObject.cpp.

◆ LevelSetObject() [1/3]

bitpit::LevelSetObject::LevelSetObject ( const LevelSetObject & other)

Copy constructor

Parameters
[in]otheris another object whose content is copied in this object

Implements bitpit::LevelSetObject.

Definition at line 146 of file levelSetObject.cpp.

◆ LevelSetObject() [2/3]

bitpit::LevelSetObject::LevelSetObject ( int id)

Constructor

Parameters
[in]idid assigned to object

Implements bitpit::LevelSetObject.

Definition at line 145 of file levelSetObject.cpp.

◆ LevelSetObject() [3/3]

bitpit::LevelSetObject::LevelSetObject ( LevelSetObject && other)

Move constructor

Parameters
[in]otheris another object whose content is moved in this object

Implements bitpit::LevelSetObject.

Definition at line 147 of file levelSetObject.cpp.

Friends And Related Symbol Documentation

◆ LevelSetBooleanObject< LevelSetSegmentationBaseObject >

Definition at line 129 of file levelSetSegmentationObject.hpp.

Member Data Documentation

◆ AUTOMATIC_SEARCH_RADIUS

const double bitpit::LevelSetSegmentationBaseObject::AUTOMATIC_SEARCH_RADIUS = -1
static

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.

Definition at line 129 of file levelSetSegmentationObject.hpp.


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