39template<
unsigned D,
typename T,
typename U>
42 int overlap,
int size)
47 for (
int iC=0; iC < load.size(); ++iC) {
53 _communicator = std::make_unique<SuperCommunicator<T,SuperData>>(*this);
54 _communicator->template requestField<typename BlockData<D,T,U>::DUMMY_FIELD>();
60template<
unsigned D,
typename T,
typename U>
62 :
SuperData(rhs.getSuperStructure().getCuboidGeometry(),
63 rhs.getSuperStructure().getLoadBalancer(),
64 rhs.getSuperStructure().getOverlap(),
67 auto& load = this->getLoadBalancer();
70 U output[rhs.getTargetDim()];
72 for (
int iC=0; iC < load.size(); ++iC) {
73 auto& block = getBlock(iC);
74 input[0] = load.glob(iC);
76 for (
unsigned iD=0; iD < D; ++iD) {
77 input[1+iD] = latticeR[iD];
80 for (
unsigned iD=0; iD < rhs.getTargetDim(); ++iD) {
81 block.get(latticeR,iD) = output[iD];
87template<
unsigned D,
typename T,
typename U>
93template<
unsigned D,
typename T,
typename U>
99template<
unsigned D,
typename T,
typename U>
100template <
typename BLOCK>
106template<
unsigned D,
typename T,
typename U>
107template <
typename BLOCK>
113template<
unsigned D,
typename T,
typename U>
117 _communicator->communicate();
121template<
unsigned D,
typename T,
typename U>
127template<
unsigned D,
typename T,
typename U>
Base class for all LoadBalancer.
const BlockData< D, T, U > & getBlock(int iC) const
SuperData(CuboidGeometry< T, D > &cuboidGeometry, LoadBalancer< T > &loadBalancer, int overlap=2, int size=1)
void communicate() override
Communicate overlaps.
int getDataTypeSize() const
Read only access to the data type dim of the data of the super structure.
int getDataSize() const
Read only access to the dim of the data of the super structure.
std::unique_ptr< SuperCommunicator< T, SuperData > > _communicator
Inter-block communicator.
std::vector< std::unique_ptr< BlockData< D, T, U > > > _block
Vector of BlockData.
LoadBalancer< T > & getLoadBalancer()
Read and write access to the load balancer.
The description of a vector of 2D cuboid – header file.
The description of a vector of 3D cuboid – header file.
Top level namespace for all of OpenLB.
std::conditional_t< D==2, SuperF2D< T, U >, SuperF3D< T, U > > SuperF
std::conditional_t< D==2, CuboidGeometry2D< T >, CuboidGeometry3D< T > > CuboidGeometry
Dynamics for a generic 2D super data – header file.