26#ifndef SET_ADVECTION_DIFFUSION_TEMPERATURE_BOUNDARY_2D_HH
27#define SET_ADVECTION_DIFFUSION_TEMPERATURE_BOUNDARY_2D_HH
34template<
typename T,
typename DESCRIPTOR,
typename MixinDynamics>
37 setAdvectionDiffusionTemperatureBoundary<T,DESCRIPTOR,MixinDynamics>(sLattice, superGeometry.
getMaterialIndicator(material));
41template<
typename T,
typename DESCRIPTOR,
typename MixinDynamics>
44 OstreamManager clout(std::cout,
"setAdvectionDiffusionTemperatureBoundary");
45 for (
int iCloc = 0; iCloc < sLattice.
getLoadBalancer().size(); ++iCloc) {
46 setAdvectionDiffusionTemperatureBoundary<T,DESCRIPTOR,MixinDynamics>(sLattice.
getBlock(iCloc),
47 indicator->getBlockIndicatorF(iCloc));
52template<
typename T,
typename DESCRIPTOR,
typename MixinDynamics>
55 using namespace boundaryhelper;
58 std::vector<int> discreteNormal(3,0);
59 blockGeometryStructure.forSpatialLocations([&](
auto iX,
auto iY) {
60 if (blockGeometryStructure.getNeighborhoodRadius({iX, iY}) >= margin
61 && indicator(iX, iY)) {
62 discreteNormal = indicator.
getBlockGeometry().getStatistics().getType(iX,iY);
64 if (discreteNormal[0] == 0) {
65 block.
defineDynamics({iX,iY}, DirectionOrientationMixinDynamicsForPlainMomenta<T,DESCRIPTOR,
69 else if (discreteNormal[0] == 1) {
70 block.
defineDynamics({iX,iY}, NormalMixinDynamicsForPlainMomenta<T,DESCRIPTOR,
75 throw std::runtime_error(
"No valid discrete normal found. This BC is not suited for curved walls.");
Base block indicator functor (discrete)
BlockGeometry< T, 2 > & getBlockGeometry()
Get underlying block geometry structure.
Platform-abstracted block lattice for external access and inter-block interaction.
void defineDynamics(LatticeR< DESCRIPTOR::d > latticeR, DynamicsPromise< T, DESCRIPTOR > &&promise)
Assign promised DYNAMICS to latticeR.
Smart pointer for managing the various ways of passing functors around.
class for marking output with some text
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.
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 setAdvectionDiffusionTemperatureBoundary(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 2 > &superGeometry, int material)
Initialising the AdvectionDiffusionTemperatureBoundary on the superLattice domain This is an advectio...