25#ifndef SET_SIGNED_DISTANCE_BOUNDARY_2D_HH
26#define SET_SIGNED_DISTANCE_BOUNDARY_2D_HH
32template<
typename T,
typename DESCRIPTOR>
39template<
typename T,
typename DESCRIPTOR>
43 for (
int iCloc = 0; iCloc < sLattice.
getLoadBalancer().size(); ++iCloc) {
48 communicator.template requestField<descriptors::PSI>();
51 communicator.requestOverlap(_overlap, neighborIndicator);
52 communicator.exchangeRequests();
56template<
typename T,
typename DESCRIPTOR>
59 using namespace boundaryhelper;
62 std::vector<int> discreteNormal(3, 0);
63 blockGeometryStructure.forSpatialLocations([&](
auto iX,
auto iY) {
64 if (blockGeometryStructure.getNeighborhoodRadius({iX, iY}) >= margin
65 && indicator(iX, iY)) {
67 T discreteNormalSum=0;
68 for (
int iD=0; iD<DESCRIPTOR::d; iD++) {
69 discreteNormalSum +=
abs(discreteNormal[iD+1]);
71 if (discreteNormalSum == 0) {
75 promisePostProcessorForNormal<T,DESCRIPTOR,normGradPsiBoundary2D>(
const BlockGeometryStatistics< T, D > & getStatistics() const
Read only access to the associated block statistic.
Base block indicator functor (discrete)
BlockGeometry< T, 2 > & getBlockGeometry()
Get underlying block geometry structure.
Smart pointer for managing the various ways of passing functors around.
Representation of a statistic for a parallel 2D geometry.
std::unique_ptr< SuperIndicatorF< T, D > > getMaterialIndicator(std::vector< int > &&materials)
Returns a material indicator using the given vector of materials.
Super class maintaining block lattices for a cuboid decomposition.
SuperCommunicator< T, SuperLattice > & getCommunicator(STAGE stage=STAGE())
Return communicator for given communication stage.
BlockLattice< T, DESCRIPTOR > & getBlock(int locC)
Return BlockLattice with local index locC.
LoadBalancer< T > & getLoadBalancer()
Read and write access to the load balancer.
Top level namespace for all of OpenLB.
void setSignedDistanceBoundary(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 2 > &superGeometry, int material)
Initialising the setSignedDistanceBoundary function on the superLattice domain.
std::conditional_t< D==2, SuperIndicatorBoundaryNeighbor2D< T >, SuperIndicatorBoundaryNeighbor3D< T > > SuperIndicatorBoundaryNeighbor
std::enable_if_t< std::is_arithmetic< T >::type::value, T > abs(T x) any_platform
Communication after solving for another field.