OpenLB 1.7
|
A cuboid geometry represents a voxel mesh. More...
#include <cuboidGeometry3D.h>
Public Member Functions | |
CuboidGeometry3D () | |
Constructs empty Geometry. | |
CuboidGeometry3D (T originX, T originY, T originZ, T deltaR, int nX, int nY, int nZ, int nC=1) | |
Constructs a cuboid geometry with a cubic shape of size nX times nY times nZ with origin originR=(originX, originY, originZ) that consists of nC cuboids. | |
CuboidGeometry3D (std::vector< T > origin, T deltaR, std::vector< int > extent, int nC=1) | |
Constructor with vectors. | |
CuboidGeometry3D (Vector< T, 3 > origin, T deltaR, Vector< int, 3 > extent, int nC=1) | |
CuboidGeometry3D (const Cuboid3D< T > &motherCuboid, int nC) | |
Construction from an alrealy existing mother cuboid. | |
CuboidGeometry3D (IndicatorF3D< T > &indicatorF, T voxelSize, int nC=1) | |
Constructs a cuboid structure with a uniform spacing of voxelSize which consists of nC cuboids, the cuboids not needed are removed and too big ones are shrinked. | |
CuboidGeometry3D (std::shared_ptr< IndicatorF3D< T > > indicator_sharedPtrF, T voxelSize, int nC=1) | |
CuboidGeometry3D (IndicatorF3D< T > &indicatorF, T voxelSize, int nC, std::string minimizeBy) | |
Constructs a cuboid structure with a uniform spacing of voxelSize which consists of nC cuboids, the cuboids not needed are removed and too big ones are shrinked. Uses an iterative method: Halves the largest child cuboid until the set number of cuboids is reached. Largest cuboid is determined by either volume or weight as choosen in minimizeBy. | |
CuboidGeometry3D (std::shared_ptr< IndicatorF3D< T > > indicator_sharedPtrF, T voxelSize, int nC, std::string minimizeBy) | |
virtual | ~CuboidGeometry3D () |
Destructs CuboidGeometry. | |
Cuboid3D< T > & | get (int iC) |
Read and write access to a single cuboid. | |
Cuboid3D< T > const & | get (int iC) const |
Read access to a single cuboid. | |
Cuboid3D< T > | getMotherCuboid () |
Returns the smallest cuboid that includes all cuboids of the structure. | |
Cuboid3D< T > const & | getMotherCuboid () const |
void | setPeriodicity (bool periodicityX, bool periodicityY, bool periodicityZ) |
Set flag to enable/disable periodicity depending of direction. Be aware that not all directions are true to ensure boundary conditions like for velocity are not disturbed. | |
std::vector< Cuboid3D< T > > & | cuboids () |
int | get_iC (T globX, T globY, T globZ, int offset=0) const |
Gives for a given point (globX/globY/globZ) the related cuboidID and _p if the point is not in any of the cuboid _childrenQ. | |
int | get_iC (Vector< T, 3 >, int offset=0) const |
int | get_iC (T globX, T globY, T globZ, int orientationX, int orientationY, int orientationZ) const |
This function checks if the points (globX/globY/globZ) and (globX + orientationX/delta/globY + orientationY/delta/ globZ + orientationZ/delta) is in a cuboid. | |
bool | getC (T physR[3], int &iC) const |
Returns true and the cuboid number of the nearest lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry. | |
bool | getC (std::vector< T > physR, int &iC) const |
Returns true and the cuboid number of the nearest lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry. | |
bool | getC (const Vector< T, 3 > &physR, int &iC) const |
Returns true and the cuboid number of the nearest lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry. | |
bool | getLatticeR (int latticeR[4], const T physR[3]) const |
Returns true and the nearest lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry. | |
bool | getFloorLatticeR (const std::vector< T > &physR, std::vector< int > &latticeR) const |
Returns true and the util::floor lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry. | |
bool | getFloorLatticeR (const Vector< T, 3 > &physR, Vector< int, 4 > &latticeR) const |
Returns true and the util::floor lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry. | |
void | getPhysR (T physR[3], const int &iCglob, const int &iX, const int &iY, const int &iZ) const |
Returns the physical position to the given lattice position respecting periodicity for the overlap nodes which are not in the mother cuboid for the case the flag periodicityOn[iDim]=true if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry. | |
void | getPhysR (T physR[3], const int latticeR[4]) const |
Returns the physical position to the given lattice position respecting periodicity for the overlap nodes which are not in the mother cuboid for the case the flag periodicityOn[iDim]=true. | |
void | getPhysR (T physR[3], LatticeR< 4 > latticeR) const |
void | getPhysR (T output[3], const int iCglob, LatticeR< 3 > latticeR) const |
void | getNeighbourhood (int cuboid, std::vector< int > &neighbours, int overlap=0) |
Stores the iC of the neighbouring cuboids in a vector;. | |
int | getNc () const |
Returns the number of cuboids in the structure. | |
T | getMinRatio () const |
Returns the minimum of the ratio nX/NY in the structure. | |
T | getMaxRatio () const |
Returns the maximum of the ratio nX/NY in the structure. | |
Vector< T, 3 > | getMinPhysR () const |
Returns the minimum coordinate in the structure. | |
Vector< T, 3 > | getMaxPhysR () const |
Returns the maximum coordinate in the structure. | |
T | getMinPhysVolume () const |
Returns the minimum volume in the structure. | |
T | getMaxPhysVolume () const |
Returns the maximum volume in the structure. | |
size_t | getMinLatticeVolume () const |
Returns the minimum number of nodes in the structure. | |
size_t | getMaxLatticeVolume () const |
Returns the maximum number of nodes in the structure. | |
size_t | getMinLatticeWeight () const |
Returns the minimum number of nodes in the structure inside the indicator. | |
size_t | getMaxLatticeWeight () const |
Returns the maximum number of nodes in the structure inside the indicator. | |
T | getMinDeltaR () const |
Returns the minimum delta in the structure. | |
T | getMaxDeltaR () const |
Returns the maximum delta in the structure. | |
bool | operator== (CuboidGeometry3D< T > &rhs) |
Compares two CuboidGeometries. | |
void | swap (CuboidGeometry3D< T > &rhs) |
Swaps data from input into object. | |
void | swapCuboids (std::vector< Cuboid3D< T > > &cuboids) |
Swaps the vector of cuboids. | |
void | replaceCuboids (std::vector< Cuboid3D< T > > &cuboids) |
Replace the vector of cuboids. | |
std::size_t | replaceContainedBy (Cuboid3D< T > mother) |
std::size_t | hypotheticalReplaceContainedBy (Cuboid3D< T > mother) |
void | setWeights (IndicatorF3D< T > &indicatorF) |
Sets the number of full cells of each cuboid. | |
void | clearCuboids () |
Resets the cuboid array. | |
void | add (Cuboid3D< T > cuboid) |
Adds a cuboid. | |
void | split (int iC, int p) |
Splits cuboid iC, removes it and adds p cuboids of same volume. | |
void | splitRegular (int iC, int width) |
Splits cuboid iC, removes it, adds approx. width^3 sized new cuboids. | |
void | splitByWeight (int iC, int p, IndicatorF3D< T > &indicatorF) |
Splits cuboid iC, removes it and adds p cuboids of same weight. | |
void | splitFractional (int iC, int iD, std::vector< T > fractions) |
Splits cuboid iC along dimension iD into cuboids of fractions. | |
void | remove (int iC) |
Removes the cuboid iC. | |
void | remove (IndicatorF3D< T > &indicatorF) |
Removes all cuboids where indicatorF = 0. | |
void | removeByWeight () |
Removes all cuboids where weight = 0. | |
void | shrink (int iC, IndicatorF3D< T > &indicatorF) |
Shrink cuboid iC so that no empty planes are left. | |
void | shrink (IndicatorF3D< T > &indicatorF) |
Shrink all cuboids so that no empty planes are left. | |
void | refine (int factor) |
Refines mesh by splitting each cell into factor^3 cells. | |
bool | tryRefineTo (T deltaR) |
Tries to refine mesh to given deltaR. | |
size_t | getNblock () const override |
Number of data blocks for the serializer interface. | |
size_t | getSerializableSize () const override |
Binary size for the serializer interface. | |
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. | |
void | print () const |
Prints cuboid geometry details. | |
void | printExtended () |
Prints cuboid geometry details plus details of all cuboids. | |
void | writeToExistingFile (std::string completeFileName, LoadBalancer< T > &loadBalancer) |
Save CuboidGeometry into an existing XML File. | |
void | writeToFile (std::string fileName, LoadBalancer< T > &loadBalancer) |
Save CuboidGeometry into XML File. | |
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 () |
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::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 | |
A cuboid geometry represents a voxel mesh.
A cuboid geometry is given by a number of cuboids. To represent a connected domain it is required that the distance between two neighbouring cuboids is less than the smallest delta of them.
By the class, access is provided to the cuboids. Core methods of the class are transforming lattice to physical positions in the corresponding unit systems.
WARNING: At the moment there are only cuboids with a constant delta possible and the distance between two neighbouring cuboids must be delta since an interpolation operator in time and space is missing in cuboidNeighbourhood and superLattice.
This class is not intended to be derived from.
Definition at line 72 of file cuboidGeometry3D.h.
olb::CuboidGeometry3D< T >::CuboidGeometry3D | ( | ) |
Constructs empty Geometry.
Definition at line 45 of file cuboidGeometry3D.hh.
References olb::CuboidGeometry3D< T >::add(), and olb::CuboidGeometry3D< T >::split().
olb::CuboidGeometry3D< T >::CuboidGeometry3D | ( | T | originX, |
T | originY, | ||
T | originZ, | ||
T | deltaR, | ||
int | nX, | ||
int | nY, | ||
int | nZ, | ||
int | nC = 1 ) |
Constructs a cuboid geometry with a cubic shape of size nX times nY times nZ with origin originR=(originX, originY, originZ) that consists of nC cuboids.
Definition at line 54 of file cuboidGeometry3D.hh.
References olb::CuboidGeometry3D< T >::add(), and olb::CuboidGeometry3D< T >::split().
olb::CuboidGeometry3D< T >::CuboidGeometry3D | ( | std::vector< T > | origin, |
T | deltaR, | ||
std::vector< int > | extent, | ||
int | nC = 1 ) |
Constructor with vectors.
Definition at line 65 of file cuboidGeometry3D.hh.
olb::CuboidGeometry3D< T >::CuboidGeometry3D | ( | Vector< T, 3 > | origin, |
T | deltaR, | ||
Vector< int, 3 > | extent, | ||
int | nC = 1 ) |
Definition at line 72 of file cuboidGeometry3D.hh.
olb::CuboidGeometry3D< T >::CuboidGeometry3D | ( | const Cuboid3D< T > & | motherCuboid, |
int | nC ) |
Construction from an alrealy existing mother cuboid.
Definition at line 79 of file cuboidGeometry3D.hh.
olb::CuboidGeometry3D< T >::CuboidGeometry3D | ( | IndicatorF3D< T > & | indicatorF, |
T | voxelSize, | ||
int | nC = 1 ) |
Constructs a cuboid structure with a uniform spacing of voxelSize which consists of nC cuboids, the cuboids not needed are removed and too big ones are shrinked.
Definition at line 86 of file cuboidGeometry3D.hh.
References olb::CuboidGeometry3D< T >::add(), olb::CuboidGeometry3D< T >::shrink(), and olb::CuboidGeometry3D< T >::split().
olb::CuboidGeometry3D< T >::CuboidGeometry3D | ( | std::shared_ptr< IndicatorF3D< T > > | indicator_sharedPtrF, |
T | voxelSize, | ||
int | nC = 1 ) |
Definition at line 102 of file cuboidGeometry3D.hh.
olb::CuboidGeometry3D< T >::CuboidGeometry3D | ( | IndicatorF3D< T > & | indicatorF, |
T | voxelSize, | ||
int | nC, | ||
std::string | minimizeBy ) |
Constructs a cuboid structure with a uniform spacing of voxelSize which consists of nC cuboids, the cuboids not needed are removed and too big ones are shrinked. Uses an iterative method: Halves the largest child cuboid until the set number of cuboids is reached. Largest cuboid is determined by either volume or weight as choosen in minimizeBy.
Definition at line 108 of file cuboidGeometry3D.hh.
References olb::CuboidGeometry3D< T >::add(), olb::minimizeByVolume(), and olb::minimizeByWeight().
olb::CuboidGeometry3D< T >::CuboidGeometry3D | ( | std::shared_ptr< IndicatorF3D< T > > | indicator_sharedPtrF, |
T | voxelSize, | ||
int | nC, | ||
std::string | minimizeBy ) |
Definition at line 127 of file cuboidGeometry3D.hh.
|
virtual |
void olb::CuboidGeometry3D< T >::add | ( | Cuboid3D< T > | cuboid | ) |
Adds a cuboid.
Definition at line 670 of file cuboidGeometry3D.hh.
|
inline |
Resets the cuboid array.
Definition at line 194 of file cuboidGeometry3D.h.
|
inline |
Definition at line 114 of file cuboidGeometry3D.h.
Cuboid3D< T > & olb::CuboidGeometry3D< T >::get | ( | int | iC | ) |
Read and write access to a single cuboid.
Definition at line 137 of file cuboidGeometry3D.hh.
Cuboid3D< T > const & olb::CuboidGeometry3D< T >::get | ( | int | iC | ) | const |
Read access to a single cuboid.
Definition at line 143 of file cuboidGeometry3D.hh.
int olb::CuboidGeometry3D< T >::get_iC | ( | T | globX, |
T | globY, | ||
T | globZ, | ||
int | offset = 0 ) const |
Gives for a given point (globX/globY/globZ) the related cuboidID and _p if the point is not in any of the cuboid _childrenQ.
Definition at line 170 of file cuboidGeometry3D.hh.
int olb::CuboidGeometry3D< T >::get_iC | ( | T | globX, |
T | globY, | ||
T | globZ, | ||
int | orientationX, | ||
int | orientationY, | ||
int | orientationZ ) const |
This function checks if the points (globX/globY/globZ) and (globX + orientationX/delta/globY + orientationY/delta/ globZ + orientationZ/delta) is in a cuboid.
It gives the related cuboidID and _p if the points are not in any of the cuboids. util::abs(orientationX) = util::abs(orientationY) = util::abs(orientationY) = 1 must be satisfied
Definition at line 189 of file cuboidGeometry3D.hh.
int olb::CuboidGeometry3D< T >::get_iC | ( | Vector< T, 3 > | coords, |
int | offset = 0 ) const |
Definition at line 183 of file cuboidGeometry3D.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 1109 of file cuboidGeometry3D.hh.
bool olb::CuboidGeometry3D< T >::getC | ( | const Vector< T, 3 > & | physR, |
int & | iC ) const |
Returns true and the cuboid number of the nearest lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry.
Definition at line 231 of file cuboidGeometry3D.hh.
bool olb::CuboidGeometry3D< T >::getC | ( | std::vector< T > | physR, |
int & | iC ) const |
Returns true and the cuboid number of the nearest lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry.
Definition at line 218 of file cuboidGeometry3D.hh.
bool olb::CuboidGeometry3D< T >::getC | ( | T | physR[3], |
int & | iC ) const |
Returns true and the cuboid number of the nearest lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry.
Definition at line 205 of file cuboidGeometry3D.hh.
bool olb::CuboidGeometry3D< T >::getFloorLatticeR | ( | const std::vector< T > & | physR, |
std::vector< int > & | latticeR ) const |
Returns true and the util::floor lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry.
Definition at line 260 of file cuboidGeometry3D.hh.
References olb::util::floor().
bool olb::CuboidGeometry3D< T >::getFloorLatticeR | ( | const Vector< T, 3 > & | physR, |
Vector< int, 4 > & | latticeR ) const |
Returns true and the util::floor lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry.
Definition at line 276 of file cuboidGeometry3D.hh.
References olb::util::floor().
bool olb::CuboidGeometry3D< T >::getLatticeR | ( | int | latticeR[4], |
const T | physR[3] ) const |
Returns true and the nearest lattice position to the given physical position if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry.
Definition at line 244 of file cuboidGeometry3D.hh.
References olb::util::floor().
T olb::CuboidGeometry3D< T >::getMaxDeltaR | ( | ) | const |
Returns the maximum delta in the structure.
Definition at line 647 of file cuboidGeometry3D.hh.
size_t olb::CuboidGeometry3D< T >::getMaxLatticeVolume | ( | ) | const |
Returns the maximum number of nodes in the structure.
Definition at line 599 of file cuboidGeometry3D.hh.
size_t olb::CuboidGeometry3D< T >::getMaxLatticeWeight | ( | ) | const |
Returns the maximum number of nodes in the structure inside the indicator.
Definition at line 623 of file cuboidGeometry3D.hh.
Vector< T, 3 > olb::CuboidGeometry3D< T >::getMaxPhysR | ( | ) | const |
Returns the maximum coordinate in the structure.
Definition at line 542 of file cuboidGeometry3D.hh.
T olb::CuboidGeometry3D< T >::getMaxPhysVolume | ( | ) | const |
Returns the maximum volume in the structure.
Definition at line 575 of file cuboidGeometry3D.hh.
T olb::CuboidGeometry3D< T >::getMaxRatio | ( | ) | const |
Returns the maximum of the ratio nX/NY in the structure.
Definition at line 506 of file cuboidGeometry3D.hh.
T olb::CuboidGeometry3D< T >::getMinDeltaR | ( | ) | const |
Returns the minimum delta in the structure.
Definition at line 635 of file cuboidGeometry3D.hh.
size_t olb::CuboidGeometry3D< T >::getMinLatticeVolume | ( | ) | const |
Returns the minimum number of nodes in the structure.
Definition at line 587 of file cuboidGeometry3D.hh.
size_t olb::CuboidGeometry3D< T >::getMinLatticeWeight | ( | ) | const |
Returns the minimum number of nodes in the structure inside the indicator.
Definition at line 611 of file cuboidGeometry3D.hh.
Vector< T, 3 > olb::CuboidGeometry3D< T >::getMinPhysR | ( | ) | const |
Returns the minimum coordinate in the structure.
Definition at line 524 of file cuboidGeometry3D.hh.
T olb::CuboidGeometry3D< T >::getMinPhysVolume | ( | ) | const |
Returns the minimum volume in the structure.
Definition at line 563 of file cuboidGeometry3D.hh.
T olb::CuboidGeometry3D< T >::getMinRatio | ( | ) | const |
Returns the minimum of the ratio nX/NY in the structure.
Definition at line 488 of file cuboidGeometry3D.hh.
Cuboid3D< T > olb::CuboidGeometry3D< T >::getMotherCuboid | ( | ) |
Returns the smallest cuboid that includes all cuboids of the structure.
Definition at line 149 of file cuboidGeometry3D.hh.
Cuboid3D< T > const & olb::CuboidGeometry3D< T >::getMotherCuboid | ( | ) | const |
Definition at line 155 of file cuboidGeometry3D.hh.
|
overridevirtual |
Number of data blocks for the serializer interface.
Implements olb::Serializable.
Definition at line 1090 of file cuboidGeometry3D.hh.
int olb::CuboidGeometry3D< T >::getNc | ( | ) | const |
Returns the number of cuboids in the structure.
Definition at line 482 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::getNeighbourhood | ( | int | cuboid, |
std::vector< int > & | neighbours, | ||
int | overlap = 0 ) |
Stores the iC of the neighbouring cuboids in a vector;.
Definition at line 336 of file cuboidGeometry3D.hh.
References olb::Cuboid3D< T >::checkInters().
void olb::CuboidGeometry3D< T >::getPhysR | ( | T | output[3], |
const int | iCglob, | ||
LatticeR< 3 > | latticeR ) const |
Definition at line 330 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::getPhysR | ( | T | physR[3], |
const int & | iCglob, | ||
const int & | iX, | ||
const int & | iY, | ||
const int & | iZ ) const |
Returns the physical position to the given lattice position respecting periodicity for the overlap nodes which are not in the mother cuboid for the case the flag periodicityOn[iDim]=true if the physical position is within any of the cuboids with an overlap of 1/2*delta belonging to the cuboid geometry.
Definition at line 293 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::getPhysR | ( | T | physR[3], |
const int | latticeR[4] ) const |
Returns the physical position to the given lattice position respecting periodicity for the overlap nodes which are not in the mother cuboid for the case the flag periodicityOn[iDim]=true.
Definition at line 318 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::getPhysR | ( | T | physR[3], |
LatticeR< 4 > | latticeR ) const |
Definition at line 324 of file cuboidGeometry3D.hh.
|
overridevirtual |
Binary size for the serializer interface.
Implements olb::Serializable.
Definition at line 1099 of file cuboidGeometry3D.hh.
std::size_t olb::CuboidGeometry3D< T >::hypotheticalReplaceContainedBy | ( | Cuboid3D< T > | mother | ) |
bool olb::CuboidGeometry3D< T >::operator== | ( | CuboidGeometry3D< T > & | rhs | ) |
Compares two CuboidGeometries.
Definition at line 660 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::print | ( | ) | const |
Prints cuboid geometry details.
Definition at line 1125 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::printExtended | ( | ) |
Prints cuboid geometry details plus details of all cuboids.
Definition at line 1141 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::refine | ( | int | factor | ) |
Refines mesh by splitting each cell into factor^3 cells.
Definition at line 802 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::remove | ( | IndicatorF3D< T > & | indicatorF | ) |
Removes all cuboids where indicatorF = 0.
Definition at line 685 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::remove | ( | int | iC | ) |
Removes the cuboid iC.
Definition at line 677 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::removeByWeight | ( | ) |
Removes all cuboids where weight = 0.
Definition at line 717 of file cuboidGeometry3D.hh.
std::size_t olb::CuboidGeometry3D< T >::replaceContainedBy | ( | Cuboid3D< T > | mother | ) |
void olb::CuboidGeometry3D< T >::replaceCuboids | ( | std::vector< Cuboid3D< T > > & | cuboids | ) |
Replace the vector of cuboids.
Definition at line 1048 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::setPeriodicity | ( | bool | periodicityX, |
bool | periodicityY, | ||
bool | periodicityZ ) |
Set flag to enable/disable periodicity depending of direction. Be aware that not all directions are true to ensure boundary conditions like for velocity are not disturbed.
Definition at line 161 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::setWeights | ( | IndicatorF3D< T > & | indicatorF | ) |
Sets the number of full cells of each cuboid.
Definition at line 1057 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::shrink | ( | IndicatorF3D< T > & | indicatorF | ) |
Shrink all cuboids so that no empty planes are left.
Definition at line 786 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::shrink | ( | int | iC, |
IndicatorF3D< T > & | indicatorF ) |
Shrink cuboid iC so that no empty planes are left.
Definition at line 731 of file cuboidGeometry3D.hh.
References olb::util::max(), and olb::util::min().
void olb::CuboidGeometry3D< T >::split | ( | int | iC, |
int | p ) |
Splits cuboid iC, removes it and adds p cuboids of same volume.
Definition at line 825 of file cuboidGeometry3D.hh.
References olb::Cuboid3D< T >::divide().
void olb::CuboidGeometry3D< T >::splitByWeight | ( | int | iC, |
int | p, | ||
IndicatorF3D< T > & | indicatorF ) |
Splits cuboid iC, removes it and adds p cuboids of same weight.
Definition at line 848 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::splitFractional | ( | int | iC, |
int | iD, | ||
std::vector< T > | fractions ) |
Splits cuboid iC along dimension iD into cuboids of fractions.
Definition at line 1023 of file cuboidGeometry3D.hh.
References olb::Cuboid3D< T >::divideFractional().
void olb::CuboidGeometry3D< T >::splitRegular | ( | int | iC, |
int | width ) |
Splits cuboid iC, removes it, adds approx. width^3 sized new cuboids.
Definition at line 835 of file cuboidGeometry3D.hh.
References olb::Cuboid3D< T >::divide(), olb::Cuboid3D< T >::getNx(), olb::Cuboid3D< T >::getNy(), and olb::Cuboid3D< T >::getNz().
void olb::CuboidGeometry3D< T >::swap | ( | CuboidGeometry3D< T > & | rhs | ) |
Swaps data from input into object.
Definition at line 1031 of file cuboidGeometry3D.hh.
void olb::CuboidGeometry3D< T >::swapCuboids | ( | std::vector< Cuboid3D< T > > & | cuboids | ) |
Swaps the vector of cuboids.
Definition at line 1042 of file cuboidGeometry3D.hh.
bool olb::CuboidGeometry3D< T >::tryRefineTo | ( | T | deltaR | ) |
Tries to refine mesh to given deltaR.
Definition at line 811 of file cuboidGeometry3D.hh.
References olb::util::fabs().
void olb::CuboidGeometry3D< T >::writeToExistingFile | ( | std::string | completeFileName, |
LoadBalancer< T > & | loadBalancer ) |
Save CuboidGeometry into an existing XML File.
Definition at line 1153 of file cuboidGeometry3D.hh.
References olb::singleton::mpi().
void olb::CuboidGeometry3D< T >::writeToFile | ( | std::string | fileName, |
LoadBalancer< T > & | loadBalancer ) |
Save CuboidGeometry into XML File.
Definition at line 1181 of file cuboidGeometry3D.hh.
References olb::singleton::directories(), olb::singleton::Directories::getLogOutDir(), and olb::singleton::mpi().