Interface class for all objects with respect to whom the levelset function may be computed. More...


Public Types | |
typedef LevelSetCachedKernel::CellCacheCollection | CellCacheCollection |
Public Member Functions | |
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 LevelSetObject * | clone () 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 LevelSetKernel * | getKernel () 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 id, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const |
virtual bool | isCellInNarrowBand (long id) const |
LevelSetIntersectionStatus | isCellIntersected (long id, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const |
virtual bool | isInNarrowBand (const std::array< double, 3 > &point) const |
LevelSetIntersectionStatus | isInterfaceIntersected (long id) const |
LevelSetIntersectionStatus | isInterfaceIntersected (long id, bool invert, std::array< std::array< double, 3 >, 2 > *intersection, std::vector< std::array< double, 3 > > *polygon) const |
virtual bool | isPrimary () const |
void | setCellBulkEvaluationMode (LevelSetBulkEvaluationMode evaluationMode) |
void | update (const std::vector< adaption::Info > &adaptionData) |
![]() | |
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 Types | |
template<typename data_t> | |
using | CellCacheEntry = typename CellCacheCollection::ValueCache<data_t>::Entry |
Protected Member Functions | |
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 | _isCellIntersected (long, double distance, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const |
virtual LevelSetIntersectionStatus | _isInterfaceIntersected (long id, bool positivePart, std::array< std::array< double, 3 >, 2 > *intersection, std::vector< std::array< double, 3 > > *polygon) 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 | fillCellLocationCache () |
virtual void | fillCellLocationCache (const std::vector< adaption::Info > &adaptionData) |
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::Cache * | getCellCache (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::Cache * | getFieldCellCache (LevelSetField field) const |
std::size_t | getFieldCellCacheId (LevelSetField field) const |
virtual LevelSetKernel * | getKernel () |
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) |
Protected Attributes | |
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 |
LevelSetKernel * | m_kernel |
double | m_narrowBandSize |
Size of narrow band. | |
Static Protected Attributes | |
static const bool | CELL_CACHE_IS_SIGNED = false |
static const LevelSetIntersectionMode | CELL_LOCATION_INTERSECTION_MODE = LevelSetIntersectionMode::FAST_GUARANTEE_FALSE |
Friends | |
class | LevelSet |
template<typename SourceLevelSetObject, typename BaseLevelSetObject> | |
class | LevelSetProxyObject |
Detailed Description
Interface class for all objects with respect to whom the levelset function may be computed.
Evaluation of the fields inside the narrow band is always performed using an exact algorithm, on the other hand evaluation of the fields in the bulk can be performed choosing one of the following modes:
- NONE, no data is evaluated (a dummy value will be returned when requesting any
- data);
- SIGN_PROPAGATION, sign is propagated from the narrow band, no other data will be evaluated (a dummy value will be returned when requesting data other than the sign, whenever possible the evaluated sign will be used for assigning the correct sign to the dummy value);
- EXACT, exact data is evaluated.
Fields evaluated by the object on cell centroids can be cached. Cache can be enabled for each individual field separately and one of the following modes can be chosen:
- NONE, no caching will be performed;
- ON_DEMAND, data are cached only where explicitly evaluated;
- NARROW_BAND, Data are cached only inside the narrow band;
- FULL, data are cached in the whole domain.
- Examples
- RBF_example_00001.cpp.
Definition at line 55 of file levelSetObject.hpp.
Member Typedef Documentation
◆ CellCacheCollection
Definition at line 63 of file levelSetObject.hpp.
◆ CellCacheEntry
|
protected |
Definition at line 132 of file levelSetObject.hpp.
Constructor & Destructor Documentation
◆ ~LevelSetObject()
|
virtual |
Destructor.
Definition at line 151 of file levelSetObject.cpp.
◆ LevelSetObject() [1/3]
|
protected |
Constructor
- Parameters
-
[in] id id assigned to object
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 84 of file levelSetObject.cpp.
◆ LevelSetObject() [2/3]
|
protected |
Copy constructor
- Parameters
-
[in] other is another object whose content is copied in this object
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 102 of file levelSetObject.cpp.
◆ LevelSetObject() [3/3]
|
protected |
Move constructor
- Parameters
-
[in] other is another object whose content is moved in this object
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 126 of file levelSetObject.cpp.
Member Function Documentation
◆ _evalCellGradient()
|
protectedpure virtual |
Implemented in bitpit::LevelSetBooleanBaseObject< LevelSetObject >, bitpit::LevelSetBooleanBaseObject< LevelSetSegmentationBaseObject >, bitpit::LevelSetComplementBaseObject< LevelSetObject >, bitpit::LevelSetComplementBaseObject< LevelSetSegmentationBaseObject >, and bitpit::LevelSetSegmentationObject.
◆ _evalCellSign()
|
protectedpure virtual |
Implemented in bitpit::LevelSetBooleanBaseObject< LevelSetObject >, bitpit::LevelSetBooleanBaseObject< LevelSetSegmentationBaseObject >, bitpit::LevelSetComplementBaseObject< LevelSetObject >, bitpit::LevelSetComplementBaseObject< LevelSetSegmentationBaseObject >, and bitpit::LevelSetSegmentationObject.
◆ _evalCellValue()
|
protectedpure virtual |
Implemented in bitpit::LevelSetBooleanBaseObject< LevelSetObject >, bitpit::LevelSetBooleanBaseObject< LevelSetSegmentationBaseObject >, bitpit::LevelSetComplementBaseObject< LevelSetObject >, bitpit::LevelSetComplementBaseObject< LevelSetSegmentationBaseObject >, and bitpit::LevelSetSegmentationObject.
◆ _evalGradient()
|
protectedpure virtual |
Implemented in bitpit::LevelSetBooleanBaseObject< LevelSetObject >, bitpit::LevelSetBooleanBaseObject< LevelSetSegmentationBaseObject >, bitpit::LevelSetComplementBaseObject< LevelSetObject >, bitpit::LevelSetComplementBaseObject< LevelSetSegmentationBaseObject >, and bitpit::LevelSetSegmentationObject.
◆ _evalSign()
|
protectedvirtual |
Evaluate levelset sign at the specified point.
- Parameters
-
point are the coordinates of the point
- Returns
- The sign of the levelset at the specified point.
Implemented in bitpit::LevelSetComplementBaseObject< LevelSetObject >, bitpit::LevelSetComplementBaseObject< LevelSetSegmentationBaseObject >, and bitpit::LevelSetSegmentationObject.
Definition at line 1753 of file levelSetObject.cpp.
◆ _evalValue()
|
protectedpure virtual |
Implemented in bitpit::LevelSetBooleanBaseObject< LevelSetObject >, bitpit::LevelSetBooleanBaseObject< LevelSetSegmentationBaseObject >, bitpit::LevelSetComplementBaseObject< LevelSetObject >, bitpit::LevelSetComplementBaseObject< LevelSetSegmentationBaseObject >, and bitpit::LevelSetSegmentationObject.
◆ _isCellIntersected()
|
protectedvirtual |
Check if the specified cell intersects the zero-levelset iso-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] id cell id [in] distance is the unsigned distance of the cell centroid from the zero-levelset iso-surface [in] mode describes the types of check that should be performed
- Returns
- indicator regarding intersection
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 1481 of file levelSetObject.cpp.
◆ _isInterfaceIntersected()
|
protectedvirtual |
Check if the specified interface intersects the zero-levelset iso-surface.
The iso-surface is considered planar. Calculate the intersection as a segment defined by two points and the part of the interface belonging to the subspace of negative level-set. If the interface is not intersected, an empty polygon is returned. The interface belonging to the possitive level-set subspace is returned if the "invert" argument is false.
- Parameters
-
[in] id is the interface index [in] invert when false the part of the interface occupying the possitive levelset area is returned [out] intersection If intersects, return the cutting segment. In case of a liner interface the intersection degenerates to a point which coincides with the begining and the ending of the segment [out] polygon is the polygon constructed by the interface intersection placed on the opposite subspace of the one pointed by the plane's normal
- Returns
- the level set status
Implemented in bitpit::LevelSetSegmentationBaseObject, and bitpit::LevelSetSegmentationObject.
Definition at line 1573 of file levelSetObject.cpp.
◆ adaptCellCaches()
|
protected |
Adapt cell cache after a mesh update.
Only the transformation listed in the adaption data will be applied, entries associated with new cell will not be filled.
- Parameters
-
adaptionData are the information about the mesh update
Definition at line 2414 of file levelSetObject.cpp.
◆ addVTKOutputData()
|
protectedvirtual |
Add the VTK data associated with the specified field.
- Parameters
-
[in] field is the field [in] objectName is the name that will be associated with the object
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 2092 of file levelSetObject.cpp.
◆ clearCellCache()
|
protected |
Clear the specified cell cache.
- Parameters
-
cacheId is the id of the cached that will be cleared release if set to true the memory hold by the caches will be released, otherwise the caches will be cleared but its memory may not be released
Definition at line 2535 of file levelSetObject.cpp.
◆ clone()
|
pure virtual |
◆ completeCellCacheExchange()
|
protected |
Complete exchange of cell cache data.
- Parameters
-
[in] recvCellIds is the list of cell ids to receive [in] cacheId is the id of the cache whose data will be exchanged [in,out] dataCommunicator is the data communicator that will be used for the data exchange
Definition at line 2292 of file levelSetObject.cpp.
◆ completeCellCachesExchange()
|
protected |
Complete exchange of cell cache data.
- Parameters
-
[in] recvCellIds is the list of cell ids to receive [in] cacheId is the id of the cache whose data will be exchanged [in,out] dataCommunicator is the data communicator that will be used for the data exchange
Definition at line 2305 of file levelSetObject.cpp.
◆ computeProjectionPoint() [1/2]
std::array< double, 3 > bitpit::LevelSetObject::computeProjectionPoint | ( | const std::array< double, 3 > & | point | ) | const |
Projects a vertex on the zero levelset
- Parameters
-
[in] point point coordinates
- Returns
- the projected point
Definition at line 3322 of file levelSetObject.cpp.
◆ computeProjectionPoint() [2/2]
std::array< double, 3 > bitpit::LevelSetObject::computeProjectionPoint | ( | long | cellId | ) | const |
Computes the projection point of the cell center, i.e. the closest point to the cell center on the zero level set
- Parameters
-
[in] cellId cell id
- Returns
- the projection point
Definition at line 3302 of file levelSetObject.cpp.
◆ computeVertexProjectionPoint()
std::array< double, 3 > bitpit::LevelSetObject::computeVertexProjectionPoint | ( | long | vertexId | ) | const |
Computes the projection point of the vertex, i.e. the closest point to the vertex on the zero level set
- Parameters
-
[in] vertexId vertex id
- Returns
- the projection point
Definition at line 3312 of file levelSetObject.cpp.
◆ createCellCache()
|
protected |
Create the cache that will be used for storing cell information of the specified field.
- Parameters
-
expectedFillIn is the expected fill-in of the cache cacheId is 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.
Definition at line 112 of file levelSetObject.tpp.
◆ createCellLocationCache()
|
protectedvirtual |
Create the cache that will be used for storing cell location information.
- Parameters
-
cacheId is 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.
Definition at line 865 of file levelSetObject.cpp.
◆ createCellPropagatedSignCache()
|
protectedvirtual |
Create the cache that will be used for storing cell propagated sign.
- Parameters
-
cacheId is 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.
Definition at line 1292 of file levelSetObject.cpp.
◆ createFieldCellCache() [1/2]
|
protectedvirtual |
Create the cache that will be used for storing cell information of the specified field.
- Parameters
-
field is the field for which the caches will be added cacheId is 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.
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 2944 of file levelSetObject.cpp.
◆ createFieldCellCache() [2/2]
|
protected |
Create the cache that will be used for storing cell information of the specified field.
- Parameters
-
field is the field for which the caches will be added cacheId is 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.
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 79 of file levelSetObject.tpp.
◆ destroyCellBulkData()
|
protected |
Destroy cell data in the bulk.
Definition at line 1021 of file levelSetObject.cpp.
◆ destroyCellCache()
|
protected |
Destroy the specified cache.
- Parameters
-
cacheId the id of the cell that will be unregistered
Definition at line 3291 of file levelSetObject.cpp.
◆ destroyCellLocationCache()
|
protected |
Destroy identification of cell location.
Definition at line 875 of file levelSetObject.cpp.
◆ destroyCellNarrowBandData()
|
protected |
Destroy cell data inside the narrow band.
Definition at line 469 of file levelSetObject.cpp.
◆ destroyCellPropagatedSignCache()
|
protected |
Destroy data related to sign propagation in the bulk.
Definition at line 1302 of file levelSetObject.cpp.
◆ destroyFieldCellCache()
|
protectedvirtual |
Unregister the specified field cache.
- Parameters
-
field is the field for which the caches will be added
Definition at line 2968 of file levelSetObject.cpp.
◆ disableFieldCellCache()
void bitpit::LevelSetObject::disableFieldCellCache | ( | LevelSetField | field | ) |
Disable the cache for the specified specified field.
- Parameters
-
field is the field for which cache will be disabled
Definition at line 2391 of file levelSetObject.cpp.
◆ dump()
|
protectedvirtual |
Writes LevelSetObject to stream in binary format
- Parameters
-
[in] stream output stream
Definition at line 1779 of file levelSetObject.cpp.
◆ empty()
|
pure virtual |
Implemented in bitpit::LevelSetBooleanBaseObject< LevelSetObject >, bitpit::LevelSetBooleanBaseObject< LevelSetSegmentationBaseObject >, bitpit::LevelSetComplementBaseObject< LevelSetObject >, bitpit::LevelSetComplementBaseObject< LevelSetSegmentationBaseObject >, and bitpit::LevelSetSegmentationObject.
◆ enableFieldCellCache()
void bitpit::LevelSetObject::enableFieldCellCache | ( | LevelSetField | field, |
LevelSetCacheMode | cacheMode ) |
Enable the cache for the specified specified field.
If a cache with the same mode is already defined for the specified field, the function will exit without performing any action. If a cache with a different mode is already defined for the specified field, the existing cache will be destroyed and a new cache with the requested mode will be created from scratch.
- Parameters
-
field is the field for which cache will be enabled cacheMode is the cache mode that will be used for field
Definition at line 2353 of file levelSetObject.cpp.
◆ enableVTKOutput() [1/6]
void bitpit::LevelSetObject::enableVTKOutput | ( | const LevelSetFieldset & | fieldset, |
bool | enable = true ) |
Enables or disables the VTK output
- Parameters
-
[in] fieldset is the fieldset that that should be enabled/disabled [in] enable true for enabling, false for disabling
- Examples
- RBF_example_00001.cpp.
Definition at line 1938 of file levelSetObject.cpp.
◆ enableVTKOutput() [2/6]
void bitpit::LevelSetObject::enableVTKOutput | ( | const LevelSetFieldset & | fieldset, |
const std::string & | objectName, | ||
bool | enable = true ) |
Enables or disables the VTK output The output will be enabled only if the object supports it.
- Parameters
-
[in] fieldset is the fieldset that that should be enabled/disabled [in] objectName is the name that will be associated with the object [in] enable true for enabling, false for disabling
Definition at line 1954 of file levelSetObject.cpp.
◆ enableVTKOutput() [3/6]
void bitpit::LevelSetObject::enableVTKOutput | ( | LevelSetField | field, |
bool | enable = true ) |
Enables or disables the VTK output
- Parameters
-
[in] field is the field that that should be enabled/disabled [in] enable true for enabling, false for disabling
Definition at line 1967 of file levelSetObject.cpp.
◆ enableVTKOutput() [4/6]
void bitpit::LevelSetObject::enableVTKOutput | ( | LevelSetField | field, |
const std::string & | objectName, | ||
bool | enable = true ) |
Enables or disables the VTK output The output will be enabled only if the object supports it.
- Parameters
-
[in] field is the field that that should be enabled/disabled [in] objectName is the name that will be associated with the object [in] enable true for enabling, false for disabling
Definition at line 1983 of file levelSetObject.cpp.
◆ enableVTKOutput() [5/6]
void bitpit::LevelSetObject::enableVTKOutput | ( | LevelSetWriteField | field, |
bool | enable = true ) |
Enables or disables the VTK output
- Parameters
-
[in] field is the field that that should be enabled/disabled [in] enable true for enabling, false for disabling
Definition at line 2012 of file levelSetObject.cpp.
◆ enableVTKOutput() [6/6]
void bitpit::LevelSetObject::enableVTKOutput | ( | LevelSetWriteField | writeField, |
const std::string & | objectName, | ||
bool | enable = true ) |
Enables or disables the VTK output The output will be enabled only if the object supports it.
- Parameters
-
[in] writeField is the write field that that should be enabled/disabled [in] objectName is the name that will be associated with the object [in] enable true for enabling, false for disabling
Definition at line 2028 of file levelSetObject.cpp.
◆ evalCellCacheFillIds() [1/2]
|
protected |
Identify the cells that should be inserted in a cache operating in the specified mode.
- Parameters
-
zone is the zone for which the fillable cells are requested cacheMode is the cache mode for which the fillable cells are requested
- Returns
- The ids of the cells that should be inserted in a cache operating in the specified mode.
Definition at line 2579 of file levelSetObject.cpp.
◆ evalCellCacheFillIds() [2/2]
|
protected |
Identify the newly added cells that should be inserted after a mesh update in a cache operating in the specified mode.
- Parameters
-
zone is the zone for which the fillable cells are requested cacheMode is the cache mode for which the fillable cells are requested adaptionData are the information about the mesh update
- Returns
- The ids of newly added cells that should be inserted after a mesh update in a cache operating in the specified mode.
Definition at line 2608 of file levelSetObject.cpp.
◆ evalCellCacheStaleIds()
|
protected |
Identify the stale cell ids that should be removed from the cache after a mesh update.
- Parameters
-
adaptionData are the information about the mesh update
- Returns
- The stale cell ids that should be removed from the cache after a mesh update.
Definition at line 2880 of file levelSetObject.cpp.
◆ evalCellField()
|
protected |
Evaluate the specified field for the given cell.
- Parameters
-
[in] field is the field that should be evaluated [in] id is the id of the cell where the field should be evaluated [in] evaluator is the function that should be used to evaluate the field when an exact value is requested [in] fallback is the function that should be used to evaluate the field when a dummy value is requested
Definition at line 267 of file levelSetObject.tpp.
◆ evalCellFieldCached()
|
protected |
Evaluate the specified field for the given cell.
The value is first searched in the cache. If the cache doesn't contain an entry for the specified cell, the value is evaluated from scratch and the cache is updated.
- Parameters
-
[in] field is the field that should be evaluated [in] id is the id of the cell where the field should be evaluated [in] evaluator is the function that should be used to evaluate the field when an exact value is requested [in] fallback is the function that should be used to evaluate the field when a dummy value is requested
Definition at line 236 of file levelSetObject.tpp.
◆ evalCellFullCacheFillIds() [1/2]
|
protected |
Identify the cells that should be inserted in a cache operating in "full" mode.
Cache operating in "full" mode should contain all the cells inside the requested zone.
- Parameters
-
zone is the zone for which the fillable cells are requested
- Returns
- The ids of cells that should be inserted in a cache operating in "full" mode.
Definition at line 2776 of file levelSetObject.cpp.
◆ evalCellFullCacheFillIds() [2/2]
|
protected |
Identify the newly added cells that should be inserted after a mesh update in a cache operating in "full" mode.
Cache operating in "full" mode should contain all the cells inside the requested zone.
- Parameters
-
zone is the zone for which the fillable cells are requested adaptionData are the information about the mesh update
- Returns
- The ids of the cells that should be inserted after a mesh update in a cache operating in "full" mode.
Definition at line 2834 of file levelSetObject.cpp.
◆ evalCellGradient()
|
virtual |
Evaluate levelset gradient at the specified cell.
- Parameters
-
[in] id cell id [in] signedLevelSet controls if signed levelset function will be used
- Returns
- The gradient of the levelset at the specified cell.
Definition at line 1678 of file levelSetObject.cpp.
◆ evalCellNarrowBandCacheFillIds() [1/2]
|
protected |
Identify the cells that should be inserted in a cache operating in "narrow band" mode.
Cache operating in "narrow band" mode should contain the cells inside the narrow band.
- Parameters
-
zone is the zone for which the fillable cells are requested
- Returns
- The ids of cells that should be inserted in a cache operating in "narrow band" mode.
Definition at line 2670 of file levelSetObject.cpp.
◆ evalCellNarrowBandCacheFillIds() [2/2]
|
protected |
Identify the newly added cells that should be inserted after a mesh update in a cache operating in "narrow band" mode.
Cache operating in "narrow band" mode should contain the cells inside the narrow band.
- Parameters
-
zone is the zone for which the fillable cells are requested adaptionData are the information about the mesh update
- Returns
- The ids of the cells that should be inserted after a mesh update in a cache operating in "narrow band" mode.
Definition at line 2732 of file levelSetObject.cpp.
◆ evalCellOnDemandCacheFillIds() [1/2]
|
protected |
Identify the cells that should be inserted in a cache operating in "on-demand" mode.
No cells should be automatically added to caches operating in "on-demand" mode.
- Parameters
-
zone is the zone for which the fillable cells are requested
- Returns
- The ids of cells that should be inserted in a cache operating in "on-demand" mode.
Definition at line 2636 of file levelSetObject.cpp.
◆ evalCellOnDemandCacheFillIds() [2/2]
|
protected |
Identify the newly added cells that should be inserted after a mesh update in a cache operating in "on-demand" mode.
No cells should be automatically added to caches operating in "on-demand" mode.
- Parameters
-
zone is the zone for which the fillable cells are requested adaptionData are the information about the mesh update
- Returns
- The ids of the cells that should be inserted after a mesh update in a cache operating in "on-demand" mode.
Definition at line 2654 of file levelSetObject.cpp.
◆ evalCellProjectionPoint()
|
virtual |
Computes the projection point of the cell center, i.e. the closest point to the cell center on the zero level set
- Parameters
-
[in] id cell id
- Returns
- the projection point
Definition at line 1714 of file levelSetObject.cpp.
◆ evalCellSign()
|
virtual |
Evaluate levelset sign at the specified cell.
- Parameters
-
[in] id cell id
- Returns
- The sign of the levelset at the specified cell.
Definition at line 1598 of file levelSetObject.cpp.
◆ evalCellValue()
|
virtual |
Evaluate levelset value at the specified cell.
- Parameters
-
[in] id cell id [in] signedLevelSet controls if signed levelset function will be used
- Returns
- The value of the levelset at the specified cell.
- Examples
- RBF_example_00001.cpp.
Definition at line 1644 of file levelSetObject.cpp.
◆ evalGradient()
|
virtual |
Evaluate levelset gradient at the specified point.
- Parameters
-
point are the coordinates of the point [in] signedLevelSet controls if signed levelset function will be used
- Returns
- The gradient of the levelset at the specified point.
Definition at line 1743 of file levelSetObject.cpp.
◆ evalProjectionPoint()
|
virtual |
Projects a vertex on the zero levelset
- Parameters
-
[in] point point coordinates
- Returns
- the projected point
Definition at line 1762 of file levelSetObject.cpp.
◆ evalSign()
|
virtual |
Evaluate levelset sign at the specified point.
- Parameters
-
point are the coordinates of the point
- Returns
- The sign of the levelset at the specified point.
Definition at line 1723 of file levelSetObject.cpp.
◆ evaluate()
|
protected |
Evaluate object data.
Definition at line 295 of file levelSetObject.cpp.
◆ evaluateCellBulkData()
|
protected |
Evaluate cell data inside the bulk.
Definition at line 998 of file levelSetObject.cpp.
◆ evaluateCellNarrowBandData()
|
protected |
Evaluate cell data inside the narrow band.
Definition at line 444 of file levelSetObject.cpp.
◆ evalValue()
|
virtual |
Evaluate levelset value at the specified point.
- Parameters
-
point are the coordinates of the point [in] signedLevelSet controls if signed levelset function will be used
- Returns
- The value of the levelset at the specified point.
Definition at line 1733 of file levelSetObject.cpp.
◆ evalValueSign()
|
protected |
Evaluates the sign of the given levelset value.
- Parameters
-
[in] value is the levleset value
- Returns
- The sign of the given levelset value.
Definition at line 1771 of file levelSetObject.cpp.
◆ fillCellGeometricNarrowBandLocationCache()
|
protectedvirtual |
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] id is the cell id
- Returns
- The cell location of the cache or LevelSetCellLocation::UNKNOWN if the cell location was not identified.
Implemented in bitpit::LevelSetSegmentationObject.
Definition at line 826 of file levelSetObject.cpp.
◆ fillCellLocationCache() [1/2]
|
protectedvirtual |
Fill the cache that contains the location 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.
Implemented in bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject, LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetSegmentationBaseObject, LevelSetSegmentationBaseObject >, and bitpit::LevelSetSegmentationObject.
Definition at line 550 of file levelSetObject.cpp.
◆ fillCellLocationCache() [2/2]
|
protectedvirtual |
Fill the cache that contains the location 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
-
adaptionData are the information about the mesh update
Implemented in bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject, LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetSegmentationBaseObject, LevelSetSegmentationBaseObject >, and bitpit::LevelSetSegmentationObject.
Definition at line 655 of file levelSetObject.cpp.
◆ fillCellPropagatedSignCache()
|
protectedvirtual |
Fill the cache that contains the propagated cell sign.
Implemented in bitpit::LevelSetBooleanBaseObject< LevelSetObject >, bitpit::LevelSetBooleanBaseObject< LevelSetSegmentationBaseObject >, bitpit::LevelSetComplementBaseObject< LevelSetObject >, and bitpit::LevelSetComplementBaseObject< LevelSetSegmentationBaseObject >.
Definition at line 1031 of file levelSetObject.cpp.
◆ fillFieldCellCache() [1/3]
|
protected |
Fill the cache values associated with the given cell ids for the specified field.
- Parameters
-
field is the field whose cache will be filled cellIds are the ids of the cells whose values will be filled
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 3145 of file levelSetObject.cpp.
◆ fillFieldCellCache() [2/3]
|
protectedvirtual |
Fill the specified field cache of the given cell.
- Parameters
-
field is the field whose cache will be filled id is the id of the cell whose cache will be filled
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 3240 of file levelSetObject.cpp.
◆ fillFieldCellCache() [3/3]
|
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] field is the field that should be evaluated [in] id is the id of the cell where the field should be evaluated [in] value is the value that will be added to the cell
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 302 of file levelSetObject.tpp.
◆ fillFieldCellCaches() [1/2]
|
protected |
Fill the cell caches of the specified fields.
- Parameters
-
zone is the zone where the cell caches will be filled fields are the fields whose caches will be filled
Definition at line 2985 of file levelSetObject.cpp.
◆ fillFieldCellCaches() [2/2]
|
protected |
Fill the cell caches of the specified fields after a mesh update.
- Parameters
-
zone is the zone where the cell caches will be filled fields are the fields whose caches will be filled adaptionData are the information about the mesh update
Definition at line 3027 of file levelSetObject.cpp.
◆ flushData()
|
overridevirtual |
Interface for writing data to the VTK stream.
- Parameters
-
[in] stream output stream [in] name is the name of the data to be written. Either user data or patch data [in] format is the format which must be used. Supported options are "ascii" or "appended". For "appended" type an unformatted binary stream must be used
Implements bitpit::VTKBaseStreamer.
Definition at line 2173 of file levelSetObject.cpp.
◆ flushVTKOutputData() [1/2]
|
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] field is the field [in] stream is the output stream [in] format is the format which must be used. Supported options are "ascii" or "appended". For "appended" type an unformatted binary stream must be used
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 2197 of file levelSetObject.cpp.
◆ flushVTKOutputData() [2/2]
|
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] stream is the output stream [in] format is the format which must be used. Supported options are "ascii" or "appended". For "appended" type an unformatted binary stream must be used [in] field is the field [in] evaluator is the functor that should be used to evaluate the field [in] fallback is the functor that should be used to evaluate the field fallback value
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 164 of file levelSetObject.tpp.
◆ getCellBulkEvaluationMode()
LevelSetBulkEvaluationMode bitpit::LevelSetObject::getCellBulkEvaluationMode | ( | ) | const |
Get the mode that will be used to evaluate cell data in the bulk.
- Returns
- The mode that will be used to evaluate cell data in the bulk.
Definition at line 945 of file levelSetObject.cpp.
◆ getCellCache() [1/2]
|
protected |
Get a pointer to the specified cell cache.
If the specified cell cache was not registered, a null pointer is returned.
- Parameters
-
cacheId the id of the cache that will be unregistered
- Returns
- A pointer to the specified cell cache or a null pointer if the cache was not registered.
Definition at line 61 of file levelSetObject.tpp.
◆ getCellCache() [2/2]
|
protected |
Get a pointer to the specified cell cache.
If specified cell cache was not registered or if an invalid cache id is specified, a null pointer is returned.
- Parameters
-
cacheId the id of the cell that will be unregistered
- Returns
- A pointer to the specified cell cache.
Definition at line 3277 of file levelSetObject.cpp.
◆ getCellLocation()
|
protected |
Get the location associated with the specified cell.
- Parameters
-
[in] id is the cell id
- Returns
- The location associated with the specified cell.
Definition at line 483 of file levelSetObject.cpp.
◆ getCellZone()
|
protected |
Get the zone of the specified cell.
- Parameters
-
[in] id is the cell id
- Returns
- Return the zone of the specified cell.
Definition at line 517 of file levelSetObject.cpp.
◆ getFieldCellCache() [1/2]
|
protected |
Get a pointer to the cell cache for the specified field.
If a cache was not enabled for the specified field, a null pointer is returned. If a cache was enabled for the field, but it was not yet created, it will be created now.
- Parameters
-
field is the field for which the caches is requested
- Returns
- A pointer to the cell cache for the specified field.
Definition at line 40 of file levelSetObject.tpp.
◆ getFieldCellCache() [2/2]
|
protected |
Get a pointer to the cell cache for the specified field.
If no cache was registered for the specified field, a null pointer is returned.
- Parameters
-
field is the field whose cache will be retrieved
- Returns
- A pointer to the cell cache for the specified field.
Definition at line 2910 of file levelSetObject.cpp.
◆ getFieldCellCacheId()
|
protected |
Get the id of the cache associated with the specified field.
- Parameters
-
field is the specified field
- Returns
- The id of the cache associated with the specified field.
Definition at line 2929 of file levelSetObject.cpp.
◆ getFieldCellCacheMode()
LevelSetCacheMode bitpit::LevelSetObject::getFieldCellCacheMode | ( | LevelSetField | field | ) | const |
Get the cache mode associated with the specified field.
- Parameters
-
field is the specified field
- Returns
- The cache mode associated with the specified field.
Definition at line 2335 of file levelSetObject.cpp.
◆ getId()
int bitpit::LevelSetObject::getId | ( | ) | const |
Get the id of the object.
- Returns
- The id of the object.
Definition at line 279 of file levelSetObject.cpp.
◆ getKernel() [1/2]
|
protectedvirtual |
Gets a pointer to the kernel of the object.
- Returns
- A pointer to the kernel of the object.
Definition at line 263 of file levelSetObject.cpp.
◆ getKernel() [2/2]
|
virtual |
Gets a constant pointer to the kernel of the object.
- Returns
- A constant pointer to the kernel of the object.
Definition at line 271 of file levelSetObject.cpp.
◆ getLevelSetInfo()
LevelSetInfo bitpit::LevelSetObject::getLevelSetInfo | ( | long | cellId | ) | const |
Get LevelSetInfo of cell
- Parameters
-
[in] cellId cell idex
- Returns
- LevelSetInfo of cell
Definition at line 3364 of file levelSetObject.cpp.
◆ getLS()
double bitpit::LevelSetObject::getLS | ( | long | cellId | ) | const |
Get the levelset value of cell
- Parameters
-
[in] cellId cell id
- Returns
- levelset value in cell
Definition at line 3375 of file levelSetObject.cpp.
◆ getNarrowBandSize()
double bitpit::LevelSetObject::getNarrowBandSize | ( | ) | const |
Get the physical size of the narrow band.
The size of the narrow band is the absolute distance from the zero-levelset iso surface below which a point is considered belonging to the narrow band. Setting the size of the narrow band to LEVELSET_NARROW_BAND_UNLIMITED means that the whole domain belongs to the narrow band. Regardless of the specified size, the narrow band will always contain the intersected cells and their neighbours.
- Returns
- The physical size of the narrow band.
Definition at line 384 of file levelSetObject.cpp.
◆ getReferenceCount()
std::size_t bitpit::LevelSetObject::getReferenceCount | ( | ) | const |
Count how many times the object is referenced by other objects.
- Returns
- The number of times the object is referenced by other objects.
Definition at line 221 of file levelSetObject.cpp.
◆ getSizeNarrowBand()
double bitpit::LevelSetObject::getSizeNarrowBand | ( | ) | const |
Get the current size of the narrow band. The function will always return an "infinite" distance.
- Returns
- size of the current narrow band
Definition at line 3386 of file levelSetObject.cpp.
◆ getSupportedFields()
|
virtual |
Get the list of supported field.
- Returns
- The list of supported field.
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 175 of file levelSetObject.cpp.
◆ getVTKOutputDataName()
|
protected |
Get the name that will be used by the VTK writer for the specifed data.
- Parameters
-
[in] field is the field [in] objectName is the name that will be associated with the object
- Returns
- The name that will be used by the VTK writer for the specifed data.
Definition at line 2126 of file levelSetObject.cpp.
◆ getVTKOutputFieldName()
|
protectedvirtual |
Get the name that will be used by the VTK writer for the specifed field.
- Parameters
-
[in] field is the field
- Returns
- The name that will be used by the VTK writer for the specifed field.
Implemented in bitpit::LevelSetSegmentationBaseObject.
Definition at line 2142 of file levelSetObject.cpp.
◆ hasVTKOutputData()
|
protected |
Check if the VTK writer has data associated with the specified field.
- Parameters
-
[in] field is the field [in] objectName is the name that will be associated with the object
- Returns
- True if the VTK writer has data associated with the specified field, false otherwise.
Definition at line 2062 of file levelSetObject.cpp.
◆ intersectSurface()
LevelSetIntersectionStatus bitpit::LevelSetObject::intersectSurface | ( | long | id, |
LevelSetIntersectionMode | mode = LevelSetIntersectionMode::FAST_FUZZY ) const |
Function for checking if the specified cell intersects the zero-levelset iso-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] id cell id [in] mode describes the types of check that should be performed
- Returns
- indicator regarding intersection
Definition at line 1341 of file levelSetObject.cpp.
◆ isCellInNarrowBand()
|
virtual |
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] id is the cell id
- Returns
- Return true if the cell is in the narrow band, false otherwise.
Implemented in bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject, LevelSetObject >, and bitpit::LevelSetProxyObject< LevelSetSegmentationBaseObject, LevelSetSegmentationBaseObject >.
Definition at line 896 of file levelSetObject.cpp.
◆ isCellIntersected()
LevelSetIntersectionStatus bitpit::LevelSetObject::isCellIntersected | ( | long | id, |
LevelSetIntersectionMode | mode = LevelSetIntersectionMode::FAST_FUZZY ) const |
Function for checking if the specified cell intersects the zero-levelset iso-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] id cell id [in] mode describes the types of check that should be performed
- Returns
- indicator regarding intersection
Definition at line 1379 of file levelSetObject.cpp.
◆ isInNarrowBand()
|
virtual |
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.
If a point is inside a cell that belongs to the narrow band because it is a neighbour of a cell with a different levelset sign, its function may identify the point as outside the narrow band. That's because it will only compare the levelset of the point with the narrow band size. The extreme case is when the narrow band size is set to zero and being a neighbour of a cell with a different levelset sign is the only criterion to identify cells inside the narrow band. In this situation, this function will identify as inside the narrow band only the points that lie on the levelset-zero iso surface.
- Parameters
-
point are the coordinates of the point
- Returns
- Return true if the cell is in the narrow band, false otherwise.
Implemented in bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject, LevelSetObject >, and bitpit::LevelSetProxyObject< LevelSetSegmentationBaseObject, LevelSetSegmentationBaseObject >.
Definition at line 919 of file levelSetObject.cpp.
◆ isInterfaceIntersected() [1/2]
LevelSetIntersectionStatus bitpit::LevelSetObject::isInterfaceIntersected | ( | long | id | ) | const |
Check if the specified interface intersects the zero-levelset iso-surface.
The iso-surface is considered planar.
- Parameters
-
[in] id is the interface index
- Returns
- the level set status
Definition at line 1439 of file levelSetObject.cpp.
◆ isInterfaceIntersected() [2/2]
LevelSetIntersectionStatus bitpit::LevelSetObject::isInterfaceIntersected | ( | long | id, |
bool | invert, | ||
std::array< std::array< double, 3 >, 2 > * | intersection, | ||
std::vector< std::array< double, 3 > > * | polygon ) const |
Check if the specified interface intersects the zero-levelset iso-surface.
The iso-surface is considered planar. Calculate the intersection as a segment defined by two points and the part of the interface belonging to the subspace of negative level-set. If the interface is not intersected, an empty polygon is returned. The interface belonging to the possitive level-set subspace is returned if the "invert" argument is false.
- Parameters
-
[in] id is the interface index [in] invert when false the part of the interface occupying the possitive levelset area is returned [in] signedLevelSet controls if signed levelset function will be used [out] intersection If intersects, return the cutting segment. In case of a liner interface the intersection degenerates to a point which coincides with the begining and the ending of the segment [out] polygon is the polygon constructed by the interface intersection placed on the opposite subspace of the one pointed by the plane's normal
- Returns
- the level set status
Definition at line 1424 of file levelSetObject.cpp.
◆ isPrimary()
|
virtual |
Check if the levelset is a primary object (e.g. of a surface triangulation) or not (e.g. derived by boolean operations between two levelsets)
- Returns
- Returns true if object is a primary object, false otherwise.
Implemented in bitpit::LevelSetProxyObject< SourceLevelSetObject, BaseLevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject >, bitpit::LevelSetProxyObject< LevelSetObject, LevelSetObject >, and bitpit::LevelSetProxyObject< LevelSetSegmentationBaseObject, LevelSetSegmentationBaseObject >.
Definition at line 288 of file levelSetObject.cpp.
◆ pruneCellCache()
|
protected |
Remove the values associated with the given cell ids from the specified cache.
- Parameters
-
cacheId is the id of the cache cellIds are the ids of the cells whose values will be removed from the cache
Definition at line 2553 of file levelSetObject.cpp.
◆ removeVTKOutputData()
|
protected |
Remove the VTK data associated with the specified field.
- Parameters
-
[in] field is the field [in] objectName is the name that will be associated with the object
Definition at line 2077 of file levelSetObject.cpp.
◆ restore()
|
protectedvirtual |
Reads LevelSetObject from stream in binary format
- Parameters
-
[in] stream output stream
Definition at line 1843 of file levelSetObject.cpp.
◆ setCellBulkEvaluationMode()
void bitpit::LevelSetObject::setCellBulkEvaluationMode | ( | LevelSetBulkEvaluationMode | evaluationMode | ) |
Set the mode that will be used to evaluate cell data in the bulk.
- Parameters
-
evaluationMode is the mode that will be used to evaluate cell data in the bulk.
- Examples
- RBF_example_00001.cpp.
Definition at line 955 of file levelSetObject.cpp.
◆ setDefaultLevelSetSigndness()
|
protected |
Set whether a signed or unsigned levelset is used when signdness is not explicitly specified. This function is only needed for guarantee backwards compatibility with older versions. In such versions, functions for evaluating levelset information were not taking in input the signdness.
- Parameters
-
signedLevelSet controls if signed levelset function will be used
Definition at line 234 of file levelSetObject.cpp.
◆ setKernel()
|
protectedvirtual |
Sets the kernel for the object.
- Parameters
-
[in] kernel is the kernel that will be associated with the object
Definition at line 242 of file levelSetObject.cpp.
◆ setNarrowBandSize()
|
protected |
Set the physical size of the narrow band.
The size of the narrow band is the absolute distance from the zero-levelset iso surface below which a point is considered belonging to the narrow band. Setting the size of the narrow band to LEVELSET_NARROW_BAND_UNLIMITED means that the whole domain belongs to the narrow band. Regardless of the specified size, the narrow band will always contain the intersected cells and their neighbours.
- Parameters
-
size is the physical size of the narrow band
Definition at line 400 of file levelSetObject.cpp.
◆ setSizeNarrowBand()
|
protected |
Manually set the size of the narrow band. The function is a no-op.
- Parameters
-
[in] r size of the narrow band.
Definition at line 3395 of file levelSetObject.cpp.
◆ startCellCacheExchange()
|
protected |
Start data exchange for the specified cell cache.
- Parameters
-
[in] sendCellIds is the list of cell ids to send [in] cacheId is the id of the caches whose data will be exchanged [in,out] dataCommunicator is the data communicator that will be used for the data exchange
Definition at line 2241 of file levelSetObject.cpp.
◆ startCellCachesExchange()
|
protected |
Start data exchange for the specified cell caches.
- Parameters
-
[in] sendCellIds is the list of cell ids to send [in] cacheIds are the ids of the caches whose data will be exchanged [in,out] dataCommunicator is the data communicator that will be used for the data exchange
Definition at line 2254 of file levelSetObject.cpp.
◆ update()
void bitpit::LevelSetObject::update | ( | const std::vector< adaption::Info > & | adaptionData | ) |
Updates object data after a mesh update.
- Parameters
-
[in] adaptionData are the information about the mesh update
Definition at line 337 of file levelSetObject.cpp.
◆ updateCellBulkData()
|
protected |
Update cell data inside the bulk.
Definition at line 1009 of file levelSetObject.cpp.
◆ updateCellNarrowBandData()
|
protected |
Update cell data inside the narrow band after a mesh update.
- Parameters
-
adaptionData are the information about the mesh update
Definition at line 458 of file levelSetObject.cpp.
Friends And Related Symbol Documentation
◆ LevelSet
|
friend |
Definition at line 57 of file levelSetObject.hpp.
◆ LevelSetProxyObject
|
friend |
Definition at line 60 of file levelSetObject.hpp.
Member Data Documentation
◆ CELL_CACHE_IS_SIGNED
|
staticprotected |
Controls if the cache stores signed values.
The implemented algorithms requires that the cache stores unsigned values.
Definition at line 134 of file levelSetObject.hpp.
◆ CELL_LOCATION_INTERSECTION_MODE
|
staticprotected |
Intersection mode that should be used when detecting the location of a cell.
This intersection mode needs to be FAST_GUARANTEE_FALSE because we can accept cells tagged as intersecting the surface but actually not intersecting it, but we cannot accept cells tagged as not intersecting the surface but actually intersecting it. There are places where we make use of the fact that the identification of the location uses the FAST_GUARANTEE_FALSE mode (for example when checking if a cell intersects the zero-levelset iso-surface).
Definition at line 135 of file levelSetObject.hpp.
◆ m_cellLocationCacheId
|
protected |
Id of the cache that will keep track if cell zones.
Definition at line 145 of file levelSetObject.hpp.
◆ m_cellPropagatedSignCacheId
|
protected |
Id of the cache that will keep track if cell propagated sign.
Definition at line 146 of file levelSetObject.hpp.
◆ m_defaultSignedLevelSet
|
protected |
Definition at line 139 of file levelSetObject.hpp.
◆ m_enabledOutputFields
|
protected |
Definition at line 141 of file levelSetObject.hpp.
◆ m_kernel
|
protected |
Levelset kernel
Definition at line 137 of file levelSetObject.hpp.
◆ m_narrowBandSize
|
protected |
Size of narrow band.
Definition at line 143 of file levelSetObject.hpp.
The documentation for this interface was generated from the following files:
- src/levelset/levelSetObject.hpp
- src/levelset/levelSetObject.cpp
- src/levelset/levelSetObject.tpp
