Implements the levelset around a set of cells or interfaces of the kernel. More...
Public Member Functions | |
LevelSetMaskObject (int, const std::unordered_set< long > &, const VolumeKernel &) | |
LevelSetMaskObject (int, const std::vector< long > &, long, bool, const VolumeKernel &) | |
Public Member Functions inherited from bitpit::LevelSetSegmentationObject | |
LevelSetSegmentationObject (const LevelSetSegmentationObject &other) | |
LevelSetSegmentationObject (int) | |
LevelSetSegmentationObject (int, const SurfUnstructured *surface, double featureAngle, LevelSetSurfaceSmoothing surfaceSmoothing) | |
LevelSetSegmentationObject (int, const SurfUnstructured *surface, double featureAngle=2. *BITPIT_PI) | |
LevelSetSegmentationObject (int, std::unique_ptr< const SurfUnstructured > &&surface, double featureAngle=2. *BITPIT_PI) | |
LevelSetSegmentationObject (LevelSetSegmentationObject &&other)=default | |
LevelSetSegmentationObject * | clone () const override |
bool | empty () const override |
double | getFeatureAngle () const |
double | getMaxSurfaceFeatureSize () const |
double | getMinSurfaceFeatureSize () const |
const SurfaceSkdTree & | getSearchTree () const |
const SurfUnstructured & | getSurface () const |
LevelSetSurfaceSmoothing | getSurfaceSmoothing () const |
void | setSurface (const SurfUnstructured *surface, bool force=false) |
void | setSurface (const SurfUnstructured *surface, double featureAngle, bool force=false) |
void | setSurface (const SurfUnstructured *surface, double featureAngle, LevelSetSurfaceSmoothing surfaceSmoothing, bool force=false) |
void | setSurface (std::unique_ptr< const SurfUnstructured > &&surface, bool force=false) |
void | setSurface (std::unique_ptr< const SurfUnstructured > &&surface, double featureAngle, bool force=false) |
Public Member Functions inherited from bitpit::LevelSetSegmentationBaseObject | |
std::array< double, 3 > | evalCellNormal (long id, bool signedLevelSet) const |
int | evalCellPart (long id) const |
long | evalCellSupport (long id, double searchRadius=AUTOMATIC_SEARCH_RADIUS) const |
const SurfUnstructured & | evalCellSurface (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 SurfUnstructured & | evalSurface (const std::array< double, 3 > &point) const |
std::array< double BITPIT_COMMA 3 > | getNormal (const std::array< double, 3 > &point) const |
std::array< double BITPIT_COMMA 3 > | getNormal (long cellId) const |
int | getPart (const std::array< double, 3 > &point) const |
int | getPart (long cellId) const |
long | getSupport (const std::array< double, 3 > &point) const |
long | getSupport (long cellId) const |
LevelSetFieldset | getSupportedFields () const override |
double | getSurfaceFeatureSize (const std::array< double, 3 > &point) const |
double | getSurfaceFeatureSize (long cellId) const |
LevelSetObject (const LevelSetObject &other) | |
LevelSetObject (int) | |
LevelSetObject (LevelSetObject &&other) | |
Public Member Functions inherited from bitpit::LevelSetObject | |
virtual | ~LevelSetObject () |
BITPIT_DEPRECATED_FOR (double getValue(long cellId) const, double evalCellValue(long id, bool signedLevelSet) const) | |
BITPIT_DEPRECATED_FOR (short getSign(long cellId) const, short evalCellSign(long id) const) | |
BITPIT_DEPRECATED_FOR (std::array< double BITPIT_COMMA 3 > getGradient(long cellId) const, std::array< double BITPIT_COMMA 3 > evalCellGradient(long id, bool signedLevelSet) const) | |
std::array< double BITPIT_COMMA 3 > | computeProjectionPoint (const std::array< double, 3 > &point) const |
std::array< double BITPIT_COMMA 3 > | computeProjectionPoint (long cellId) const |
std::array< double BITPIT_COMMA 3 > | computeVertexProjectionPoint (long vertexId) const |
void | disableFieldCellCache (LevelSetField field) |
void | enableFieldCellCache (LevelSetField field, LevelSetCacheMode cacheMode) |
void | enableVTKOutput (const LevelSetFieldset &fieldset, bool enable=true) |
void | enableVTKOutput (const LevelSetFieldset &fieldset, const std::string &objectName, bool enable=true) |
void | enableVTKOutput (LevelSetField field, bool enable=true) |
void | enableVTKOutput (LevelSetField field, const std::string &objectName, bool enable=true) |
void | enableVTKOutput (LevelSetWriteField field, bool enable=true) |
void | enableVTKOutput (LevelSetWriteField fieldset, const std::string &objectName, bool enable=true) |
virtual std::array< double, 3 > | evalCellGradient (long id, bool signedLevelSet) const |
virtual std::array< double, 3 > | evalCellProjectionPoint (long id) const |
virtual short | evalCellSign (long id) const |
virtual double | evalCellValue (long id, bool signedLevelSet) const |
virtual std::array< double, 3 > | evalGradient (const std::array< double, 3 > &point, bool signedLevelSet) const |
virtual std::array< double, 3 > | evalProjectionPoint (const std::array< double, 3 > &point) const |
virtual short | evalSign (const std::array< double, 3 > &point) const |
virtual double | evalValue (const std::array< double, 3 > &point, bool signedLevelSet) const |
void | flushData (std::fstream &, const std::string &, VTKFormat) override |
LevelSetBulkEvaluationMode | getCellBulkEvaluationMode () const |
LevelSetCacheMode | getFieldCellCacheMode (LevelSetField field) const |
int | getId () const |
virtual const LevelSetKernel * | getKernel () 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 |
Additional Inherited Members | |
Public Types inherited from bitpit::LevelSetObject | |
typedef LevelSetCachedKernel::CellCacheCollection | CellCacheCollection |
Static Public Attributes inherited from bitpit::LevelSetSegmentationBaseObject | |
static BITPIT_PUBLIC_API const double | AUTOMATIC_SEARCH_RADIUS = -1 |
Protected Types inherited from bitpit::LevelSetObject | |
template<typename data_t > | |
using | CellCacheEntry = typename CellCacheCollection::ValueCache<data_t>::Entry |
Protected Member Functions inherited from bitpit::LevelSetSegmentationObject | |
std::array< double, 3 > | _evalCellGradient (long id, bool signedLevelSet) const override |
std::array< double, 3 > | _evalCellNormal (long id, bool signedLevelSet) const override |
short | _evalCellSign (long id) const override |
long | _evalCellSupport (long id, double searchRadius=AUTOMATIC_SEARCH_RADIUS) const override |
const SurfUnstructured & | _evalCellSurface (long id) const override |
double | _evalCellValue (long id, bool signedLevelSet) const override |
std::array< double, 3 > | _evalGradient (const std::array< double, 3 > &point, bool signedLevelSet) const override |
void | _evalProjection (const std::array< double, 3 > &point, bool signedLevelSet, std::array< double, 3 > *projectionPoint, std::array< double, 3 > *projectionNormal) const override |
short | _evalSign (const std::array< double, 3 > &point) const override |
long | _evalSupport (const std::array< double, 3 > &point) const override |
long | _evalSupport (const std::array< double, 3 > &point, double searchRadius) const override |
const SurfUnstructured & | _evalSurface (const std::array< double, 3 > &point) const override |
double | _evalValue (const std::array< double, 3 > &point, bool signedLevelSet) const override |
LevelSetCellLocation | fillCellGeometricNarrowBandLocationCache (long id) override |
void | fillCellLocationCache () override |
void | fillCellLocationCache (const std::vector< adaption::Info > &adaptionData) override |
Protected Member Functions inherited from bitpit::LevelSetSegmentationBaseObject | |
LevelSetSegmentationBaseObject (int, const LevelSetSegmentationSurfaceInfo *surfaceInfo) | |
virtual int | _evalCellPart (long id) const |
virtual int | _evalPart (const std::array< double, 3 > &point) const |
LevelSetIntersectionStatus | _intersectSurface (long, double distance, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const override |
void | addVTKOutputData (LevelSetField field, const std::string &objectName) override |
template<typename value_t > | |
std::size_t | createFieldCellCache (LevelSetField field, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID) |
virtual std::size_t | createFieldCellCache (LevelSetField field, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID) |
std::size_t | createFieldCellCache (LevelSetField field, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID) override |
void | fillFieldCellCache (LevelSetField field, const std::vector< long > &cellIds) |
virtual void | fillFieldCellCache (LevelSetField field, long id) |
void | fillFieldCellCache (LevelSetField field, long id) override |
template<typename value_t > | |
void | fillFieldCellCache (LevelSetField field, long id, const value_t &value) const |
virtual void | flushVTKOutputData (std::fstream &stream, VTKFormat format, LevelSetField field) const |
void | flushVTKOutputData (std::fstream &stream, VTKFormat format, LevelSetField field) const override |
template<typename value_t , typename evaluator_t , typename fallback_t > | |
void | flushVTKOutputData (std::fstream &stream, VTKFormat format, LevelSetField field, const evaluator_t evluator, const fallback_t fallback) const |
std::string | getVTKOutputFieldName (LevelSetField field) const override |
Protected Member Functions inherited from bitpit::LevelSetObject | |
void | adaptCellCaches (const std::vector< adaption::Info > &adaptionData) |
void | clearCellCache (std::size_t cacheId, bool release) |
void | completeCellCacheExchange (const std::unordered_map< int, std::vector< long > > &sendCellIds, std::size_t cacheIds, DataCommunicator *) |
void | completeCellCachesExchange (const std::unordered_map< int, std::vector< long > > &sendCellIds, const std::vector< std::size_t > &cacheIds, DataCommunicator *) |
template<typename value_t > | |
std::size_t | createCellCache (LevelSetFillIn expectedFillIn, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID) |
virtual std::size_t | createCellLocationCache (std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID) |
virtual std::size_t | createCellPropagatedSignCache (std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID) |
void | destroyCellBulkData () |
void | destroyCellCache (std::size_t cacheId) |
void | destroyCellLocationCache () |
void | destroyCellNarrowBandData () |
void | destroyCellPropagatedSignCache () |
virtual void | destroyFieldCellCache (LevelSetField field) |
virtual void | dump (std::ostream &) |
std::vector< long > | evalCellCacheFillIds (LevelSetZone zone, LevelSetCacheMode cacheMode) const |
std::vector< long > | evalCellCacheFillIds (LevelSetZone zone, LevelSetCacheMode cacheMode, const std::vector< adaption::Info > &adaptionData) const |
std::vector< long > | evalCellCacheStaleIds (const std::vector< adaption::Info > &adaptionData) const |
template<typename value_t , typename evaluator_t , typename fallback_t > | |
value_t | evalCellField (LevelSetField field, long id, const evaluator_t &evaluator, const fallback_t &fallback) const |
template<typename value_t , typename evaluator_t , typename fallback_t > | |
value_t | evalCellFieldCached (LevelSetField field, long id, const evaluator_t &evaluator, const fallback_t &fallback) const |
std::vector< long > | evalCellFullCacheFillIds (LevelSetZone zone) const |
std::vector< long > | evalCellFullCacheFillIds (LevelSetZone zone, const std::vector< adaption::Info > &adaptionData) const |
std::vector< long > | evalCellNarrowBandCacheFillIds (LevelSetZone zone) const |
std::vector< long > | evalCellNarrowBandCacheFillIds (LevelSetZone zone, const std::vector< adaption::Info > &adaptionData) const |
std::vector< long > | evalCellOnDemandCacheFillIds (LevelSetZone zone) const |
std::vector< long > | evalCellOnDemandCacheFillIds (LevelSetZone zone, const std::vector< adaption::Info > &adaptionData) const |
void | evaluate () |
void | evaluateCellBulkData () |
void | evaluateCellNarrowBandData () |
short | evalValueSign (double value) const |
virtual void | fillCellPropagatedSignCache () |
void | fillFieldCellCaches (LevelSetZone zone, const std::vector< LevelSetField > &fields) |
void | fillFieldCellCaches (LevelSetZone zone, const std::vector< LevelSetField > &fields, const std::vector< adaption::Info > &adaptionData) |
template<typename value_t > | |
CellCacheCollection::ValueCache< value_t > * | getCellCache (std::size_t cacheId) const |
CellCacheCollection::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 |
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 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 |
LevelSetKernel * | m_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 |
Implements the levelset around a set of cells or interfaces of the kernel.
Definition at line 42 of file levelSetMaskObject.hpp.
bitpit::LevelSetMaskObject::LevelSetMaskObject | ( | int | id, |
const std::unordered_set< long > & | mask, | ||
const VolumeKernel & | mesh ) |
Constructor
[in] | id | identifier of object |
[in] | mask | the list of inner cells |
[in] | mesh | the mesh hosting the cells |
Definition at line 41 of file levelSetMaskObject.cpp.
bitpit::LevelSetMaskObject::LevelSetMaskObject | ( | int | id, |
const std::vector< long > & | list, | ||
long | interfaceId, | ||
bool | invert, | ||
const VolumeKernel & | mesh ) |
Constructor
[in] | id | identifier of object |
[in] | list | the list of interfaces |
[in] | interfaceId | id of reference interface |
[in] | invert | if orientation should be inverted with respect to the reference interface |
[in] | mesh | the mesh hosting the cells |
Definition at line 75 of file levelSetMaskObject.cpp.