![]() |
OpenLB 1.8.1
|
#include <cuboid.h>
Public Member Functions | |
Cuboid ()=default | |
Cuboid (Vector< T, D > origin, T delta, Vector< int, D > extent) | |
Cuboid (const Cuboid &rhs) | |
Cuboid (IndicatorF< T, D > &indicatorF, T delta) | |
Cuboid & | operator= (const Cuboid &rhs) |
bool | operator== (const Cuboid &rhs) const |
Vector< T, D > | getOrigin () const |
Returns lower left corner coordinates. | |
T | getDeltaR () const |
Returns spacing of cuboid nodes. | |
Vector< int, D > | getExtent () const |
Returns extent in number of voxels. | |
int | getNx () const |
int | getNy () const |
int | getNz () const |
T | getPhysVolume () const |
Returns the volume of the cuboid. | |
std::size_t | getWeight () const |
void | setWeight (std::size_t weight) |
Vector< T, D > | getPhysR (LatticeR< D > latticeR) const |
LatticeR< D > | getLatticeR (Vector< T, D > physR) const |
LatticeR< D > | getFloorLatticeR (Vector< T, D > physR) const |
std::optional< LatticeR< D > > | getCloseLatticeR (Vector< T, D > physR, T eps=1e-5) const |
Returns closest latticeR within eps of physR if it exists. | |
std::size_t | getLatticeVolume () const |
Returns the number of Nodes in the volume. | |
T | getPhysPerimeter () const |
Returns the perimeter of the cuboid. | |
T | getPhysPerimeter () const |
Returns the perimeter of the cuboid. | |
std::size_t | getLatticePerimeter () const |
Returns the number of Nodes at the perimeter. | |
std::size_t | getLatticePerimeter () const |
Returns the number of Nodes at the perimeter. | |
bool | isInside (Vector< T, D > pos, int overlap=0) const |
Checks whether pos is contained in the cuboid extended with an layer of size overlap*delta. | |
bool | intersects (Vector< T, D > globMin, Vector< T, D > globMax, int overlap=0) const |
Checks whether there is an intersection with the cuboid extended by a layer of size overlap*delta. | |
bool | intersects (const Cuboid< T, D > &cuboid) const |
Returns true iff self intersects cuboid. | |
void | divide (Vector< int, D > division, std::vector< Cuboid< T, D > > &childrenC) const |
Divides the cuboid in p*q*r cuboids of equal volume and add them to the given vector. | |
void | divide (Vector< int, D > division, std::vector< Cuboid< T, D > > &childrenC) const |
Divides the cuboid in p*q cuboids of equal volume and add them to the given vector. | |
void | divideP (int p, std::vector< Cuboid< T, D > > &childrenC) const |
Divides the cuboid in p cuboids and add them to the given vector. | |
void | divideP (int p, std::vector< Cuboid< T, D > > &childrenC) const |
Divides the cuboid in p cuboids and add them to the given vector. | |
void | divideFractional (int iD, std::vector< T > fractions, std::vector< Cuboid< T, D > > &childrenC) const |
Divides the cuboid into fractions along the iDth dimension. | |
void | resize (Vector< int, D > offset, Vector< int, D > extent) |
void | refine (int factor) |
void | write (std::ostream &cout) const |
void | print () const |
void | writeAsXML (std::ostream &) const |
|
default |
|
inline |
Definition at line 54 of file cuboid.h.
|
inline |
|
inline |
Definition at line 64 of file cuboid.h.
void olb::Cuboid< T, D >::divide | ( | Vector< int, D > | division, |
std::vector< Cuboid< T, D > > & | childrenC ) const |
Divides the cuboid in p*q*r cuboids of equal volume and add them to the given vector.
Definition at line 161 of file cuboid.hh.
void olb::Cuboid< T, D >::divide | ( | Vector< int, D > | division, |
std::vector< Cuboid< T, D > > & | childrenC ) const |
Divides the cuboid in p*q cuboids of equal volume and add them to the given vector.
void olb::Cuboid< T, D >::divideFractional | ( | int | iD, |
std::vector< T > | fractions, | ||
std::vector< Cuboid< T, D > > & | childrenC ) const |
Divides the cuboid into fractions along the iDth dimension.
Definition at line 546 of file cuboid.hh.
References olb::Cuboid< T, D >::print().
void olb::Cuboid< T, D >::divideP | ( | int | p, |
std::vector< Cuboid< T, D > > & | childrenC ) const |
Divides the cuboid in p cuboids and add them to the given vector.
Definition at line 214 of file cuboid.hh.
References olb::Cuboid< T, D >::divide(), and olb::util::fabs().
void olb::Cuboid< T, D >::divideP | ( | int | p, |
std::vector< Cuboid< T, D > > & | childrenC ) const |
Divides the cuboid in p cuboids and add them to the given vector.
std::optional< LatticeR< D > > olb::Cuboid< T, D >::getCloseLatticeR | ( | Vector< T, D > | physR, |
T | eps = 1e-5 ) const |
Returns closest latticeR within eps of physR if it exists.
Definition at line 42 of file cuboid.hh.
References olb::util::abs(), and olb::util::round().
|
inline |
|
inline |
|
inline |
Definition at line 98 of file cuboid.h.
References olb::util::floor().
std::size_t olb::Cuboid< T, D >::getLatticePerimeter | ( | ) | const |
std::size_t olb::Cuboid< T, D >::getLatticePerimeter | ( | ) | const |
Returns the number of Nodes at the perimeter.
|
inline |
Definition at line 94 of file cuboid.h.
References olb::util::floor().
std::size_t olb::Cuboid< T, D >::getLatticeVolume | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
T olb::Cuboid< T, D >::getPhysPerimeter | ( | ) | const |
T olb::Cuboid< T, D >::getPhysPerimeter | ( | ) | const |
Returns the perimeter of the cuboid.
|
inline |
T olb::Cuboid< T, D >::getPhysVolume | ( | ) | const |
Returns the volume of the cuboid.
Definition at line 53 of file cuboid.hh.
References olb::util::pow().
|
inline |
bool olb::Cuboid< T, D >::intersects | ( | const Cuboid< T, D > & | cuboid | ) | const |
Returns true iff self intersects cuboid.
Definition at line 153 of file cuboid.hh.
References olb::Cuboid< T, D >::getDeltaR(), olb::Cuboid< T, D >::getExtent(), and olb::Cuboid< T, D >::getOrigin().
bool olb::Cuboid< T, D >::intersects | ( | Vector< T, D > | globMin, |
Vector< T, D > | globMax, | ||
int | overlap = 0 ) const |
Checks whether there is an intersection with the cuboid extended by a layer of size overlap*delta.
Definition at line 144 of file cuboid.hh.
References olb::maxv(), and olb::minv().
bool olb::Cuboid< T, D >::isInside | ( | Vector< T, D > | pos, |
int | overlap = 0 ) const |
Cuboid< T, D > & olb::Cuboid< T, D >::operator= | ( | const Cuboid< T, D > & | rhs | ) |
bool olb::Cuboid< T, D >::operator== | ( | const Cuboid< T, D > & | rhs | ) | const |
Definition at line 129 of file cuboid.hh.
void olb::Cuboid< T, D >::print | ( | ) | const |
void olb::Cuboid< T, D >::refine | ( | int | factor | ) |
Definition at line 92 of file cuboid.hh.
References olb::util::pow().
void olb::Cuboid< T, D >::resize | ( | Vector< int, D > | offset, |
Vector< int, D > | extent ) |
|
inline |
void olb::Cuboid< T, D >::write | ( | std::ostream & | cout | ) | const |
Definition at line 106 of file cuboid.hh.
void olb::Cuboid< T, D >::writeAsXML | ( | std::ostream & | ss | ) | const |