Loading...
Searching...
No Matches
levelSetSegmentationObject.hpp
63 LevelSetSegmentationSurfaceInfo(const SurfUnstructured *surface, double featureAngle, LevelSetSurfaceSmoothing surfaceSmoothing = LevelSetSurfaceSmoothing::LOW_ORDER);
64 LevelSetSegmentationSurfaceInfo(std::unique_ptr<const SurfUnstructured> &&surface, double featureAngle, LevelSetSurfaceSmoothing surfaceSmoothing = LevelSetSurfaceSmoothing::LOW_ORDER);
67 void setSurface(std::unique_ptr<const SurfUnstructured> &&surface, double featureAngle = DEFAULT_FEATURE_ANGLE);
69 void setSurface(const SurfUnstructured *surface, double featureAngle, LevelSetSurfaceSmoothing surfaceSmoothing);
76 double evalDistance(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, bool signedDistance, std::array<double, 3> *distanceVector) const;
77 double evalDistance(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, bool signedDistance) const;
78 std::array<double, 3> evalDistanceVector(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr) const;
80 std::array<double, 3> evalNormal(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr) const;
81 std::array<double,3> evalPseudoNormal(const SurfUnstructured::CellConstIterator &segmentIterator, const double *lambda) const;
83 void evalProjection(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
84 void evalProjection(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, std::array<double, 3> *projectionPoint) const;
85 std::array<double, 3> evalProjection(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, double *lambda) const;
104 mutable std::unordered_map<SegmentVertexKey, std::array<double,3>, utils::hashing::hash<SegmentVertexKey>> m_limitedSegmentVertexNormalStorage;
106 void evalProjectionOnVertex(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
107 void evalHighOrderProjectionOnLine(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
108 void evalHighOrderProjectionOnTriangle(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
109 void evalHighOrderProjectionOnPolygon(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
110 void evalHighOrderProjection(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
112 void evalLowOrderProjectionOnLine(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
113 void evalLowOrderProjectionOnTriangle(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
114 void evalLowOrderProjectionOnPolygon(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
115 void evalLowOrderProjection(const std::array<double, 3> &point, const SegmentConstIterator &segmentItr, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
117 std::array<double,3> computePseudoNormal( const SurfUnstructured::CellConstIterator &segmentIterator, const double *lambda ) const;
118 std::array<double,3> computeSurfaceNormal( const SurfUnstructured::CellConstIterator &segmentIterator, const double *lambda ) const;
120 std::array<double,3> computeSegmentNormal( const SurfUnstructured::CellConstIterator &segmentIterator ) const;
121 std::array<double,3> computeSegmentEdgeNormal(const SegmentConstIterator &segmentItr, int edge, bool limited ) const;
147 void evalProjection(const std::array<double,3> &point, bool signedLevelSet, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
155 BITPIT_DEPRECATED(std::array<double BITPIT_COMMA 3> getNormal(const std::array<double,3> &point) const);
163 std::size_t createFieldCellCache(LevelSetField field, std::size_t cacheId = CellCacheCollection::NULL_CACHE_ID) override;
167 LevelSetIntersectionStatus _isCellIntersected(long, double distance, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const override;
168 virtual LevelSetIntersectionStatus _isInterfaceIntersected(long id, bool invert, std::array<std::array<double, 3>, 2> *intersection, std::vector<std::array<double, 3>> *polygon) const override;
173 virtual long _evalCellSupport(long id, double searchRadius = AUTOMATIC_SEARCH_RADIUS) const = 0;
179 virtual void _evalProjection(const std::array<double,3> &point, bool signedLevelSet, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const = 0;
183 void flushVTKOutputData(std::fstream &stream, VTKFormat format, LevelSetField field) const override;
191 LevelSetSegmentationObject(int, std::unique_ptr<const SurfUnstructured> &&surface, double featureAngle = 2. * BITPIT_PI);
192 LevelSetSegmentationObject(int, const SurfUnstructured *surface, double featureAngle = 2. * BITPIT_PI);
193 LevelSetSegmentationObject(int, const SurfUnstructured *surface, double featureAngle, LevelSetSurfaceSmoothing surfaceSmoothing);
203 void setSurface(std::unique_ptr<const SurfUnstructured> &&surface, double featureAngle, bool force = false);
206 void setSurface(const SurfUnstructured *surface, double featureAngle, LevelSetSurfaceSmoothing surfaceSmoothing, bool force = false);
230 std::array<double,3> _evalGradient(const std::array<double,3> &point, bool signedLevelSet) const override;
234 void _evalProjection(const std::array<double,3> &point, bool signedLevelSet, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const override;
236 LevelSetIntersectionStatus _isInterfaceIntersected(long id, bool invert, std::array<std::array<double, 3>, 2> *intersection, std::vector<std::array<double, 3>> *polygon) const override;
245 std::array<double,3> _evalGradient(const std::array<double,3> &point, long support, bool signedLevelSet) const;
246 void _evalProjection(const std::array<double,3> &point, long support, bool signedLevelSet, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const;
251class LevelSetBooleanObject<LevelSetSegmentationBaseObject>: public LevelSetBooleanBaseObject<LevelSetSegmentationBaseObject> {
254 LevelSetBooleanObject(int, LevelSetBooleanOperation, const LevelSetSegmentationBaseObject *, const LevelSetSegmentationBaseObject *);
255 LevelSetBooleanObject(int, LevelSetBooleanOperation, const std::vector<const LevelSetSegmentationBaseObject *> &);
269 void _evalProjection(const std::array<double,3> &point, bool signedLevelSet, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const override;
274class LevelSetComplementObject<LevelSetSegmentationBaseObject>: public LevelSetComplementBaseObject<LevelSetSegmentationBaseObject> {
291 void _evalProjection(const std::array<double,3> &point, bool signedLevelSet, std::array<double, 3> *projectionPoint, std::array<double, 3> *projectionNormal) const override;
LevelSetBooleanBaseObject(int, LevelSetBooleanOperation, const LevelSetSegmentationBaseObject *, const LevelSetSegmentationBaseObject *)
Definition levelSetBooleanObject.tpp:144
LevelSetBooleanObject< LevelSetSegmentationBaseObject > * clone() const override
Definition levelSetSegmentationObject.cpp:3384
const SurfUnstructured & _evalSurface(const std::array< double, 3 > &point) const override
Definition levelSetSegmentationObject.cpp:3452
long _evalCellSupport(long id, double searchRadius=AUTOMATIC_SEARCH_RADIUS) const override
Definition levelSetSegmentationObject.cpp:3405
LevelSetBooleanObject(int, LevelSetBooleanOperation, const LevelSetSegmentationBaseObject *, const LevelSetSegmentationBaseObject *)
Definition levelSetSegmentationObject.cpp:3365
int _evalCellPart(long id) const override
Definition levelSetSegmentationObject.cpp:3416
int _evalPart(const std::array< double, 3 > &point) const override
Definition levelSetSegmentationObject.cpp:3524
long _evalSupport(const std::array< double, 3 > &point) const override
Definition levelSetSegmentationObject.cpp:3463
const SurfUnstructured & _evalCellSurface(long id) const override
Definition levelSetSegmentationObject.cpp:3394
void _evalProjection(const std::array< double, 3 > &point, bool signedLevelSet, std::array< double, 3 > *projectionPoint, std::array< double, 3 > *projectionNormal) const override
Definition levelSetSegmentationObject.cpp:3498
std::array< double, 3 > _evalCellNormal(long id, bool signedLevelSet) const override
Definition levelSetSegmentationObject.cpp:3428
Class which deals with boolean operation between two LevelSetObjects.
Definition levelSetBooleanObject.hpp:113
bitpit::LevelSetComplementBaseObject< LevelSetSegmentationBaseObject >::LevelSetComplementBaseObject
LevelSetComplementBaseObject(int id, const LevelSetSegmentationBaseObject *source)
Definition levelSetComplementObject.tpp:50
LevelSetComplementObject< LevelSetSegmentationBaseObject > * clone() const override
Definition levelSetSegmentationObject.cpp:3544
long _evalCellSupport(long id, double searchRadius=AUTOMATIC_SEARCH_RADIUS) const override
Definition levelSetSegmentationObject.cpp:3571
long _evalSupport(const std::array< double, 3 > &point) const override
Definition levelSetSegmentationObject.cpp:3621
void _evalProjection(const std::array< double, 3 > &point, bool signedLevelSet, std::array< double, 3 > *projectionPoint, std::array< double, 3 > *projectionNormal) const override
Definition levelSetSegmentationObject.cpp:3667
const SurfUnstructured & _evalCellSurface(long id) const override
Definition levelSetSegmentationObject.cpp:3554
LevelSetComplementObject(int id, const LevelSetSegmentationBaseObject *source)
Definition levelSetSegmentationObject.cpp:3535
int _evalCellPart(long id) const override
Definition levelSetSegmentationObject.cpp:3582
const SurfUnstructured & _evalSurface(const std::array< double, 3 > &point) const override
Definition levelSetSegmentationObject.cpp:3610
int _evalPart(const std::array< double, 3 > &point) const override
Definition levelSetSegmentationObject.cpp:3645
std::array< double, 3 > _evalCellNormal(long id, bool signedLevelSet) const override
Definition levelSetSegmentationObject.cpp:3594
void fillFieldCellCache(LevelSetField field, const std::vector< long > &cellIds)
Definition levelSetObject.cpp:3145
virtual void flushVTKOutputData(std::fstream &stream, VTKFormat format, LevelSetField field) const
Definition levelSetObject.cpp:2197
virtual std::size_t createFieldCellCache(LevelSetField field, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
Definition levelSetObject.cpp:2944
Implements visitor pattern fo segmentated geometries.
Definition levelSetSegmentationObject.hpp:126
void evalProjection(const std::array< double, 3 > &point, bool signedLevelSet, std::array< double, 3 > *projectionPoint, std::array< double, 3 > *projectionNormal) const
Definition levelSetSegmentationObject.cpp:2131
void fillFieldCellCache(LevelSetField field, long id) override
Definition levelSetSegmentationObject.cpp:1720
void flushVTKOutputData(std::fstream &stream, VTKFormat format, LevelSetField field) const override
Definition levelSetSegmentationObject.cpp:2235
std::array< double, 3 > evalNormal(const std::array< double, 3 > &point, bool signedLevelSet) const
Definition levelSetSegmentationObject.cpp:2080
long getSupport(long cellId) const
Definition levelSetSegmentationObject.cpp:2299
const SurfUnstructured & evalSurface(const std::array< double, 3 > &point) const
Definition levelSetSegmentationObject.cpp:2057
LevelSetFieldset getSupportedFields() const override
Definition levelSetSegmentationObject.cpp:1704
std::array< double BITPIT_COMMA 3 > getNormal(long cellId) const
Definition levelSetSegmentationObject.cpp:2288
virtual int _evalPart(const std::array< double, 3 > &point) const
Definition levelSetSegmentationObject.cpp:2160
void addVTKOutputData(LevelSetField field, const std::string &objectName) override
Definition levelSetSegmentationObject.cpp:2175
int getPart(long cellId) const
Definition levelSetSegmentationObject.cpp:2277
std::array< double, 3 > evalCellNormal(long id, bool signedLevelSet) const
Definition levelSetSegmentationObject.cpp:1915
double getSurfaceFeatureSize(long cellId) const
Definition levelSetSegmentationObject.cpp:2310
virtual int _evalCellPart(long id) const
Definition levelSetSegmentationObject.cpp:2145
std::size_t createFieldCellCache(LevelSetField field, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID) override
Definition levelSetSegmentationObject.cpp:1687
LevelSetIntersectionStatus _isCellIntersected(long, double distance, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const override
Definition levelSetSegmentationObject.cpp:1806
int evalPart(const std::array< double, 3 > &point) const
Definition levelSetSegmentationObject.cpp:2068
long evalCellSupport(long id, double searchRadius=AUTOMATIC_SEARCH_RADIUS) const
Definition levelSetSegmentationObject.cpp:1963
int evalCellPart(long id) const
Definition levelSetSegmentationObject.cpp:1751
static BITPIT_PUBLIC_API const double AUTOMATIC_SEARCH_RADIUS
Definition levelSetSegmentationObject.hpp:129
virtual LevelSetIntersectionStatus _isInterfaceIntersected(long id, bool invert, std::array< std::array< double, 3 >, 2 > *intersection, std::vector< std::array< double, 3 > > *polygon) const override
Definition levelSetSegmentationObject.cpp:1840
long evalSupport(const std::array< double, 3 > &point) const
Definition levelSetSegmentationObject.cpp:2096
const SurfUnstructured & evalCellSurface(long id) const
Definition levelSetSegmentationObject.cpp:1740
std::string getVTKOutputFieldName(LevelSetField field) const override
Definition levelSetSegmentationObject.cpp:2207
LevelSetObject(int)
Definition levelSetObject.cpp:84
Implements visitor pattern fo segmentated geometries.
Definition levelSetSegmentationObject.hpp:187
const SurfUnstructured & _evalSurface(const std::array< double, 3 > &point) const override
Definition levelSetSegmentationObject.cpp:3005
double getMaxSurfaceFeatureSize() const
Definition levelSetSegmentationObject.cpp:3345
LevelSetSegmentationObject * clone() const override
Definition levelSetSegmentationObject.cpp:2455
long _evalCellSupport(long id, double searchRadius=AUTOMATIC_SEARCH_RADIUS) const override
Definition levelSetSegmentationObject.cpp:2973
LevelSetCellLocation fillCellGeometricNarrowBandLocationCache(long id) override
Definition levelSetSegmentationObject.cpp:2855
LevelSetIntersectionStatus _isInterfaceIntersected(long id, bool invert, std::array< std::array< double, 3 >, 2 > *intersection, std::vector< std::array< double, 3 > > *polygon) const override
Definition levelSetSegmentationObject.cpp:3299
long _evalSupport(const std::array< double, 3 > &point) const override
Definition levelSetSegmentationObject.cpp:3194
short _evalSign(const std::array< double, 3 > &point) const override
Definition levelSetSegmentationObject.cpp:3018
std::array< double, 3 > _evalGradient(const std::array< double, 3 > &point, bool signedLevelSet) const override
Definition levelSetSegmentationObject.cpp:3046
double _evalCellValue(long id, bool signedLevelSet) const override
Definition levelSetSegmentationObject.cpp:2938
bool empty() const override
Definition levelSetSegmentationObject.cpp:2446
std::array< double, 3 > _evalCellGradient(long id, bool signedLevelSet) const override
Definition levelSetSegmentationObject.cpp:2953
void fillCellLocationCache() override
Definition levelSetSegmentationObject.cpp:2632
LevelSetSurfaceSmoothing getSurfaceSmoothing() const
Definition levelSetSegmentationObject.cpp:2618
LevelSetSegmentationObject(int)
Definition levelSetSegmentationObject.cpp:2383
short _evalCellSign(long id) const override
Definition levelSetSegmentationObject.cpp:2923
double _evalValue(const std::array< double, 3 > &point, bool signedLevelSet) const override
Definition levelSetSegmentationObject.cpp:3032
void setSurface(std::unique_ptr< const SurfUnstructured > &&surface, bool force=false)
Definition levelSetSegmentationObject.cpp:2481
double getMinSurfaceFeatureSize() const
Definition levelSetSegmentationObject.cpp:3316
const SurfUnstructured & getSurface() const
Definition levelSetSegmentationObject.cpp:2463
std::array< double, 3 > _evalCellNormal(long id, bool signedLevelSet) const override
Definition levelSetSegmentationObject.cpp:2987
const SurfUnstructured & _evalCellSurface(long id) const override
Definition levelSetSegmentationObject.cpp:2910
double getFeatureAngle() const
Definition levelSetSegmentationObject.cpp:2609
void _evalProjection(const std::array< double, 3 > &point, bool signedLevelSet, std::array< double, 3 > *projectionPoint, std::array< double, 3 > *projectionNormal) const override
Definition levelSetSegmentationObject.cpp:3070
const SurfaceSkdTree & getSearchTree() const
Definition levelSetSegmentationObject.cpp:2601
Segmentation kernel.
Definition levelSetSegmentationObject.hpp:51
void evalProjection(const std::array< double, 3 > &point, const SegmentConstIterator &segmentItr, std::array< double, 3 > *projectionPoint, std::array< double, 3 > *projectionNormal) const
Definition levelSetSegmentationObject.cpp:1399
double evalDistance(const std::array< double, 3 > &point, const SegmentConstIterator &segmentItr, bool signedDistance, std::array< double, 3 > *distanceVector) const
Definition levelSetSegmentationObject.cpp:231
const SurfaceSkdTree & getSearchTree() const
Definition levelSetSegmentationObject.cpp:201
const SurfUnstructured & getSurface() const
Definition levelSetSegmentationObject.cpp:125
std::array< double, 3 > evalDistanceVector(const std::array< double, 3 > &point, const SegmentConstIterator &segmentItr) const
Definition levelSetSegmentationObject.cpp:290
void setSurface(std::unique_ptr< const SurfUnstructured > &&surface, double featureAngle=DEFAULT_FEATURE_ANGLE)
Definition levelSetSegmentationObject.cpp:134
std::array< double, 3 > evalNormal(const std::array< double, 3 > &point, const SegmentConstIterator &segmentItr) const
Definition levelSetSegmentationObject.cpp:307
double getFeatureAngle() const
Definition levelSetSegmentationObject.cpp:209
static BITPIT_PUBLIC_API const double DEFAULT_FEATURE_ANGLE
Definition levelSetSegmentationObject.hpp:57
LevelSetSurfaceSmoothing getSurfaceSmoothing() const
Definition levelSetSegmentationObject.cpp:218
std::array< double, 3 > evalPseudoNormal(const SurfUnstructured::CellConstIterator &segmentIterator, const double *lambda) const
Definition levelSetSegmentationObject.cpp:325
LevelSetSegmentationSurfaceInfo()
Definition levelSetSegmentationObject.cpp:48
Metafunction for generating a pierced storage.
Definition piercedStorage.hpp:146
The SurfUnstructured class defines an unstructured surface triangulation.
Definition surfunstructured.hpp:36
The SurfaceSkdTree implements a Bounding Volume Hierarchy tree for surface patches.
Definition surface_skd_tree.hpp:33
