34template<
typename T,
typename DESCRIPTOR>
38 defineUBouzidi<T,DESCRIPTOR>(sLattice, superGeometry.
getMaterialIndicator(material), u, bulkMaterials);
42template<
typename T,
typename DESCRIPTOR>
46 defineUBouzidi<T,DESCRIPTOR>(sLattice, std::forward<
decltype(boundaryIndicator)>(boundaryIndicator),
47 boundaryIndicator->getSuperGeometry().getMaterialIndicator(std::move(bulkMaterials)),
51template<
typename T,
typename DESCRIPTOR>
56 for (
int iCloc = 0; iCloc < sLattice.
getLoadBalancer().size(); ++iCloc) {
57 defineUBouzidi<T,DESCRIPTOR>(sLattice.
getBlock(iCloc),
58 boundaryIndicator->getBlockIndicatorF(iCloc),
59 bulkIndicator->getBlockIndicatorF(iCloc),u);
66template<
typename T,
typename DESCRIPTOR>
70 if (indicator(iX,iY,iZ)) {
71 for (
int q = 1; q < DESCRIPTOR::q ; ++q) {
73 const int iXn = iX + descriptors::c<DESCRIPTOR>(q,0);
74 const int iYn = iY + descriptors::c<DESCRIPTOR>(q,1);
75 const int iZn = iZ + descriptors::c<DESCRIPTOR>(q,2);
76 if (_block.
isInside({iXn,iYn,iZn}) && bulkIndicator(iXn,iYn,iZn)) {
77 T intersection[3] = { };
78 const int opp = descriptors::opposite<DESCRIPTOR>(q);
79 if (getBoundaryIntersection<T,DESCRIPTOR>(_block, iX, iY, iZ, opp, intersection)) {
82 defineUBouzidi<T,DESCRIPTOR>(_block, iX, iY, iZ, opp, vel);
92template<
typename T,
typename DESCRIPTOR>
99 clout <<
"defineUBouzidi(" << iX <<
", " << iY <<
", " << iZ <<
" )" << std::endl;
104template<
typename T,
typename DESCRIPTOR>
110template<
typename T,
typename DESCRIPTOR>
113 bool _output =
false;
115 _block.
getDynamics(iX, iY, iZ)->setBoundaryIntersection(iPop, distance);
117 clout <<
"setBoundaryIntersection(" << iX <<
", " << iY <<
", " << iZ <<
" )" << std::endl;
AnalyticalF are applications from DD to XD, where X is set by the constructor.
Base block indicator functor.
Platform-abstracted block lattice for external access and inter-block interaction.
virtual Dynamics< T, DESCRIPTOR > * getDynamics(DynamicsPromise< T, DESCRIPTOR > &&)=0
Return pointer to dynamics yielded by promise.
void forSpatialLocations(F f) const
bool isInside(LatticeR< D > latticeR) const
Return whether location is valid.
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.
Base indicator functor (discrete)
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.
Dynamics for offLattice boundary conditions OffDynamics are basically NoLatticeDynamics with the addi...
bool getBoundaryIntersection(BlockLattice< T, DESCRIPTOR > &block, int iX, int iY, int iPop, T point[DESCRIPTOR::d])
void defineUBouzidi(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 2 > &superGeometry, int material, AnalyticalF2D< T, T > &u, std::vector< int > bulkMaterials=std::vector< int >(1, 1))
void setBoundaryIntersection(BlockLattice< T, DESCRIPTOR > &block, int iX, int iY, int iPop, T distance)
Top level namespace for all of OpenLB.