OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::BlockGeometry< T, D > Class Template Reference

Representation of a block geometry. More...

#include <blockGeometry.h>

+ Inheritance diagram for olb::BlockGeometry< T, D >:
+ Collaboration diagram for olb::BlockGeometry< T, D >:

Public Member Functions

 BlockGeometry (Cuboid< T, D > &cuboid, int padding, int iCglob=-1)
 
Platform getPlatform () const
 
const BlockGeometryStatistics< T, D > & getStatistics () const
 Read only access to the associated block statistic.
 
BlockGeometryStatistics< T, D > & getStatistics ()
 Write access to the associated block statistic.
 
bool hasCommunicatable (std::type_index field) const
 
auto & getCommunicatable (std::type_index field)
 
int getIcGlob () const
 Read only access to the global iC number which is given !=-1 if the block geometries are part of a super geometry.
 
Vector< int, D > getExtent () const
 Returns the extend of the block in lattice units.
 
Vector< T, D > getOrigin () const
 Read only access to the origin position given in SI units (meter)
 
getDeltaR () const
 Read only access to the voxel size given in SI units (meter)
 
template<typename... L>
std::enable_if_t< sizeof...(L)==D, int > get (L... latticeR) const
 Read-only access to a material number.
 
int get (LatticeR< D > latticeR) const
 
int get (const int latticeR[D]) const
 
int get (std::size_t iCell) const
 
int getMaterial (LatticeR< D > latticeR) const
 returns the (iX,iY) entry in the 2D scalar field
 
int getMaterial (const int latticeR[D]) const
 
template<typename... L>
std::enable_if_t< sizeof...(L)==D, int > getMaterial (L... latticeR) const
 
void set (LatticeR< D > latticeR, int material)
 Write access to a material number.
 
void set (const int latticeR[D], int material)
 
void set (std::size_t iCell, int material)
 
Vector< T, D > getPhysR (LatticeR< D > latticeR) const
 
void getPhysR (Vector< T, D > &physR, LatticeR< D > latticeR) const
 Transforms lattice to physical coordinates (wrapped from cuboid geometry)
 
Cuboid< T, D > & getCuboid ()
 
const Cuboid< T, D > & getCuboid () const
 
template<typename... L>
std::enable_if_t< sizeof...(L)==D, void > get (T physR[D], L... latticeR) const
 
template<typename DESCRIPTOR = std::conditional_t<D==2,descriptors::D2Q9<>,descriptors::D3Q27<>>>
int clean (bool verbose=true, std::vector< int > bulkMaterials={1})
 Changes all cell materials which are not in bulkMaterials to 0 if there is no neighbour from bulkMaterials.
 
int outerClean (bool verbose=true, std::vector< int > bulkMaterials={1})
 Changes all cell materials from bulkMaterials to 0 if there is a neighbour with material 0.
 
int innerClean (bool verbose=true)
 Changes all cell materials which are not 0 or 1 to 1 if there is a non robust constiallation.
 
int innerClean (int fromM, bool verbose=true)
 Changes all cells with material fromM to 1 if there is a non robust constiallation.
 
void reset (IndicatorF< T, D > &domain)
 Resets all cell materials inside of a domain to 0.
 
bool find (int material, std::vector< unsigned > offset, std::vector< int > var)
 Returns the coordinates (iX,iY) of a voxel with a given material number (material) if there exists an neighbourhood of size (offsetX,offsetY) only with voxels of the given material number.
 
bool check (int material, std::vector< int > var, std::vector< unsigned > offset)
 Returns true if at position (iX,iY) and in a neighbourhood of size (offsetX,offsetY) only voxels with a given material number (material) are there.
 
bool checkForErrors (bool verbose=true) const
 Checks for errors (searches for all outer voxels (=0) with an inner voxel (=1) as a direct neighbour)
 
void rename (int fromM, int toM)
 Replaces all material numbers (fromM) to another (toM)
 
void rename (int fromM, int toM, IndicatorF< T, D > &condition)
 Replaces all material numbers (fromM) to another (toM) if an indicator functor condition is fulfilled.
 
void rename (int fromM, int toM, LatticeR< D > offset)
 Replaces all material numbers (fromM) to another (toM) if all materials in the neighbourhood (iX-offsetX,..,iX,..,ix+offsetX), .. are of the original material number (fromM)
 
void rename (int fromM, int toM, int testM, std::vector< int > testDirection)
 Replaces all material numbers (fromM) to another (toM) if all materials in the neighbourhood (iX+1,iX+2,..,ix+testDirection[0]), .. are of another material number (testM)
 
void rename (int fromM, int toM, int fluidM, IndicatorF< T, D > &condition, Vector< int, D > discreteNormal)
 Replaces all material numbers (fromM) to another (toM) if all materials in the neighbourhood (iX+discreteNormal[0],iX+2*discreteNormal[0]), .. are of another material number (testM) and if an indicator functor condition is fulfilled.
 
void rename (int fromM, int toM, int fluidM, IndicatorF< T, D > &condition)
 Replaces all material numbers (fromM) to another (toM) if all materials in the neighbourhood (iX+discreteNormal[0],iX+2*discreteNormal[0]), .. are of another material number (fluidM) and if an indicator functor condition is fulfilled, the discreteNormal is computed from all fromM which fulfill the indicator functor condition.
 
void copyMaterialLayer (IndicatorF3D< T > &condition, int discreteNormal[D], int numberOfLayers)
 Copy a layer of material numbers inside an indicator in a discrete normal direction.
 
void regionGrowing (int fromM, int toM, LatticeR< D > seed, std::vector< int > offset, std::map< std::vector< int >, int > *tmp=nullptr)
 Replaces all material numbers (fromM) to another (toM) using a seed point and max. directions indicated by offsetX,Y != 0.
 
void printLayer (std::vector< int > min, std::vector< int > max, bool linenumber=false)
 Prints a chosen part of the block geometry.
 
void printLayer (int direction, int layer, bool linenumber=false)
 Prints a chosen part of the block geometry.
 
void printNode (std::vector< int > loc, int offset=1)
 Prints a chosen node and its neighbourhood.
 
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::BlockStructureD< D >
 BlockStructureD (Vector< int, D > size, int padding=0)
 
 BlockStructureD ()
 
void resize (Vector< int, D > size)
 
auto getCore () const
 
int getNx () const
 Read only access to block width.
 
int getNy () const
 Read only access to block height.
 
int getNz () const
 Read only access to block height.
 
LatticeR< D > getExtent () const
 
int getPadding () const
 Read only access to padding.
 
std::size_t getNcells () const
 Get number of cells.
 
CellID getCellId (LatticeR< D > latticeR) const
 Get 1D cell ID.
 
template<typename... L>
std::enable_if_t< sizeof...(L)==D, CellIDgetCellId (L... latticeR) const
 
LatticeR< D > getLatticeR (CellID iCell) const
 
CellDistance getNeighborDistance (LatticeR< D > dir) const
 Get 1D neighbor distance.
 
bool isInside (LatticeR< D > latticeR) const
 Return whether location is valid.
 
bool isInsideCore (LatticeR< D > latticeR) const
 Return whether location is inside core.
 
bool isPadding (LatticeR< D > latticeR) const
 Return whether location is valid.
 
bool isPadding (LatticeR< D > latticeR, int overlap) const
 
bool isPadding (CellID iCell) const
 
template<typename... L>
std::enable_if_t< sizeof...(L)==D, bool > isInside (L... latticeR) const
 
CellDistance getNeighborhoodRadius (LatticeR< D > latticeR) const
 Return maximum valid neighborhood sphere radius w.r.t. latticeR.
 
template<typename F >
void forSpatialLocations (F f) const
 
template<typename F >
void forSpatialLocationsParallel (F f) const
 
template<typename F >
void forSpatialLocations (LatticeR< D > min, LatticeR< D > max, F f) const
 
template<typename F >
void forCoreSpatialLocations (F f) const
 
template<typename F >
void forCellIndices (F f) const
 
- 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 Platform platform = Platform::CPU_SISD
 

Additional Inherited Members

- Protected Member Functions inherited from olb::Serializable
template<typename DataType >
void registerVar (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t &currentBlock, 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 &currentBlock, 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 &currentBlock, 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::BlockStructureD< D >
LatticeR< D > _core
 
LatticeR< D > _size
 
LatticeR< D > _projection
 
int _padding
 

Detailed Description

template<typename T, unsigned D>
class olb::BlockGeometry< T, D >

Representation of a block geometry.

Representation of a statistic for a 3D geometry.

Representation of a statistic for a 2D geometry.

This class is derived from block geometry structure. It holds the actual data with the materials. It stores pointers to all dependent block geometry views. It presents a volume of voxels where different types are given my material numbers which is important e.g. to work with different boundaries (like for inflow/output regions).

A block geomety statistic computes different integral values, like total number of different materials, materials of any kind, min./max. physical position, of an underlying block geoemtry structure.

This class is not intended to be derived from.

Definition at line 50 of file blockGeometryStatistics3D.h.

Constructor & Destructor Documentation

◆ BlockGeometry()

template<typename T , unsigned D>
olb::BlockGeometry< T, D >::BlockGeometry ( Cuboid< T, D > & cuboid,
int padding,
int iCglob = -1 )

Definition at line 44 of file blockGeometry.hh.

45 : BlockStructureD<D>(cuboid.getExtent(), padding),
46 _data(this->getNcells()),
47 _communicatable(_data),
48 _cuboid(cuboid),
49 _iCglob(iCglob),
50 _statistics(this),
51 clout(std::cout, ("BlockGeometry" + std::to_string(D) + "D"))
52{
53 _statistics.update(false);
54}
std::size_t getNcells() const
Get number of cells.

Member Function Documentation

◆ check()

template<typename T , unsigned D>
bool olb::BlockGeometry< T, D >::check ( int material,
std::vector< int > var,
std::vector< unsigned > offset )

Returns true if at position (iX,iY) and in a neighbourhood of size (offsetX,offsetY) only voxels with a given material number (material) are there.

Definition at line 346 of file blockGeometry.hh.

348{
349 bool found = true;
350 for (int iOffsetX = -offset[0]; iOffsetX <= (int) offset[0]; ++iOffsetX) {
351 for (int iOffsetY = -offset[1]; iOffsetY <= (int) offset[1]; ++iOffsetY) {
352 if constexpr (D==3){
353 for (int iOffsetZ = -offset[2]; iOffsetZ <= (int) offset[2]; ++iOffsetZ) {
354 if (getMaterial({var[0] + iOffsetX, var[1] + iOffsetY, var[2] + iOffsetZ}) != material) {
355 found = false;
356 }
357 }
358 } else {
359 if (getMaterial({var[0] + iOffsetX, var[1] + iOffsetY}) != material) {
360 found = false;
361 }
362 }
363 }
364 }
365 return found;
366}
int getMaterial(LatticeR< D > latticeR) const
returns the (iX,iY) entry in the 2D scalar field

◆ checkForErrors()

template<typename T , unsigned D>
bool olb::BlockGeometry< T, D >::checkForErrors ( bool verbose = true) const

Checks for errors (searches for all outer voxels (=0) with an inner voxel (=1) as a direct neighbour)

Definition at line 369 of file blockGeometry.hh.

370{
371 bool error = false;
372 using DESCRIPTOR = std::conditional_t<D==2,descriptors::D2Q9<>,descriptors::D3Q27<>>;
373 bool errorFound = false;
374 this->forSpatialLocations([&](LatticeR<D> latticeR)
375 {
376 if (get(latticeR) == 0) {
377 errorFound = false;
378 for(int iPop = 1; iPop < DESCRIPTOR::q; iPop++){
379 if(getMaterial(latticeR + (descriptors::c<DESCRIPTOR>(iPop))) == 1){
380 errorFound = true;
381 }
382 }
383 if(errorFound){
384 error = true;
385 }
386 }
387 });
388
389 if (verbose) {
390 if (error) {
391 clout << "error!" << std::endl;
392 }
393 else {
394 clout << "the model is correct!" << std::endl;
395 }
396 }
397 return error;
398}
std::enable_if_t< sizeof...(L)==D, int > get(L... latticeR) const
Read-only access to a material number.
void forSpatialLocations(F f) const
constexpr int c(unsigned iPop, unsigned iDim) any_platform
Definition functions.h:83
Vector< std::int32_t, D > LatticeR
Type for spatial block-local lattice coordinates.

References olb::descriptors::c().

+ Here is the call graph for this function:

◆ clean()

template<typename T , unsigned D>
template<typename DESCRIPTOR >
int olb::BlockGeometry< T, D >::clean ( bool verbose = true,
std::vector< int > bulkMaterials = {1} )

Changes all cell materials which are not in bulkMaterials to 0 if there is no neighbour from bulkMaterials.

Definition at line 166 of file blockGeometry.hh.

167{
168 //using DESCRIPTOR = std::conditional_t<D==2,descriptors::D2Q5<>,descriptors::D3Q27<>>;
169int counter=0;
170 bool toClean = true;
171 this->forCoreSpatialLocations([&](LatticeR<D> latticeR) {
172 // material not 0 and not in bulkMaterials
173 if (get(latticeR) != 0 && (! util::isContained(bulkMaterials, get(latticeR))) ) {
174 toClean = true;
175 for (int iPop = 1; iPop < DESCRIPTOR::q; iPop++){
176 if ( util::isContained(bulkMaterials, get(latticeR + (descriptors::c<DESCRIPTOR>(iPop)))) ){
177 toClean = false;
178 }
179 }
180 if (toClean){
181 set(latticeR, 0);
182 counter++;
183 }
184 }
185 });
186 if (verbose) {
187 clout << "cleaned "<< counter << " outer boundary voxel(s)" << std::endl;
188 }
189 return counter;
190}
void set(LatticeR< D > latticeR, int material)
Write access to a material number.
void forCoreSpatialLocations(F f) const
bool isContained(const C &c, U object)
Check, if object is contained in iteratable container c.

◆ copyMaterialLayer()

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::copyMaterialLayer ( IndicatorF3D< T > & condition,
int discreteNormal[D],
int numberOfLayers )

Copy a layer of material numbers inside an indicator in a discrete normal direction.

Definition at line 569 of file blockGeometry.hh.

570{
571 T physR[D];
572 this->forCoreSpatialLocations([&](LatticeR<D> latticeR) {
573 getPhysR(physR, latticeR);
574 bool inside[1];
575 condition(inside, physR);
576 if (inside[0]) {
577 for (int i = 0; i < numberOfLayers; i++) {
578 if (0 <= latticeR[0] + i * discreteNormal[0] && latticeR[0] + i * discreteNormal[0] < this->getNx() &&
579 0 <= latticeR[1] + i * discreteNormal[1] && latticeR[1] + i * discreteNormal[1] < this->getNy()){
580 if constexpr(D==3){
581 if(0 <= latticeR[2] + i * discreteNormal[2] && latticeR[2] + i * discreteNormal[2] < this->getNz()){
582 set({latticeR[0] + i * discreteNormal[0], latticeR[1] + i * discreteNormal[1], latticeR[2] + i * discreteNormal[2]}, get(latticeR));
583 }
584 } else {
585 set({latticeR[0] + i * discreteNormal[0], latticeR[1] + i * discreteNormal[1]}, get(latticeR));
586 }
587 }
588 }
589 }
590 });
591}
Vector< T, D > getPhysR(LatticeR< D > latticeR) const
int getNy() const
Read only access to block height.
int getNx() const
Read only access to block width.
int getNz() const
Read only access to block height.

◆ find()

template<typename T , unsigned D>
bool olb::BlockGeometry< T, D >::find ( int material,
std::vector< unsigned > offset,
std::vector< int > var )

Returns the coordinates (iX,iY) of a voxel with a given material number (material) if there exists an neighbourhood of size (offsetX,offsetY) only with voxels of the given material number.

Definition at line 324 of file blockGeometry.hh.

326{
327 bool found = false;
328 for (var[0] = 0; var[0] < this->getNx(); var[0]++) {
329 for (var[1] = 0; var[1] < this->getNy(); var[1]++) {
330 if constexpr(D==3){
331 for (var[2] = 0; var[2] < this->getNz(); var[2]++) {
332 found = check(material, var, offset);
333 }
334 } else {
335 found = check(material, var, offset);
336 }
337 if (found) {
338 return found;
339 }
340 }
341 }
342 return found;
343}
bool check(int material, std::vector< int > var, std::vector< unsigned > offset)
Returns true if at position (iX,iY) and in a neighbourhood of size (offsetX,offsetY) only voxels with...

◆ get() [1/5]

template<typename T , unsigned D>
int olb::BlockGeometry< T, D >::get ( const int latticeR[D]) const

Definition at line 87 of file blockGeometry.hh.

88{
89 return _data[0][this->getCellId(latticeR)];
90}
CellID getCellId(LatticeR< D > latticeR) const
Get 1D cell ID.

◆ get() [2/5]

template<typename T , unsigned D>
template<typename... L>
std::enable_if_t< sizeof...(L)==D, int > olb::BlockGeometry< T, D >::get ( L... latticeR) const
inline

Read-only access to a material number.

Definition at line 107 of file blockGeometry.h.

107 {
108 return _data[0][this->getCellId(latticeR...)];
109 }

References olb::BlockStructureD< D >::getCellId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get() [3/5]

template<typename T , unsigned D>
int olb::BlockGeometry< T, D >::get ( LatticeR< D > latticeR) const

Definition at line 81 of file blockGeometry.hh.

82{
83 return _data[0][this->getCellId(latticeR)];
84}

◆ get() [4/5]

template<typename T , unsigned D>
int olb::BlockGeometry< T, D >::get ( std::size_t iCell) const

Definition at line 93 of file blockGeometry.hh.

94{
95 return _data[0][iCell];
96}

◆ get() [5/5]

template<typename T , unsigned D>
template<typename... L>
std::enable_if_t< sizeof...(L)==D, void > olb::BlockGeometry< T, D >::get ( T physR[D],
L... latticeR ) const
inline

Definition at line 146 of file blockGeometry.h.

146 {
147 return this->getPhysR(physR[D],LatticeR<D>{latticeR...});
148 }

References olb::BlockGeometry< T, D >::getPhysR().

+ Here is the call graph for this function:

◆ getBlock()

template<typename T , unsigned D>
bool * olb::BlockGeometry< T, D >::getBlock ( std::size_t iBlock,
std::size_t & sizeBlock,
bool loadingMode )
overridevirtual

Return a pointer to the memory of the current block and its size for the serializable interface.

Implements olb::Serializable.

Definition at line 748 of file blockGeometry.hh.

749{
750 std::size_t currentBlock = 0;
751 bool* dataPtr = nullptr;
752
753 this->registerSerializableOfConstSize(iBlock, sizeBlock, currentBlock, dataPtr, _data, loadingMode);
754
755 return dataPtr;
756}
void registerSerializableOfConstSize(const std::size_t iBlock, std::size_t &sizeBlock, std::size_t &currentBlock, bool *&dataPtr, DataType &data, const bool loadingMode=false)
Register Serializable object of constant size.
Definition serializer.h:239

◆ getCommunicatable()

template<typename T , unsigned D>
auto & olb::BlockGeometry< T, D >::getCommunicatable ( std::type_index field)
inline

Definition at line 88 of file blockGeometry.h.

88 {
89 OLB_ASSERT(field == typeid(descriptors::MATERIAL),
90 "BlockGeometry only offers MATERIAL for communication");
91 return _communicatable;
92 }
#define OLB_ASSERT(COND, MESSAGE)
Definition olbDebug.h:45

References OLB_ASSERT.

◆ getCuboid() [1/2]

template<typename T , unsigned D>
Cuboid< T, D > & olb::BlockGeometry< T, D >::getCuboid ( )
inline

Definition at line 137 of file blockGeometry.h.

137 {
138 return _cuboid;
139 }

◆ getCuboid() [2/2]

template<typename T , unsigned D>
const Cuboid< T, D > & olb::BlockGeometry< T, D >::getCuboid ( ) const
inline

Definition at line 140 of file blockGeometry.h.

140 {
141 return _cuboid;
142 }

◆ getDeltaR()

template<typename T , unsigned D>
T olb::BlockGeometry< T, D >::getDeltaR ( ) const

Read only access to the voxel size given in SI units (meter)

Definition at line 75 of file blockGeometry.hh.

76{
77 return _cuboid.getDeltaR();
78}
+ Here is the caller graph for this function:

◆ getExtent()

template<typename T , unsigned D>
Vector< int, D > olb::BlockGeometry< T, D >::getExtent ( ) const

Returns the extend of the block in lattice units.

Definition at line 154 of file blockGeometry.hh.

155{
156 if constexpr (D == 3) {
157 return Vector<int,3>(this->getNx(), this->getNy(), this->getNz());
158 } else {
159 return Vector<int,2>(this->getNx(), this->getNy());
160 }
161 __builtin_unreachable();
162}
Vector(T &&t, Ts &&... ts) -> Vector< std::remove_cvref_t< T >, 1+sizeof...(Ts)>
+ Here is the caller graph for this function:

◆ getIcGlob()

template<typename T , unsigned D>
int olb::BlockGeometry< T, D >::getIcGlob ( ) const

Read only access to the global iC number which is given !=-1 if the block geometries are part of a super geometry.

Definition at line 148 of file blockGeometry.hh.

149{
150 return _iCglob;
151}
+ Here is the caller graph for this function:

◆ getMaterial() [1/3]

template<typename T , unsigned D>
int olb::BlockGeometry< T, D >::getMaterial ( const int latticeR[D]) const

Definition at line 110 of file blockGeometry.hh.

111{
112 LatticeR<D> loc{latticeR};
113 if (this->isInside(loc)) {
114 return _data[0][this->getCellId(loc)];
115 }
116 else {
117 return 0;
118 }
119}
bool isInside(LatticeR< D > latticeR) const
Return whether location is valid.

◆ getMaterial() [2/3]

template<typename T , unsigned D>
template<typename... L>
std::enable_if_t< sizeof...(L)==D, int > olb::BlockGeometry< T, D >::getMaterial ( L... latticeR) const
inline

Definition at line 120 of file blockGeometry.h.

120 {
121 return this->getMaterial(LatticeR<D>{latticeR...});
122 }

References olb::BlockGeometry< T, D >::getMaterial().

+ Here is the call graph for this function:

◆ getMaterial() [3/3]

template<typename T , unsigned D>
int olb::BlockGeometry< T, D >::getMaterial ( LatticeR< D > latticeR) const

returns the (iX,iY) entry in the 2D scalar field

Definition at line 99 of file blockGeometry.hh.

100{
101 if (this->isInside(latticeR)) {
102 return _data[0][this->getCellId(latticeR)];
103 }
104 else {
105 return 0;
106 }
107}
+ Here is the caller graph for this function:

◆ getNblock()

template<typename T , unsigned D>
std::size_t olb::BlockGeometry< T, D >::getNblock ( ) const
overridevirtual

Number of data blocks for the serializable interface.

Implements olb::Serializable.

Definition at line 736 of file blockGeometry.hh.

737{
738 return _data.getNblock();
739}

References olb::BlockGeometry< T, D >::getNblock().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOrigin()

template<typename T , unsigned D>
Vector< T, D > olb::BlockGeometry< T, D >::getOrigin ( ) const

Read only access to the origin position given in SI units (meter)

Definition at line 69 of file blockGeometry.hh.

70{
71 return _cuboid.getOrigin();
72}
+ Here is the caller graph for this function:

◆ getPhysR() [1/2]

template<typename T , unsigned D>
Vector< T, D > olb::BlockGeometry< T, D >::getPhysR ( LatticeR< D > latticeR) const
inline

Definition at line 129 of file blockGeometry.h.

129 {
130 Vector<T,D> physR;
131 getPhysR(physR, latticeR);
132 return physR;
133 }

References olb::BlockGeometry< T, D >::getPhysR().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPhysR() [2/2]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::getPhysR ( Vector< T, D > & physR,
LatticeR< D > latticeR ) const

Transforms lattice to physical coordinates (wrapped from cuboid geometry)

Definition at line 141 of file blockGeometry.hh.

142{
143 physR = _cuboid.getPhysR(latticeR);
144 return;
145}

◆ getPlatform()

template<typename T , unsigned D>
Platform olb::BlockGeometry< T, D >::getPlatform ( ) const
inline

Definition at line 76 of file blockGeometry.h.

76 {
77 return platform;
78 }
static constexpr Platform platform

References olb::BlockGeometry< T, D >::platform.

◆ getSerializableSize()

template<typename T , unsigned D>
std::size_t olb::BlockGeometry< T, D >::getSerializableSize ( ) const
overridevirtual

Binary size for the serializer.

Implements olb::Serializable.

Definition at line 742 of file blockGeometry.hh.

743{
744 return _data.getSerializableSize();
745}

◆ getStatistics() [1/2]

template<typename T , unsigned D>
BlockGeometryStatistics< T, D > & olb::BlockGeometry< T, D >::getStatistics ( )

Write access to the associated block statistic.

Definition at line 63 of file blockGeometry.hh.

64{
65 return _statistics;
66}

◆ getStatistics() [2/2]

template<typename T , unsigned D>
const BlockGeometryStatistics< T, D > & olb::BlockGeometry< T, D >::getStatistics ( ) const

Read only access to the associated block statistic.

Definition at line 57 of file blockGeometry.hh.

58{
59 return _statistics;
60}
+ Here is the caller graph for this function:

◆ hasCommunicatable()

template<typename T , unsigned D>
bool olb::BlockGeometry< T, D >::hasCommunicatable ( std::type_index field) const
inline

Definition at line 85 of file blockGeometry.h.

85 {
86 return field == typeid(descriptors::MATERIAL);
87 }
std::enable_if_t< DESCRIPTOR::d==2, std::shared_ptr< SuperF2D< T > > > field(SuperLattice< T, DESCRIPTOR > &sLattice)
Returns external field functor.

◆ innerClean() [1/2]

template<typename T , unsigned D>
int olb::BlockGeometry< T, D >::innerClean ( bool verbose = true)

Changes all cell materials which are not 0 or 1 to 1 if there is a non robust constiallation.

Definition at line 219 of file blockGeometry.hh.

220{
221 int count2 = 0;
222 using DESCRIPTOR = std::conditional_t<D==2,descriptors::D2Q5<>,descriptors::D3Q7<>>;
223
224 this->forCoreSpatialLocations([&](LatticeR<D> latticeR) {
225 if (get(latticeR) != 1 && get(latticeR) != 0) {
226 if constexpr (D==3){
227 bool var[7] = {false};
228 for(int iPop = 1; iPop < DESCRIPTOR::q; iPop++){
229 if(getMaterial(latticeR + (descriptors::c<DESCRIPTOR>(iPop)))==1){
230 var[iPop] = true;
231 }
232 }
233 int comb[12][3]={{1,4,2},{1,4,3},{1,4,5},{1,4,6},{2,5,1},{2,5,3},{2,5,4},{2,5,6},{3,6,1},{3,6,2},{3,6,4},{3,6,5}};
234 for(int i = 0; i < 12; i++){
235 if (var[(comb[i][0])] == true
236 && var[(comb[i][1])] == true
237 && var[(comb[i][2])] == true){
238 set(latticeR, 1);
239 count2++;//count2 is the same value as before, count2 gets increased even if this cell has already been cleaned
240 }
241 }
242 } else {
243 int var = 0;
244 for(int iPop = 1; iPop < DESCRIPTOR::q; iPop++){
245 if(getMaterial(latticeR + (descriptors::c<DESCRIPTOR>(iPop)))==1){
246 var = var+1;
247 }
248 }
249 if(var >= 3){
250 set(latticeR, 1);
251 count2++;//count2 differs from original count2
252 }
253 }
254 }
255 });
256
257 if (verbose) {
258 clout << "cleaned "<< count2 << " inner boundary voxel(s)" << std::endl;
259 }
260 return count2;
261}

References olb::descriptors::c().

+ Here is the call graph for this function:

◆ innerClean() [2/2]

template<typename T , unsigned D>
int olb::BlockGeometry< T, D >::innerClean ( int fromM,
bool verbose = true )

Changes all cells with material fromM to 1 if there is a non robust constiallation.

Definition at line 264 of file blockGeometry.hh.

265{
266 int count2 = 0;
267 using DESCRIPTOR = std::conditional_t<D==2,descriptors::D2Q5<>,descriptors::D3Q7<>>;
268
269 this->forCoreSpatialLocations([&](LatticeR<D> latticeR) {
270 if (get(latticeR) != 1 && get(latticeR) != 0 && get(latticeR) == fromM) {
271 if constexpr (D==3){
272 bool var[7] = {false};
273 for(int iPop = 1; iPop < DESCRIPTOR::q; iPop++){
274 if(getMaterial(latticeR + (descriptors::c<DESCRIPTOR>(iPop)))==1){
275 var[iPop] = true;
276 }
277 }
278 int comb[12][3]={{1,4,2},{1,4,3},{1,4,5},{1,4,6},{2,5,1},{2,5,3},{2,5,4},{2,5,6},{3,6,1},{3,6,2},{3,6,4},{3,6,5}};
279 for(int i = 0; i < 12; i++){
280 if (var[(comb[i][0])] == true
281 && var[(comb[i][1])] == true
282 && var[(comb[i][2])] == true){
283 set(latticeR, 1);
284 count2++;//count2 is the same value as before, count2 gets increased even if this cell has already been cleaned
285 }
286 }
287 } else {
288 int var = 0;
289 for(int iPop = 1; iPop < DESCRIPTOR::q; iPop++){
290 if(getMaterial(latticeR + (descriptors::c<DESCRIPTOR>(iPop)))==1){
291 var = var+1;
292 }
293 }
294 if(var >= 3){
295 set(latticeR, 1);
296 count2++;//count2 differs from original count2
297 }
298 }
299 }
300 });
301
302 if (verbose){
303 clout << "cleaned "<< count2
304 << " inner boundary voxel(s) of Type " << fromM << std::endl;
305 }
306 return count2;
307}

References olb::descriptors::c().

+ Here is the call graph for this function:

◆ outerClean()

template<typename T , unsigned D>
int olb::BlockGeometry< T, D >::outerClean ( bool verbose = true,
std::vector< int > bulkMaterials = {1} )

Changes all cell materials from bulkMaterials to 0 if there is a neighbour with material 0.

Definition at line 193 of file blockGeometry.hh.

194{
195 int counter=0;
196 using DESCRIPTOR = std::conditional_t<D==2,descriptors::D2Q9<>,descriptors::D3Q27<>>;
197 bool toClean = false;
198 this->forCoreSpatialLocations([&](LatticeR<D> latticeR) {
199 if (util::isContained(bulkMaterials, get(latticeR))) {
200 toClean = false;
201 for(int iPop = 1; iPop < DESCRIPTOR::q; iPop++){
202 if(getMaterial(latticeR + (descriptors::c<DESCRIPTOR>(iPop))) == 0){
203 toClean = true;
204 }
205 }
206 if(toClean){
207 set(latticeR, 0);
208 counter++;
209 }
210 }
211 });
212 if (verbose) {
213 clout << "cleaned "<< counter << " outer fluid voxel(s)" << std::endl;
214 }
215 return counter;
216}

◆ printLayer() [1/2]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::printLayer ( int direction,
int layer,
bool linenumber = false )

Prints a chosen part of the block geometry.

Definition at line 679 of file blockGeometry.hh.

680{
681 assert(direction >= 0 && direction <= 2);
682 if constexpr(D==3){
683 switch (direction) {
684 case 0:
685 printLayer({layer, 0, 0},{layer, this->getNy() - 1, this->getNz() - 1}, linenumber);
686 break;
687 case 1:
688 printLayer({0, layer, 0}, {this->getNx() - 1, layer, this->getNz() - 1}, linenumber);
689 break;
690 case 2:
691 printLayer({0, 0, layer}, {this->getNx() - 1, this->getNy() - 1, layer}, linenumber);
692 break;
693 }
694 } else {
695 switch (direction) {
696 case 0:
697 printLayer({layer, 0}, {layer, this->getNy() - 1}, linenumber);
698 break;
699 case 1:
700 printLayer({0, layer}, {this->getNx() - 1, layer}, linenumber);
701 break;
702 }
703 }
704}
void printLayer(std::vector< int > min, std::vector< int > max, bool linenumber=false)
Prints a chosen part of the block geometry.

◆ printLayer() [2/2]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::printLayer ( std::vector< int > min,
std::vector< int > max,
bool linenumber = false )

Prints a chosen part of the block geometry.

Definition at line 653 of file blockGeometry.hh.

654{
655 for (int x = min[0]; x <= max[0]; x++) {
656 if (linenumber) {
657 clout << x << ": ";
658 }
659 for (int y = min[1]; y <= max[1]; y++) {
660 if constexpr (D==3){
661 for (int z = min[2]; z <= max[2]; z++) {
662 clout << getMaterial({x, y, z}) << " ";
663 }
664 if (max[1] - min[1] != 0 && max[2] - min[2] != 0) {
665 clout << std::endl;
666 }
667 } else {
668 clout << getMaterial({x, y}) << " ";
669 }
670 }
671 if (max[0] - min[0] != 0) {
672 clout << std::endl;
673 }
674 }
675 clout << std::endl;
676}

◆ printNode()

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::printNode ( std::vector< int > loc,
int offset = 1 )

Prints a chosen node and its neighbourhood.

Definition at line 707 of file blockGeometry.hh.

708{
709 for (int x = loc[0] - offset; x <= loc[0] + offset; x++) {
710 if constexpr (D==3) {
711 clout << "yz-plane_x=" << x - loc[0] << std::endl;
712 }
713 for (int y = loc[1] - offset; y <= loc[1] + offset; y++) {
714 if constexpr (D==3){
715 for (int z = loc[2] - offset; z <= loc[2] + offset; z++) {
716 clout << getMaterial({x, y, z}) << " ";
717 }
718 clout << std::endl;
719 } else {
720 clout << getMaterial({x, y}) << " ";
721 }
722 }
723 if constexpr (D==2){
724 clout << std::endl;
725 }
726 }
727}

◆ regionGrowing()

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::regionGrowing ( int fromM,
int toM,
LatticeR< D > seed,
std::vector< int > offset,
std::map< std::vector< int >, int > * tmp = nullptr )

Replaces all material numbers (fromM) to another (toM) using a seed point and max. directions indicated by offsetX,Y != 0.

Definition at line 594 of file blockGeometry.hh.

596{
597 std::map<std::vector<int>, int> tmp2;
598 bool firstCall = false;
599 if (tmp == nullptr) {
600 tmp = &tmp2;
601 firstCall = true;
602 }
603
604 if (getMaterial(seed) == fromM) {
605 std::vector<int> found;
606 found.push_back(seed[0]);
607 found.push_back(seed[1]);
608 if constexpr(D==3){
609 found.push_back(seed[2]);
610 if (tmp->count(found) == 0) {
611 (*tmp)[found] = 2;
612 if (offset[0] != 0) {
613 regionGrowing(fromM, toM, {seed[0] + 1, seed[1], seed[2]}, offset, tmp);
614 regionGrowing(fromM, toM, {seed[0] - 1, seed[1], seed[2]}, offset, tmp);
615 }
616 if (offset[1] != 0) {
617 regionGrowing(fromM, toM, {seed[0], seed[1] + 1, seed[2]}, offset, tmp);
618 regionGrowing(fromM, toM, {seed[0], seed[1] - 1, seed[2]}, offset, tmp);
619 }
620 if (offset[2] != 0) {
621 regionGrowing(fromM, toM, {seed[0], seed[1], seed[2] + 1}, offset, tmp);
622 regionGrowing(fromM, toM, {seed[0], seed[1], seed[2] - 1}, offset, tmp);
623 }
624 }
625 } else {
626 if (tmp->count(found) == 0) {
627 (*tmp)[found] = 2;
628 if (offset[0] != 0) {
629 regionGrowing(fromM, toM, {seed[0] + 1, seed[1]}, offset, tmp);
630 regionGrowing(fromM, toM, {seed[0] - 1, seed[1]}, offset, tmp);
631 }
632 if (offset[1] != 0) {
633 regionGrowing(fromM, toM, {seed[0], seed[1] + 1}, offset, tmp);
634 regionGrowing(fromM, toM, {seed[0], seed[1] - 1}, offset, tmp);
635 }
636 }
637 }
638 }
639 if (firstCall) {
640 std::map<std::vector<int>, int>::iterator iter;
641 for (iter = tmp->begin(); iter != tmp->end(); iter++) {
642 if constexpr(D==3){
643 set((iter->first)[0],(iter->first)[1],(iter->first)[2], toM);
644 } else {
645 set((iter->first)[0],(iter->first)[1], toM);
646 }
647 }
648 }
649 return;
650}
void regionGrowing(int fromM, int toM, LatticeR< D > seed, std::vector< int > offset, std::map< std::vector< int >, int > *tmp=nullptr)
Replaces all material numbers (fromM) to another (toM) using a seed point and max....

◆ rename() [1/6]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::rename ( int fromM,
int toM )

Replaces all material numbers (fromM) to another (toM)

Definition at line 401 of file blockGeometry.hh.

402{
403 this->forCoreSpatialLocations([&](LatticeR<D> latticeR) {
404 if (get(latticeR) == fromM) {
405 set(latticeR, toM);
406 }
407 });
408}

◆ rename() [2/6]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::rename ( int fromM,
int toM,
IndicatorF< T, D > & condition )

Replaces all material numbers (fromM) to another (toM) if an indicator functor condition is fulfilled.

Definition at line 411 of file blockGeometry.hh.

412{
413 OstreamManager clout("rename");
414
415 Vector<T, D> physR;
416
417 Vector<T, D> min = condition.getMin();
418 Vector<T, D> max = condition.getMax();
419 LatticeR<D> latticeRmin= _cuboid.getLatticeR(min);
420 LatticeR<D> latticeRmax=_cuboid.getLatticeR(max);
421
422 this->forSpatialLocations(latticeRmin, latticeRmax, [&](LatticeR<D> latticeR) {
423 if (get(latticeR) == fromM) {
424 getPhysR(physR, latticeR);
425
426 bool inside[1];
427 condition(inside, physR.data());
428
429 if (inside[0]) {
430 set(latticeR, toM);
431 }
432 }
433 });
434}

References olb::Vector< T, Size >::data().

+ Here is the call graph for this function:

◆ rename() [3/6]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::rename ( int fromM,
int toM,
int fluidM,
IndicatorF< T, D > & condition )

Replaces all material numbers (fromM) to another (toM) if all materials in the neighbourhood (iX+discreteNormal[0],iX+2*discreteNormal[0]), .. are of another material number (fluidM) and if an indicator functor condition is fulfilled, the discreteNormal is computed from all fromM which fulfill the indicator functor condition.

Definition at line 537 of file blockGeometry.hh.

539{
540 rename(fromM, toM, condition);
541 std::vector<int> testDirection = getStatistics().computeDiscreteNormal(toM);
542 T physR[D];
543 // values that have been incorrectly changed from "fromM to "toM" get assigned back to "fromM"
544 this->forCoreSpatialLocations([&](LatticeR<D> latticeR) {
545 if (get(latticeR) == toM) {
546 getPhysR(physR, latticeR);
547 bool inside[1];
548 condition(inside, physR);
549 if (inside[0]) {
550 if constexpr(D==3){
551 if (getMaterial({latticeR[0]+testDirection[0],latticeR[1]+testDirection[1],latticeR[2]+testDirection[2]})!=fluidM ||
552 getMaterial({latticeR[0]+2*testDirection[0],latticeR[1]+2*testDirection[1],latticeR[2]+2*testDirection[2]})!=fluidM ||
553 getMaterial({latticeR[0]-testDirection[0],latticeR[1]-testDirection[1],latticeR[2]-testDirection[2]})!=0 ) {
554 set(latticeR, fromM);
555 }
556 } else {
557 if (getMaterial({latticeR[0]+testDirection[0],latticeR[1]+testDirection[1]})!=fluidM ||
558 getMaterial({latticeR[0]+2*testDirection[0],latticeR[1]+2*testDirection[1]})!=fluidM ||
559 getMaterial({latticeR[0]-testDirection[0],latticeR[1]-testDirection[1]})!=0 ) {
560 set(latticeR, fromM);
561 }
562 }
563 }
564 }
565 });
566}
void rename(int fromM, int toM)
Replaces all material numbers (fromM) to another (toM)
const BlockGeometryStatistics< T, D > & getStatistics() const
Read only access to the associated block statistic.

◆ rename() [4/6]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::rename ( int fromM,
int toM,
int fluidM,
IndicatorF< T, D > & condition,
Vector< int, D > discreteNormal )

Replaces all material numbers (fromM) to another (toM) if all materials in the neighbourhood (iX+discreteNormal[0],iX+2*discreteNormal[0]), .. are of another material number (testM) and if an indicator functor condition is fulfilled.

Definition at line 504 of file blockGeometry.hh.

506{
507 rename(fromM, toM, condition);
508 Vector<int,D> testDirection(discreteNormal);
509 Vector<T,D> physR;
510
511 this->forCoreSpatialLocations([&](LatticeR<D> latticeR) {
512 if (get(latticeR) == toM) {
513 getPhysR(physR, latticeR);
514 bool inside[1];
515
516 condition(inside, physR.data());
517 if (inside[0]) {
518 if constexpr (D==3){
519 if (getMaterial({latticeR[0]+testDirection[0],latticeR[1]+testDirection[1],latticeR[2]+testDirection[2]})!=fluidM ||
520 getMaterial({latticeR[0]+2*testDirection[0],latticeR[1]+2*testDirection[1],latticeR[2]+2*testDirection[2]})!=fluidM ||
521 getMaterial({latticeR[0]-testDirection[0],latticeR[1]-testDirection[1],latticeR[2]-testDirection[2]})!=0 ) {
522 set(latticeR, fromM);
523 }
524 } else {
525 if (getMaterial({latticeR[0]+testDirection[0],latticeR[1]+testDirection[1]}) != fluidM ||
526 getMaterial({latticeR[0]+2*testDirection[0],latticeR[1]+2*testDirection[1]}) != fluidM ||
527 getMaterial({latticeR[0]-testDirection[0],latticeR[1]-testDirection[1]}) != 0) {
528 set(latticeR, fromM);
529 }
530 }
531 }
532 }
533 });
534}

References olb::Vector< T, Size >::data().

+ Here is the call graph for this function:

◆ rename() [5/6]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::rename ( int fromM,
int toM,
int testM,
std::vector< int > testDirection )

Replaces all material numbers (fromM) to another (toM) if all materials in the neighbourhood (iX+1,iX+2,..,ix+testDirection[0]), .. are of another material number (testM)

Definition at line 469 of file blockGeometry.hh.

471{
472 this->forCoreSpatialLocations([&](LatticeR<D> latticeR) {
473 if (get(latticeR) == fromM) {
474 // flag that indicates the renaming of the current voxel, valid voxels are not renamed
475 bool isValid = true;
476 for (int iOffsetX = util::min(testDirection[0],0); iOffsetX <= util::max(testDirection[0],0); ++iOffsetX) {
477 for (int iOffsetY = util::min(testDirection[1],0); iOffsetY <= util::max(testDirection[1],0); ++iOffsetY) {
478 if constexpr (D == 3){
479 for (int iOffsetZ = util::min(testDirection[2],0); iOffsetZ <= util::max(testDirection[2],0); ++iOffsetZ) {
480 if (iOffsetX!=0 || iOffsetY!=0 || iOffsetZ!=0) {
481 if (getMaterial({latticeR[0] + iOffsetX, latticeR[1] + iOffsetY, latticeR[2] + iOffsetZ}) != testM) {
482 isValid = false;
483 }
484 }
485 }
486 } else {
487 if (iOffsetX!=0 || iOffsetY!=0) {
488 if (getMaterial({latticeR[0] + iOffsetX, latticeR[1] + iOffsetY}) != testM) {
489 isValid = false;
490 }
491 }
492 }
493 }
494 }
495 if (!isValid) {
496 set(latticeR, toM);
497 }
498 }
499 });
500}
bool isValid(Particle< T, PARTICLETYPE > particle)
Expr min(Expr a, Expr b)
Definition expr.cpp:249
Expr max(Expr a, Expr b)
Definition expr.cpp:245

References olb::util::max(), and olb::util::min().

+ Here is the call graph for this function:

◆ rename() [6/6]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::rename ( int fromM,
int toM,
LatticeR< D > offset )

Replaces all material numbers (fromM) to another (toM) if all materials in the neighbourhood (iX-offsetX,..,iX,..,ix+offsetX), .. are of the original material number (fromM)

Definition at line 436 of file blockGeometry.hh.

437{
438 this->forCoreSpatialLocations([&](LatticeR<D> latticeR) {
439 if (get(latticeR) == fromM) {
440 bool found = true;
441 for (int iOffsetX = -offset[0]; iOffsetX <= (int) offset[0]; ++iOffsetX) {
442 for (int iOffsetY = -offset[1]; iOffsetY <= (int) offset[1]; ++iOffsetY) {
443 if constexpr (D == 3) {
444 for (int iOffsetZ = -offset[2]; iOffsetZ <= (int) offset[2]; ++iOffsetZ) {
445 if (getMaterial({latticeR[0] + iOffsetX, latticeR[1] + iOffsetY, latticeR[2] + iOffsetZ}) != fromM) {
446 if (getMaterial({latticeR[0] + iOffsetX, latticeR[1] + iOffsetY, latticeR[2] + iOffsetZ}) != 1245) {
447 found = false;
448 }
449 }
450 }
451 } else {
452 if (getMaterial({latticeR[0] + iOffsetX, latticeR[1] + iOffsetY}) != fromM) {
453 if (getMaterial({latticeR[0] + iOffsetX, latticeR[1] + iOffsetY}) != 1245) {
454 found = false;
455 }
456 }
457 }
458 }
459 }
460 if (found) {
461 set(latticeR, 1245); // TODO Replace this embarassing approach
462 }
463 }
464 });
465 rename(1245,toM);
466}

◆ reset()

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::reset ( IndicatorF< T, D > & domain)

Resets all cell materials inside of a domain to 0.

Definition at line 310 of file blockGeometry.hh.

311{
312 this->forCoreSpatialLocations([&](LatticeR<D> latticeR) {
313 T physR[D] { };
314 bool output{};
315 getPhysR(physR, latticeR);
316 domain(&output, physR);
317 if (output) {
318 set(latticeR, 0);
319 }
320 });
321}

◆ set() [1/3]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::set ( const int latticeR[D],
int material )

Definition at line 128 of file blockGeometry.hh.

129{
130 set(this->getCellId(latticeR), material);
131}

◆ set() [2/3]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::set ( LatticeR< D > latticeR,
int material )

Write access to a material number.

Definition at line 122 of file blockGeometry.hh.

123{
124 set(this->getCellId(latticeR), material);
125}

◆ set() [3/3]

template<typename T , unsigned D>
void olb::BlockGeometry< T, D >::set ( std::size_t iCell,
int material )

Definition at line 134 of file blockGeometry.hh.

135{
136 resetStatistics();
137 _data[0][iCell] = material;
138}

Member Data Documentation

◆ platform

template<typename T , unsigned D>
Platform olb::BlockGeometry< T, D >::platform = Platform::CPU_SISD
staticconstexpr

Definition at line 72 of file blockGeometry.h.


The documentation for this class was generated from the following files: