![]() |
OpenLB 1.8.1
|
Representation of a statistic for a parallel 2D geometry. More...
#include <superGeometry.h>
Inheritance diagram for olb::SuperGeometry< T, D >:
Collaboration diagram for olb::SuperGeometry< T, D >:Public Types | |
| using | block_t = ConcretizableBlockGeometry<T,D> |
Public Types inherited from olb::SuperStructure< T, D > | |
| using | value_t = T |
Public Member Functions | |
| SuperGeometry (CuboidDecomposition< T, D > &cuboidDecomposition, LoadBalancer< T > &loadBalancer, int overlap=3) | |
| int | get (LatticeR< D+1 > latticeR) const |
| Read only access to the material numbers, error handling: returns 0 if data is not available. | |
| template<typename... L> | |
| std::enable_if_t< sizeof...(L)==(D+1), int > | get (L... latticeR) const |
| int | getAndCommunicate (LatticeR< D+1 > latticeR) const |
| Read only access to the material numbers with global communication to all ranks. | |
| Vector< T, D > | getPhysR (LatticeR< D+1 > latticeR) const |
| Transforms a lattice to physical position (SI units) | |
| void | getPhysR (T output[D], const int latticeR[D+1]) const |
| Transforms a lattice to physical position (SI units) | |
| BlockGeometry< T, D > & | getBlockGeometry (int locIC) |
| Read and write access to a single block geometry. | |
| BlockGeometry< T, D > const & | getBlockGeometry (int locIC) const |
| Read only access to a single block geometry. | |
| template<typename BLOCK = BlockGeometry<T,D>> | |
| BLOCK & | getBlock (int locIC) |
| Read and write access to a single extended block geometry. | |
| template<typename BLOCK = BlockGeometry<T,D>> | |
| const BLOCK & | getBlock (int locIC) const |
| Read only access to a single extended block geometry. | |
| SuperGeometryStatistics< T, D > & | getStatistics () |
| Returns the statistics object. | |
| const SuperGeometryStatistics< T, D > & | getStatistics () const |
| Returns the statistics object (readonly) | |
| bool & | getStatisticsStatus () |
| Read and write access to the statistic status flag, update needed = true. | |
| bool const & | getStatisticsStatus () const |
| Read only access to the statistic status flag, update needed = true. | |
| void | updateStatistics (bool verbose=true) |
| Updates the super geometry at the boundaries if needed and afterwards the statisics if needed. | |
| template<typename DESCRIPTOR = std::conditional_t<D==2,descriptors::D2Q9<>,descriptors::D3Q27<>>> | |
| int | clean (bool verbose=true, std::vector< int > bulkMaterials={1}) |
| Executes an outer cleaning: Sets all material numbers which are not bulk-materials to 0 if there is no neighbour from bulkMaterials. | |
| int | outerClean (bool verbose=true, std::vector< int > bulkMaterials={1}) |
| Removes not needed fluid cells from the outer domain. | |
| int | innerClean (bool verbose=true) |
| inner cleaning for all boundary types | |
| int | innerClean (int material, bool verbose=true) |
| inner cleaning for specific boundary types | |
| bool | checkForErrors (bool verbose=true) |
| check for errors (searches for all outer voxels (=0) with an inner voxel (=1) as a direct neighbour) | |
| void | reset (IndicatorF< T, D > &domain) |
| reset all cell materials inside of a domain to 0 | |
| void | rename (int fromM, int toM) |
| replace one material with another | |
| void | rename (int fromM, int toM, FunctorPtr< IndicatorF< T, D > > &&condition) |
| replace one material that fulfills an indicator functor condition with another | |
| void | rename (int fromM, int toM, LatticeR< D > offset) |
| replace one material with another respecting an offset (overlap) | |
| void | rename (int fromM, int toM, int testM, Vector< int, D > testDirection) |
| renames all voxels of material fromM to toM if the number of voxels given by testDirection is of material testM | |
| void | rename (int fromBcMat, int toBcMat, int fluidMat, IndicatorF< T, D > &condition) |
| renames all boundary voxels of material fromBcMat to toBcMat if two neighbour voxel in the direction of the discrete normal are fluid voxel with material fluidM in the region where the indicator function is fulfilled | |
| void | rename (int fromBcMat, int toBcMat, int fluidMat, FunctorPtr< IndicatorF< T, D > > &&condition) |
| renames all boundary voxels of material fromBcMat to toBcMat if two neighbour voxel in the direction of the discrete normal are fluid voxel with material fluidM in the region where the indicator function is fulfilled | |
| void | print () |
| Prints some information about the super geometry. | |
| void | setWriteIncrementalVTK (bool state) |
| Toggles whether geometry should be written out as VTK after every modification. | |
| bool | getWriteIncrementalVTKState () |
| void | print (const T physR[D], int offset) |
| std::unique_ptr< SuperIndicatorF< T, D > > | getMaterialIndicator (std::vector< int > &&materials) |
| Returns a material indicator using the given vector of materials. | |
| std::unique_ptr< SuperIndicatorF< T, D > > | getMaterialIndicator (int material) |
| Returns a material indicator using a single material number. | |
| void | communicate () override |
| std::size_t | getNblock () const override |
| Number of data blocks for the serializable interface. | |
| std::size_t | getSerializableSize () const override |
| Binary size for the serializer. | |
| bool * | getBlock (std::size_t iBlock, std::size_t &sizeBlock, bool loadingMode) override |
| Return a pointer to the memory of the current block and its size for the serializable interface. | |
Public Member Functions inherited from olb::SuperStructure< T, D > | |
| virtual | ~SuperStructure () |
| Virtual Destructor for inheritance. | |
| SuperStructure (CuboidDecomposition< T, D > &cuboidDecomposition, LoadBalancer< T > &loadBalancer, int overlap=2) | |
| Construction of a super structure. | |
| CuboidDecomposition< T, D > & | getCuboidDecomposition () |
| Read and write access to cuboid geometry. | |
| const CuboidDecomposition< T, D > & | getCuboidDecomposition () const |
| Read only access to cuboid geometry. | |
| int | getOverlap () |
| Read and write access to the overlap. | |
| int | getOverlap () const |
| Read only access to the overlap. | |
| LoadBalancer< T > & | getLoadBalancer () |
| Read and write access to the load balancer. | |
| LoadBalancer< T > const & | getLoadBalancer () const |
| Read only access to the load balancer. | |
| template<typename F > | |
| void | forCorePhysLocations (F f) const |
| Iterate over discrete physical locations. | |
| template<typename F > | |
| void | forCorePhysLocations (PhysR< T, D > min, PhysR< T, D > max, F f) const |
| Iterate over discrete physical locations between min and max. | |
| template<typename F > | |
| void | forCoreSpatialLocations (F f) const |
| Iterate over spatial locations NOTE: Based on physical locations (as opposed to its blockStructure version) | |
| template<typename F > | |
| void | forCoreSpatialLocations (PhysR< T, D > min, PhysR< T, D > max, F f) const |
| Iterate over spatial locations between min and max NOTE: Based on physical locations (as opposed to its blockStructure version) | |
Public Member Functions inherited from olb::Serializable | |
| virtual | ~Serializable ()=default |
| template<bool includeLogOutputDir = true> | |
| bool | save (std::string fileName="", const bool enforceUint=false) |
Save Serializable into file fileName | |
| template<bool includeLogOutputDir = true> | |
| bool | load (std::string fileName="", const bool enforceUint=false) |
Load Serializable from file fileName | |
| bool | save (std::uint8_t *buffer) |
Save Serializable into buffer of length getSerializableSize | |
| bool | load (const std::uint8_t *buffer) |
Load Serializable from buffer of length getSerializableSize | |
| virtual void | postLoad () |
Static Public Attributes | |
| static constexpr unsigned | d = D |
Additional Inherited Members | |
Protected Member Functions inherited from olb::BufferSerializable | |
| template<typename DataType > | |
| void | registerSerializable (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, size_t &sizeBufferIndex, bool *&dataPtr, DataType &data, const bool loadingMode=false) |
Register Serializable object of dynamic size. | |
| template<typename DataType > | |
| void | registerStdVectorOfVars (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, size_t &sizeBufferIndex, bool *&dataPtr, std::vector< DataType > &data, const bool loadingMode=false) |
Method for registering a std::vector<DataType> of primitive DataType (int, double, ...) | |
| template<typename DataType > | |
| void | registerStdVectorOfSerializablesOfConstSize (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, size_t &sizeBufferIndex, bool *&dataPtr, std::vector< DataType > &data, const bool loadingMode=false) |
Method for registering a std::vector<DataType> of constant-sized Serializable | |
| template<typename DataType > | |
| void | registerStdVectorOfSerializables (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, size_t &sizeBufferIndex, bool *&dataPtr, std::vector< DataType > &data, const bool loadingMode=false) |
Method for registering a std::vector<DataType> of dynamic-sized DataType | |
| template<typename DataTypeKey , typename DataTypeValue > | |
| void | registerMap (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, size_t &sizeBufferIndex, bool *&dataPtr, std::map< DataTypeKey, DataTypeValue > &data, const bool loadingMode=false) |
Method for registering a std::map<DataTypeKey, DataTypeValue> of fixed-sized types (i.e. int, double) | |
| size_t | addSizeToBuffer (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, size_t &sizeBufferIndex, bool *&dataPtr, const size_t data) const |
Add a size_t to the sizeBuffer in the n-th util::round and return that size_t in all successive rounds. | |
Protected Member Functions inherited from olb::Serializable | |
| template<typename DataType > | |
| void | registerVar (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, const DataType &data, const size_t arrayLength=1) const |
Register primitive data types (int, double, ...) or arrays of those. | |
| template<typename DataType > | |
| void | registerSerializableOfConstSize (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, DataType &data, const bool loadingMode=false) |
Register Serializable object of constant size. | |
| template<typename DataType > | |
| void | registerSerializablesOfConstSize (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, DataType *data, const size_t arrayLength, const bool loadingMode=false) |
Register an array of Serializable objects of constant size. | |
Protected Attributes inherited from olb::SuperStructure< T, D > | |
| CuboidDecomposition< T, D > & | _cuboidDecomposition |
| The grid structure is referenced here. | |
| LoadBalancer< T > & | _loadBalancer |
| Distribution of the cuboids of the cuboid structure. | |
| int | _overlap |
| Size of ghost cell layer (must be greater than 1 and greater_overlapBC, default =1) | |
| OstreamManager | clout |
| class specific output stream | |
Protected Attributes inherited from olb::BufferSerializable | |
| std::vector< bool * > | _dataBuffer |
Data buffer for data that has to be buffered between two getBlock() iterations. | |
| std::vector< size_t > | _sizeBuffer |
std::vector of integer buffers (e.g. for std::vector size) to be buffered for the whole iteration process | |
Representation of a statistic for a parallel 2D geometry.
Representation of a statistic for a parallel 3D geometry.
A super geomety statistic computes different integral values, like total number of different materials, materials of any kind, min./max. physical position, of an underlying super geoemtry.
This class is not intended to be derived from.
A super geometry statistic computes different integral values, like total number of different materials, materials of any kind, min./max. physical position, of an underlying super geometry.
This class is not intended to be derived from.
Definition at line 54 of file superGeometryStatistics3D.h.
| using olb::SuperGeometry< T, D >::block_t = ConcretizableBlockGeometry<T,D> |
Definition at line 92 of file superGeometry.h.
| olb::SuperGeometry< T, D >::SuperGeometry | ( | CuboidDecomposition< T, D > & | cuboidDecomposition, |
| LoadBalancer< T > & | loadBalancer, | ||
| int | overlap = 3 ) |
Definition at line 57 of file superGeometry.hh.
References olb::SuperStructure< T, D >::_overlap, olb::CuboidDecomposition< T, D >::get(), olb::SuperStructure< T, D >::getLoadBalancer(), and olb::SuperGeometry< T, D >::updateStatistics().
Here is the call graph for this function:| bool olb::SuperGeometry< T, D >::checkForErrors | ( | bool | verbose = true | ) |
check for errors (searches for all outer voxels (=0) with an inner voxel (=1) as a direct neighbour)
Definition at line 291 of file superGeometry.hh.
| int olb::SuperGeometry< T, D >::clean | ( | bool | verbose = true, |
| std::vector< int > | bulkMaterials = {1} ) |
Executes an outer cleaning: Sets all material numbers which are not bulk-materials to 0 if there is no neighbour from bulkMaterials.
Definition at line 206 of file superGeometry.hh.
|
inlineoverridevirtual |
Reimplemented from olb::SuperStructure< T, D >.
Definition at line 199 of file superGeometry.h.
|
inline |
Definition at line 103 of file superGeometry.h.
References olb::SuperGeometry< T, D >::get().
Here is the call graph for this function:| int olb::SuperGeometry< T, D >::get | ( | LatticeR< D+1 > | latticeR | ) | const |
Read only access to the material numbers, error handling: returns 0 if data is not available.
Definition at line 100 of file superGeometry.hh.
References olb::Vector< T, Size >::data(), and olb::singleton::mpi().
Here is the call graph for this function:
Here is the caller graph for this function:| int olb::SuperGeometry< T, D >::getAndCommunicate | ( | LatticeR< D+1 > | latticeR | ) | const |
Read only access to the material numbers with global communication to all ranks.
Definition at line 110 of file superGeometry.hh.
| BLOCK & olb::SuperGeometry< T, D >::getBlock | ( | int | locIC | ) |
Read and write access to a single extended block geometry.
Definition at line 150 of file superGeometry.hh.
Here is the caller graph for this function:| const BLOCK & olb::SuperGeometry< T, D >::getBlock | ( | int | locIC | ) | const |
Read only access to a single extended block geometry.
Definition at line 158 of file superGeometry.hh.
|
overridevirtual |
Return a pointer to the memory of the current block and its size for the serializable interface.
Implements olb::Serializable.
Definition at line 511 of file superGeometry.hh.
| BlockGeometry< T, D > & olb::SuperGeometry< T, D >::getBlockGeometry | ( | int | locIC | ) |
Read and write access to a single block geometry.
Definition at line 136 of file superGeometry.hh.
Here is the caller graph for this function:| BlockGeometry< T, D > const & olb::SuperGeometry< T, D >::getBlockGeometry | ( | int | locIC | ) | const |
Read only access to a single block geometry.
Definition at line 143 of file superGeometry.hh.
| std::unique_ptr< SuperIndicatorF< T, D > > olb::SuperGeometry< T, D >::getMaterialIndicator | ( | int | material | ) |
Returns a material indicator using a single material number.
| material | Material to be indicated |
Definition at line 488 of file superGeometry.hh.
| std::unique_ptr< SuperIndicatorF< T, D > > olb::SuperGeometry< T, D >::getMaterialIndicator | ( | std::vector< int > && | materials | ) |
Returns a material indicator using the given vector of materials.
| materials | Materials to be indicated |
Definition at line 476 of file superGeometry.hh.
Here is the caller graph for this function:
|
overridevirtual |
Number of data blocks for the serializable interface.
Implements olb::Serializable.
Definition at line 494 of file superGeometry.hh.
| Vector< T, D > olb::SuperGeometry< T, D >::getPhysR | ( | LatticeR< D+1 > | latticeR | ) | const |
Transforms a lattice to physical position (SI units)
Definition at line 123 of file superGeometry.hh.
| void olb::SuperGeometry< T, D >::getPhysR | ( | T | output[D], |
| const int | latticeR[D+1] ) const |
Transforms a lattice to physical position (SI units)
Definition at line 129 of file superGeometry.hh.
|
overridevirtual |
Binary size for the serializer.
Implements olb::Serializable.
Definition at line 503 of file superGeometry.hh.
| SuperGeometryStatistics< T, D > & olb::SuperGeometry< T, D >::getStatistics | ( | ) |
Returns the statistics object.
Definition at line 164 of file superGeometry.hh.
Here is the caller graph for this function:| const SuperGeometryStatistics< T, D > & olb::SuperGeometry< T, D >::getStatistics | ( | ) | const |
Returns the statistics object (readonly)
Definition at line 174 of file superGeometry.hh.
| bool & olb::SuperGeometry< T, D >::getStatisticsStatus | ( | ) |
Read and write access to the statistic status flag, update needed = true.
Definition at line 180 of file superGeometry.hh.
| bool const & olb::SuperGeometry< T, D >::getStatisticsStatus | ( | ) | const |
Read only access to the statistic status flag, update needed = true.
Definition at line 186 of file superGeometry.hh.
|
inline |
Definition at line 174 of file superGeometry.h.
Here is the caller graph for this function:| int olb::SuperGeometry< T, D >::innerClean | ( | bool | verbose = true | ) |
inner cleaning for all boundary types
Definition at line 248 of file superGeometry.hh.
References olb::singleton::MpiManager::barrier(), olb::singleton::mpi(), and olb::singleton::MpiManager::reduceAndBcast().
Here is the call graph for this function:| int olb::SuperGeometry< T, D >::innerClean | ( | int | material, |
| bool | verbose = true ) |
inner cleaning for specific boundary types
Definition at line 270 of file superGeometry.hh.
References olb::singleton::mpi(), and olb::singleton::MpiManager::reduceAndBcast().
Here is the call graph for this function:| int olb::SuperGeometry< T, D >::outerClean | ( | bool | verbose = true, |
| std::vector< int > | bulkMaterials = {1} ) |
Removes not needed fluid cells from the outer domain.
Definition at line 227 of file superGeometry.hh.
References olb::singleton::mpi(), and olb::singleton::MpiManager::reduceAndBcast().
Here is the call graph for this function:| void olb::SuperGeometry< T, D >::print | ( | ) |
Prints some information about the super geometry.
Definition at line 435 of file superGeometry.hh.
| void olb::SuperGeometry< T, D >::print | ( | const T | physR[D], |
| int | offset ) |
Definition at line 443 of file superGeometry.hh.
| void olb::SuperGeometry< T, D >::rename | ( | int | fromBcMat, |
| int | toBcMat, | ||
| int | fluidMat, | ||
| FunctorPtr< IndicatorF< T, D > > && | condition ) |
renames all boundary voxels of material fromBcMat to toBcMat if two neighbour voxel in the direction of the discrete normal are fluid voxel with material fluidM in the region where the indicator function is fulfilled
Definition at line 413 of file superGeometry.hh.
| void olb::SuperGeometry< T, D >::rename | ( | int | fromBcMat, |
| int | toBcMat, | ||
| int | fluidMat, | ||
| IndicatorF< T, D > & | condition ) |
renames all boundary voxels of material fromBcMat to toBcMat if two neighbour voxel in the direction of the discrete normal are fluid voxel with material fluidM in the region where the indicator function is fulfilled
Definition at line 392 of file superGeometry.hh.
| void olb::SuperGeometry< T, D >::rename | ( | int | fromM, |
| int | toM ) |
replace one material with another
Definition at line 324 of file superGeometry.hh.
Here is the caller graph for this function:| void olb::SuperGeometry< T, D >::rename | ( | int | fromM, |
| int | toM, | ||
| FunctorPtr< IndicatorF< T, D > > && | condition ) |
replace one material that fulfills an indicator functor condition with another
Definition at line 336 of file superGeometry.hh.
| void olb::SuperGeometry< T, D >::rename | ( | int | fromM, |
| int | toM, | ||
| int | testM, | ||
| Vector< int, D > | testDirection ) |
renames all voxels of material fromM to toM if the number of voxels given by testDirection is of material testM
Definition at line 364 of file superGeometry.hh.
| void olb::SuperGeometry< T, D >::rename | ( | int | fromM, |
| int | toM, | ||
| LatticeR< D > | offset ) |
replace one material with another respecting an offset (overlap)
Definition at line 347 of file superGeometry.hh.
| void olb::SuperGeometry< T, D >::reset | ( | IndicatorF< T, D > & | domain | ) |
reset all cell materials inside of a domain to 0
Definition at line 312 of file superGeometry.hh.
|
inline |
Toggles whether geometry should be written out as VTK after every modification.
Definition at line 171 of file superGeometry.h.
Here is the caller graph for this function:| void olb::SuperGeometry< T, D >::updateStatistics | ( | bool | verbose = true | ) |
Updates the super geometry at the boundaries if needed and afterwards the statisics if needed.
Definition at line 192 of file superGeometry.hh.
Here is the caller graph for this function:
|
staticconstexpr |
Definition at line 90 of file superGeometry.h.