Loading...
Searching...
No Matches
levelSetObject.hpp
93 BITPIT_DEPRECATED(LevelSetIntersectionStatus intersectSurface(long id, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const);
94 LevelSetIntersectionStatus isCellIntersected(long id, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const;
95 LevelSetIntersectionStatus isInterfaceIntersected(long id, bool invert, std::array<std::array<double, 3>, 2> *intersection, std::vector<std::array<double, 3>> *polygon) const;
105 virtual std::array<double,3> evalGradient(const std::array<double,3> &point, bool signedLevelSet) const;
109 void enableVTKOutput(const LevelSetFieldset &fieldset, const std::string &objectName, bool enable=true);
113 void enableVTKOutput(LevelSetWriteField fieldset, const std::string &objectName, bool enable=true);
117 BITPIT_DEPRECATED(std::array<double BITPIT_COMMA 3> computeVertexProjectionPoint(long vertexId) const);
119 BITPIT_DEPRECATED(std::array<double BITPIT_COMMA 3> computeProjectionPoint(const std::array<double,3> &point) const);
122 BITPIT_DEPRECATED_FOR(double getValue(long cellId) const, double evalCellValue(long id, bool signedLevelSet) const);
123 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);
171 virtual std::size_t createCellLocationCache(std::size_t cacheId = CellCacheCollection::NULL_CACHE_ID);
179 virtual std::size_t createCellPropagatedSignCache(std::size_t cacheId = CellCacheCollection::NULL_CACHE_ID);
185 virtual LevelSetIntersectionStatus _isCellIntersected(long, double distance, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const;
186 virtual LevelSetIntersectionStatus _isInterfaceIntersected(long id, bool positivePart, std::array<std::array<double, 3>, 2> *intersection, std::vector<std::array<double, 3>> *polygon) const;
194 virtual std::array<double,3> _evalGradient(const std::array<double,3> &point, bool signedLevelSet) const = 0;
199 void startCellCacheExchange( const std::unordered_map<int,std::vector<long>> &recvCellIds, std::size_t cacheIds, DataCommunicator * ) const;
200 void startCellCachesExchange( const std::unordered_map<int,std::vector<long>> &recvCellIds, const std::vector<std::size_t> &cacheIds, DataCommunicator * ) const;
201 void completeCellCacheExchange( const std::unordered_map<int,std::vector<long>> &sendCellIds, std::size_t cacheIds, DataCommunicator * );
202 void completeCellCachesExchange( const std::unordered_map<int,std::vector<long>> &sendCellIds, const std::vector<std::size_t> &cacheIds, DataCommunicator * );
211 std::vector<long> evalCellCacheFillIds(LevelSetZone zone, LevelSetCacheMode cacheMode, const std::vector<adaption::Info> &adaptionData) const;
213 std::vector<long> evalCellOnDemandCacheFillIds(LevelSetZone zone, const std::vector<adaption::Info> &adaptionData) const;
215 std::vector<long> evalCellNarrowBandCacheFillIds(LevelSetZone zone, const std::vector<adaption::Info> &adaptionData) const;
217 std::vector<long> evalCellFullCacheFillIds(LevelSetZone zone, const std::vector<adaption::Info> &adaptionData) const;
222 value_t evalCellFieldCached(LevelSetField field, long id, const evaluator_t &evaluator, const fallback_t &fallback) const;
224 value_t evalCellField(LevelSetField field, long id, const evaluator_t &evaluator, const fallback_t &fallback) const;
227 void fillFieldCellCaches(LevelSetZone zone, const std::vector<LevelSetField> &fields, const std::vector<adaption::Info> &adaptionData);
237 virtual std::size_t createFieldCellCache(LevelSetField field, std::size_t cacheId = CellCacheCollection::NULL_CACHE_ID);
239 std::size_t createFieldCellCache(LevelSetField field, std::size_t cacheId = CellCacheCollection::NULL_CACHE_ID);
248 std::size_t createCellCache(LevelSetFillIn expectedFillIn, std::size_t cacheId = CellCacheCollection::NULL_CACHE_ID);
The DataCommunicator class provides the infrastructure needed to exchange data among processes.
Definition communications.hpp:42
Mesh specific implementation to calculate the levelset function.
Definition levelSetKernel.hpp:47
std::vector< long > evalCellCacheStaleIds(const std::vector< adaption::Info > &adaptionData) const
Definition levelSetObject.cpp:2880
void clearCellCache(std::size_t cacheId, bool release)
Definition levelSetObject.cpp:2535
void flushData(std::fstream &, const std::string &, VTKFormat) override
Definition levelSetObject.cpp:2173
LevelSetInfo getLevelSetInfo(long cellId) const
Definition levelSetObject.cpp:3364
virtual void destroyFieldCellCache(LevelSetField field)
Definition levelSetObject.cpp:2968
CellCacheCollection::ValueCache< value_t > * getCellCache(std::size_t cacheId) const
Definition levelSetObject.tpp:61
static const LevelSetIntersectionMode CELL_LOCATION_INTERSECTION_MODE
Definition levelSetObject.hpp:135
void destroyCellCache(std::size_t cacheId)
Definition levelSetObject.cpp:3291
LevelSetBulkEvaluationMode getCellBulkEvaluationMode() const
Definition levelSetObject.cpp:945
void pruneCellCache(std::size_t cacheId, const std::vector< long > &cellIds)
Definition levelSetObject.cpp:2553
void updateCellNarrowBandData(const std::vector< adaption::Info > &adaptionData)
Definition levelSetObject.cpp:458
void completeCellCachesExchange(const std::unordered_map< int, std::vector< long > > &sendCellIds, const std::vector< std::size_t > &cacheIds, DataCommunicator *)
Definition levelSetObject.cpp:2305
void startCellCachesExchange(const std::unordered_map< int, std::vector< long > > &recvCellIds, const std::vector< std::size_t > &cacheIds, DataCommunicator *) const
Definition levelSetObject.cpp:2254
void setSizeNarrowBand(double)
Definition levelSetObject.cpp:3395
void destroyCellBulkData()
Definition levelSetObject.cpp:1021
std::vector< long > evalCellCacheFillIds(LevelSetZone zone, LevelSetCacheMode cacheMode) const
Definition levelSetObject.cpp:2579
void fillFieldCellCache(LevelSetField field, const std::vector< long > &cellIds)
Definition levelSetObject.cpp:3145
void setDefaultLevelSetSigndness(bool signedLevelSet)
Definition levelSetObject.cpp:234
short evalValueSign(double value) const
Definition levelSetObject.cpp:1771
virtual double evalValue(const std::array< double, 3 > &point, bool signedLevelSet) const
Definition levelSetObject.cpp:1733
virtual std::array< double, 3 > evalCellProjectionPoint(long id) const
Definition levelSetObject.cpp:1714
void removeVTKOutputData(LevelSetField field, const std::string &objectName)
Definition levelSetObject.cpp:2077
std::size_t createCellCache(LevelSetFillIn expectedFillIn, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
Definition levelSetObject.tpp:112
void completeCellCacheExchange(const std::unordered_map< int, std::vector< long > > &sendCellIds, std::size_t cacheIds, DataCommunicator *)
Definition levelSetObject.cpp:2292
void enableFieldCellCache(LevelSetField field, LevelSetCacheMode cacheMode)
Definition levelSetObject.cpp:2353
std::array< double BITPIT_COMMA 3 > computeVertexProjectionPoint(long vertexId) const
Definition levelSetObject.cpp:3312
virtual const LevelSetKernel * getKernel() const
Definition levelSetObject.cpp:271
std::size_t getFieldCellCacheId(LevelSetField field) const
Definition levelSetObject.cpp:2929
CellCacheCollection::ValueCache< value_t > * getFieldCellCache(LevelSetField field) const
Definition levelSetObject.tpp:40
virtual std::size_t createCellLocationCache(std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
Definition levelSetObject.cpp:865
void updateCellBulkData(const std::vector< adaption::Info > &adaptionData)
Definition levelSetObject.cpp:1009
LevelSetIntersectionStatus isCellIntersected(long id, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const
Definition levelSetObject.cpp:1379
void setCellBulkEvaluationMode(LevelSetBulkEvaluationMode evaluationMode)
Definition levelSetObject.cpp:955
virtual void addVTKOutputData(LevelSetField field, const std::string &objectName)
Definition levelSetObject.cpp:2092
void destroyCellLocationCache()
Definition levelSetObject.cpp:875
static const bool CELL_CACHE_IS_SIGNED
Definition levelSetObject.hpp:134
virtual std::string getVTKOutputFieldName(LevelSetField field) const
Definition levelSetObject.cpp:2142
virtual std::size_t createCellPropagatedSignCache(std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
Definition levelSetObject.cpp:1292
virtual void fillCellPropagatedSignCache()
Definition levelSetObject.cpp:1031
virtual short evalSign(const std::array< double, 3 > &point) const
Definition levelSetObject.cpp:1723
virtual std::array< double, 3 > evalProjectionPoint(const std::array< double, 3 > &point) const
Definition levelSetObject.cpp:1762
LevelSetCacheMode getFieldCellCacheMode(LevelSetField field) const
Definition levelSetObject.cpp:2335
virtual short _evalSign(const std::array< double, 3 > &point) const
Definition levelSetObject.cpp:1753
std::vector< long > evalCellNarrowBandCacheFillIds(LevelSetZone zone) const
Definition levelSetObject.cpp:2670
virtual std::array< double, 3 > evalCellGradient(long id, bool signedLevelSet) const
Definition levelSetObject.cpp:1678
void disableFieldCellCache(LevelSetField field)
Definition levelSetObject.cpp:2391
void destroyCellPropagatedSignCache()
Definition levelSetObject.cpp:1302
virtual double evalCellValue(long id, bool signedLevelSet) const
Definition levelSetObject.cpp:1644
virtual std::array< double, 3 > evalGradient(const std::array< double, 3 > &point, bool signedLevelSet) const
Definition levelSetObject.cpp:1743
virtual LevelSetIntersectionStatus _isInterfaceIntersected(long id, bool positivePart, std::array< std::array< double, 3 >, 2 > *intersection, std::vector< std::array< double, 3 > > *polygon) const
Definition levelSetObject.cpp:1573
virtual LevelSetFieldset getSupportedFields() const
Definition levelSetObject.cpp:175
bool hasVTKOutputData(LevelSetField field, const std::string &objectName) const
Definition levelSetObject.cpp:2062
virtual void fillCellLocationCache()
Definition levelSetObject.cpp:550
virtual short evalCellSign(long id) const
Definition levelSetObject.cpp:1598
LevelSetCellLocation getCellLocation(long id) const
Definition levelSetObject.cpp:483
LevelSetZone getCellZone(long id) const
Definition levelSetObject.cpp:517
void evaluateCellNarrowBandData()
Definition levelSetObject.cpp:444
LevelSetIntersectionStatus intersectSurface(long id, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const
Definition levelSetObject.cpp:1341
void adaptCellCaches(const std::vector< adaption::Info > &adaptionData)
Definition levelSetObject.cpp:2414
virtual bool isCellInNarrowBand(long id) const
Definition levelSetObject.cpp:896
std::vector< long > evalCellOnDemandCacheFillIds(LevelSetZone zone) const
Definition levelSetObject.cpp:2636
value_t evalCellFieldCached(LevelSetField field, long id, const evaluator_t &evaluator, const fallback_t &fallback) const
Definition levelSetObject.tpp:236
void setNarrowBandSize(double size)
Definition levelSetObject.cpp:400
LevelSetIntersectionStatus isInterfaceIntersected(long id, bool invert, std::array< std::array< double, 3 >, 2 > *intersection, std::vector< std::array< double, 3 > > *polygon) const
Definition levelSetObject.cpp:1424
std::size_t m_cellLocationCacheId
Id of the cache that will keep track if cell zones.
Definition levelSetObject.hpp:145
double getNarrowBandSize() const
Definition levelSetObject.cpp:384
void destroyCellNarrowBandData()
Definition levelSetObject.cpp:469
double getSizeNarrowBand() const
Definition levelSetObject.cpp:3386
std::array< double BITPIT_COMMA 3 > computeProjectionPoint(long cellId) const
Definition levelSetObject.cpp:3302
virtual LevelSetCellLocation fillCellGeometricNarrowBandLocationCache(long id)
Definition levelSetObject.cpp:826
void enableVTKOutput(const LevelSetFieldset &fieldset, bool enable=true)
Definition levelSetObject.cpp:1938
std::size_t m_cellPropagatedSignCacheId
Id of the cache that will keep track if cell propagated sign.
Definition levelSetObject.hpp:146
void fillFieldCellCaches(LevelSetZone zone, const std::vector< LevelSetField > &fields)
Definition levelSetObject.cpp:2985
virtual void flushVTKOutputData(std::fstream &stream, VTKFormat format, LevelSetField field) const
Definition levelSetObject.cpp:2197
value_t evalCellField(LevelSetField field, long id, const evaluator_t &evaluator, const fallback_t &fallback) const
Definition levelSetObject.tpp:267
virtual void setKernel(LevelSetKernel *)
Definition levelSetObject.cpp:242
virtual LevelSetIntersectionStatus _isCellIntersected(long, double distance, LevelSetIntersectionMode=LevelSetIntersectionMode::FAST_FUZZY) const
Definition levelSetObject.cpp:1481
void evaluateCellBulkData()
Definition levelSetObject.cpp:998
virtual void restore(std::istream &)
Definition levelSetObject.cpp:1843
std::size_t getReferenceCount() const
Definition levelSetObject.cpp:221
std::vector< long > evalCellFullCacheFillIds(LevelSetZone zone) const
Definition levelSetObject.cpp:2776
virtual std::size_t createFieldCellCache(LevelSetField field, std::size_t cacheId=CellCacheCollection::NULL_CACHE_ID)
Definition levelSetObject.cpp:2944
std::string getVTKOutputDataName(LevelSetField field, const std::string &objectName) const
Definition levelSetObject.cpp:2126
virtual bool isInNarrowBand(const std::array< double, 3 > &point) const
Definition levelSetObject.cpp:919
void update(const std::vector< adaption::Info > &adaptionData)
Definition levelSetObject.cpp:337
void startCellCacheExchange(const std::unordered_map< int, std::vector< long > > &recvCellIds, std::size_t cacheIds, DataCommunicator *) const
Definition levelSetObject.cpp:2241
Buffer to be used for receive communications.
Definition communications_buffers.hpp:107
Buffer to be used for send communications.
Definition communications_buffers.hpp:91
The base class to be used to derive VTK streamers form.
Definition VTK.hpp:209
The namespace 'adaption' contains the routines and the data structures for handling patch adaption.
Definition adaption.cpp:38
A public container which includes all information provided by LevelSet.
Definition levelSetCommon.hpp:59
The Info struct defines the infomation associated to an adaption.
Definition adaption.hpp:63
