OpenLB 1.7
|
A cuboid structure represents the grid of a considered domain. More...
#include <cuboidGeometry2D.h>
Public Member Functions | |
CuboidGeometry2D () | |
Constructs empty Geometry. | |
CuboidGeometry2D (T originX, T originY, T deltaR, int nX, int nY, int nC=1) | |
Constructs a cuboid geometry with a cubic shape of size nX times nY with origin originR=(originX, originY) that consits of nC cuboids. | |
CuboidGeometry2D (IndicatorF2D< T > &indicatorF, T voxelSize, int nC=1) | |
Constructs a cuboid structure with a uniform spacing of voxelsize which consits of nC cuboids, the cuboids not needed are removed and too big ones are shrinked. | |
void | reInit (T globPosX, T globPosY, T delta, int nX, int nY, int nC=1) |
Re init. | |
Cuboid2D< T > & | get (int i) |
Read and write access to the cuboids. | |
Cuboid2D< T > const & | get (int i) const |
Read access to the cuboids. | |
void | setPeriodicity (bool periodicityX, bool periodicityY) |
Set flag to enable/disable periodicity. | |
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, 2 > &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 (std::vector< T > physR, std::vector< int > &latticeR) 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 | getLatticeR (int latticeR[], const T physR[]) const |
bool | getLatticeR (const Vector< T, 2 > &physR, Vector< int, 3 > &latticeR) const |
bool | getFloorLatticeR (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, 2 > &physR, Vector< int, 3 > &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. | |
std::vector< T > | getPhysR (int iCglob, int iX, int iY) 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. | |
std::vector< T > | getPhysR (std::vector< int > latticeR) 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 output[2], const int latticeR[3]) const |
void | getPhysR (T output[2], const int iCglob, const int iX, const int iY) const |
void | getPhysR (T output[2], const int iCglob, LatticeR< 2 > latticeR) const |
void | getPhysR (T output[3], LatticeR< 3 > latticeR) const |
int | getNc () const |
Returns the number of cuboids in t < 2he structure. | |
T | getMinRatio () const |
Returns the maximum/minimum of the ratio nX/NY in the structure. | |
T | getMaxRatio () const |
std::vector< T > | getMinPhysR () const |
Returns the minimum coordinate in the structure. | |
std::vector< T > | getMaxPhysR () const |
Returns the maximum coordinate in the structure. | |
T | getMinPhysVolume () const |
Returns the maximum/minimum volume in the structure. | |
T | getMaxPhysVolume () const |
size_t | getMinLatticeVolume () const |
Returns the maximum/minimum number of nodes in the structure. | |
size_t | getMaxLatticeVolume () const |
T | getMinDeltaR () const |
Returns the maximum/minimum delata in the structure. | |
T | getMaxDeltaR () const |
Cuboid2D< T > | getMotherCuboid () const |
Returns the smallest cuboid that includes all cuboids of the structure. | |
int | get_iC (T globX, T globY, int offset=0) const |
for a given point (globX/globY), returns the related cuboidID and _p if the point is not in any of the cuboid _childrenQ | |
int | get_iC (T globX, T globY, int orientationX, int orientationY) const |
This function checks if the points (globX/globY) and (globX + orientationX/delta /globY + orientationY/delta) is in a cuboid. | |
void | add (Cuboid2D< T > cuboid) |
Adds a cuboid. | |
void | remove (int iC) |
Removes the cuboid iC. | |
void | split (int iC, int p) |
Removes all cuboids where geometryData = 0. | |
void | shrink (IndicatorF2D< T > &indicatorF) |
Shrink all cuboids so that no empty planes are left. | |
void | getNeighbourhood (int cuboid, std::vector< int > &neighbours, int offset=0) |
stores the neighbouring cuboids in array neighbours; | |
void | print () const |
Prints cuboid geometry details. | |
void | printExtended () |
Prints cuboid geometry details plus details of all cuboids. | |
A cuboid structure represents the grid of a considered domain.
A cuboid structure is given by a number of cuboids. To represent a connected domain it is required that the distance between two neighbooring cuboids is less than the smallest delta of them.
WARNING: At the moment there are only cuboids with a constant delta possible and the distance between two neighbooring cuboids must be delta since an interpolation operator in time and space is missing in cuboidNeigbourhood and superLattice.
This class is not intended to be derived from.
Definition at line 56 of file cuboidGeometry2D.h.
olb::CuboidGeometry2D< T >::CuboidGeometry2D | ( | ) |
Constructs empty Geometry.
Definition at line 44 of file cuboidGeometry2D.hh.
References olb::CuboidGeometry2D< T >::add(), and olb::CuboidGeometry2D< T >::split().
olb::CuboidGeometry2D< T >::CuboidGeometry2D | ( | T | originX, |
T | originY, | ||
T | deltaR, | ||
int | nX, | ||
int | nY, | ||
int | nC = 1 ) |
Constructs a cuboid geometry with a cubic shape of size nX times nY with origin originR=(originX, originY) that consits of nC cuboids.
Definition at line 52 of file cuboidGeometry2D.hh.
References olb::CuboidGeometry2D< T >::add(), and olb::CuboidGeometry2D< T >::split().
olb::CuboidGeometry2D< T >::CuboidGeometry2D | ( | IndicatorF2D< T > & | indicatorF, |
T | voxelSize, | ||
int | nC = 1 ) |
Constructs a cuboid structure with a uniform spacing of voxelsize which consits of nC cuboids, the cuboids not needed are removed and too big ones are shrinked.
Definition at line 61 of file cuboidGeometry2D.hh.
References olb::CuboidGeometry2D< T >::add(), olb::CuboidGeometry2D< T >::shrink(), and olb::CuboidGeometry2D< T >::split().
void olb::CuboidGeometry2D< T >::add | ( | Cuboid2D< T > | cuboid | ) |
Adds a cuboid.
Definition at line 495 of file cuboidGeometry2D.hh.
Cuboid2D< T > & olb::CuboidGeometry2D< T >::get | ( | int | i | ) |
Read and write access to the cuboids.
Definition at line 89 of file cuboidGeometry2D.hh.
Cuboid2D< T > const & olb::CuboidGeometry2D< T >::get | ( | int | i | ) | const |
Read access to the cuboids.
Definition at line 95 of file cuboidGeometry2D.hh.
int olb::CuboidGeometry2D< T >::get_iC | ( | T | globX, |
T | globY, | ||
int | offset = 0 ) const |
for a given point (globX/globY), returns the related cuboidID and _p if the point is not in any of the cuboid _childrenQ
Definition at line 468 of file cuboidGeometry2D.hh.
int olb::CuboidGeometry2D< T >::get_iC | ( | T | globX, |
T | globY, | ||
int | orientationX, | ||
int | orientationY ) const |
This function checks if the points (globX/globY) and (globX + orientationX/delta /globY + orientationY/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) = 1 must be satisfied
Definition at line 480 of file cuboidGeometry2D.hh.
bool olb::CuboidGeometry2D< T >::getC | ( | const Vector< T, 2 > & | 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 123 of file cuboidGeometry2D.hh.
bool olb::CuboidGeometry2D< 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 110 of file cuboidGeometry2D.hh.
bool olb::CuboidGeometry2D< T >::getFloorLatticeR | ( | const Vector< T, 2 > & | physR, |
Vector< int, 3 > & | 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 197 of file cuboidGeometry2D.hh.
References olb::util::floor().
bool olb::CuboidGeometry2D< T >::getFloorLatticeR | ( | 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 182 of file cuboidGeometry2D.hh.
References olb::util::floor().
bool olb::CuboidGeometry2D< T >::getLatticeR | ( | const Vector< T, 2 > & | physR, |
Vector< int, 3 > & | latticeR ) const |
Definition at line 166 of file cuboidGeometry2D.hh.
References olb::util::floor().
bool olb::CuboidGeometry2D< T >::getLatticeR | ( | int | latticeR[], |
const T | physR[] ) const |
Definition at line 151 of file cuboidGeometry2D.hh.
References olb::util::floor().
bool olb::CuboidGeometry2D< T >::getLatticeR | ( | std::vector< T > | physR, |
std::vector< int > & | latticeR ) 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 136 of file cuboidGeometry2D.hh.
T olb::CuboidGeometry2D< T >::getMaxDeltaR | ( | ) | const |
Definition at line 410 of file cuboidGeometry2D.hh.
size_t olb::CuboidGeometry2D< T >::getMaxLatticeVolume | ( | ) | const |
Definition at line 386 of file cuboidGeometry2D.hh.
std::vector< T > olb::CuboidGeometry2D< T >::getMaxPhysR | ( | ) | const |
Returns the maximum coordinate in the structure.
Definition at line 333 of file cuboidGeometry2D.hh.
T olb::CuboidGeometry2D< T >::getMaxPhysVolume | ( | ) | const |
Definition at line 362 of file cuboidGeometry2D.hh.
T olb::CuboidGeometry2D< T >::getMaxRatio | ( | ) | const |
Definition at line 306 of file cuboidGeometry2D.hh.
T olb::CuboidGeometry2D< T >::getMinDeltaR | ( | ) | const |
Returns the maximum/minimum delata in the structure.
Definition at line 398 of file cuboidGeometry2D.hh.
size_t olb::CuboidGeometry2D< T >::getMinLatticeVolume | ( | ) | const |
Returns the maximum/minimum number of nodes in the structure.
Definition at line 374 of file cuboidGeometry2D.hh.
std::vector< T > olb::CuboidGeometry2D< T >::getMinPhysR | ( | ) | const |
Returns the minimum coordinate in the structure.
Definition at line 318 of file cuboidGeometry2D.hh.
T olb::CuboidGeometry2D< T >::getMinPhysVolume | ( | ) | const |
Returns the maximum/minimum volume in the structure.
Definition at line 350 of file cuboidGeometry2D.hh.
T olb::CuboidGeometry2D< T >::getMinRatio | ( | ) | const |
Returns the maximum/minimum of the ratio nX/NY in the structure.
Definition at line 294 of file cuboidGeometry2D.hh.
Cuboid2D< T > olb::CuboidGeometry2D< T >::getMotherCuboid | ( | ) | const |
Returns the smallest cuboid that includes all cuboids of the structure.
Definition at line 422 of file cuboidGeometry2D.hh.
int olb::CuboidGeometry2D< T >::getNc | ( | ) | const |
Returns the number of cuboids in t < 2he structure.
Definition at line 288 of file cuboidGeometry2D.hh.
void olb::CuboidGeometry2D< T >::getNeighbourhood | ( | int | cuboid, |
std::vector< int > & | neighbours, | ||
int | offset = 0 ) |
stores the neighbouring cuboids in array neighbours;
Definition at line 597 of file cuboidGeometry2D.hh.
std::vector< T > olb::CuboidGeometry2D< T >::getPhysR | ( | int | iCglob, |
int | iX, | ||
int | iY ) 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 213 of file cuboidGeometry2D.hh.
std::vector< T > olb::CuboidGeometry2D< T >::getPhysR | ( | std::vector< int > | latticeR | ) | 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 239 of file cuboidGeometry2D.hh.
void olb::CuboidGeometry2D< T >::getPhysR | ( | T | output[2], |
const int | iCglob, | ||
const int | iX, | ||
const int | iY ) const |
Definition at line 264 of file cuboidGeometry2D.hh.
void olb::CuboidGeometry2D< T >::getPhysR | ( | T | output[2], |
const int | iCglob, | ||
LatticeR< 2 > | latticeR ) const |
Definition at line 257 of file cuboidGeometry2D.hh.
void olb::CuboidGeometry2D< T >::getPhysR | ( | T | output[2], |
const int | latticeR[3] ) const |
Definition at line 245 of file cuboidGeometry2D.hh.
void olb::CuboidGeometry2D< T >::getPhysR | ( | T | output[3], |
LatticeR< 3 > | latticeR ) const |
void olb::CuboidGeometry2D< T >::print | ( | ) | const |
Prints cuboid geometry details.
Definition at line 614 of file cuboidGeometry2D.hh.
void olb::CuboidGeometry2D< T >::printExtended | ( | ) |
Prints cuboid geometry details plus details of all cuboids.
Definition at line 628 of file cuboidGeometry2D.hh.
void olb::CuboidGeometry2D< T >::reInit | ( | T | globPosX, |
T | globPosY, | ||
T | delta, | ||
int | nX, | ||
int | nY, | ||
int | nC = 1 ) |
Re init.
Definition at line 75 of file cuboidGeometry2D.hh.
References olb::Cuboid2D< T >::init().
void olb::CuboidGeometry2D< T >::remove | ( | int | iC | ) |
Removes the cuboid iC.
Definition at line 502 of file cuboidGeometry2D.hh.
void olb::CuboidGeometry2D< T >::setPeriodicity | ( | bool | periodicityX, |
bool | periodicityY ) |
Set flag to enable/disable periodicity.
Definition at line 101 of file cuboidGeometry2D.hh.
References olb::Cuboid2D< T >::resize().
void olb::CuboidGeometry2D< T >::shrink | ( | IndicatorF2D< T > & | indicatorF | ) |
Shrink all cuboids so that no empty planes are left.
Definition at line 539 of file cuboidGeometry2D.hh.
References olb::util::max(), and olb::util::min().
void olb::CuboidGeometry2D< T >::split | ( | int | iC, |
int | p ) |
Removes all cuboids where geometryData = 0.
Splits cuboid iC, removes it and add p cuboids
Definition at line 587 of file cuboidGeometry2D.hh.
References olb::Cuboid2D< T >::divide().