25#ifndef LATTICE_PHYS_BOUNDARY_DISTANCE_3D_HH
26#define LATTICE_PHYS_BOUNDARY_DISTANCE_3D_HH
44template <
typename T,
typename DESCRIPTOR>
49 _superGeometry(superGeometry)
51 this->
getName() =
"physBoundaryDistance";
52 int maxC = this->
_sLattice.getLoadBalancer().size();
54 for (
int iC = 0; iC < maxC; iC++) {
59template<
typename T,
typename DESCRIPTOR>
62 :
BlockLatticeF3D<T, DESCRIPTOR>(blockLattice, 1), _blockGeometry(blockGeometry)
64 this->
getName() =
"physBoundaryDistance";
68 _tmpIndicator = createIndicatorSphere3D<T>(*child);
69 _indicatorList.push_back(_tmpIndicator);
73template<
typename T,
typename DESCRIPTOR>
76 T minDistance = std::numeric_limits<T>::util::max();
78 _blockGeometry.getPhysR(origin, input);
79 for (
auto &indicator : _indicatorList) {
80 bool inside[1] = {
false};
81 (*indicator)(inside, origin);
87 indicator->distance(distance, origin);
89 if ( distance < minDistance ) {
90 minDistance = distance;
95 output[0] = minDistance;
Representation of a block geometry.
represents all functors that operate on a DESCRIPTOR in general, e.g. getVelocity(),...
functor returns pointwise minimum distance to boundary given by indicators
BlockLatticePhysBoundaryDistance3D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 3 > &blockGeometry, XMLreader const &xmlReader)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
Platform-abstracted block lattice for external access and inter-block interaction.
std::string & getName()
read and write access to name
std::vector< std::unique_ptr< BlockF3D< T > > > _blockF
Super functors may consist of several BlockF3D<W> derived functors.
Representation of a statistic for a parallel 2D geometry.
represents all functors that operate on a SuperLattice in general, e.g. getVelocity(),...
SuperLattice< T, DESCRIPTOR > & _sLattice
SuperLatticePhysBoundaryDistance3D(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 3 > &superGeometry, XMLreader const &xmlReader)
Super class maintaining block lattices for a cuboid decomposition.
Wrapper functions that simplify the use of MPI.
Top level namespace for all of OpenLB.
Representation of a parallel 2D geometry – header file.