27#ifndef BLOCK_LATTICE_STRUCTURE_3D_H
28#define BLOCK_LATTICE_STRUCTURE_3D_H
32#include "blockData3D.h"
33#include "blockStructure3D.h"
36#include "spatiallyExtendedObject3D.h"
37#include "geometry/blockGeometryStructure3D.h"
45template<
typename T,
typename DESCRIPTOR>
struct Dynamics;
46template<
typename T,
typename DESCRIPTOR>
struct WriteCellFunctional;
47template<
typename T>
class BlockIndicatorF3D;
48template<
typename T>
class IndicatorSphere3D;
54template<
typename T,
typename DESCRIPTOR>
73 virtual void defineRho(BlockGeometryStructure3D<T>& blockGeometry,
int material,
84 virtual void defineU(BlockGeometryStructure3D<T>& blockGeometry,
int material,
96 virtual void defineRhoU(BlockGeometryStructure3D<T>& blockGeometry,
int material,
124 template <
typename FIELD>
128 template <
typename FIELD>
129 void defineField(BlockGeometryStructure3D<T>& blockGeometry,
int material,
135 template <
typename FIELD>
149 virtual void iniEquilibrium(BlockGeometryStructure3D<T>& blockGeometry,
int material,
161 virtual void iniRegularized(BlockGeometryStructure3D<T>& blockGeometry,
int material,
169 virtual T&
getPop(std::size_t iCell,
unsigned iPop) =0;
170 virtual T&
getPop(
int iX,
int iY,
int iZ,
unsigned iPop) =0;
177 virtual void defineDynamics(
int x0_,
int x1_,
int y0_,
int y1_,
int z0_,
int z1_,
183 virtual void defineDynamics(BlockGeometryStructure3D<T>& blockGeometry,
int material,
188 virtual void collide(
int x0_,
int x1_,
int y0_,
int y1_,
int z0_,
int z1_) =0;
192 int z1_, T offset) =0;
197 virtual void postProcess(
int x0_,
int x1_,
int y0_,
int y1_,
int z0_,
int z1_) =0;
201 std::vector<SpatiallyExtendedObject3D*> partners ) =0;
202 virtual void executeCoupling(
int x0_,
int x1_,
int y0_,
int y1_,
int z0_,
int z1_) =0;
219 T invDeltaX, std::vector<int>& start, std::vector<int>& end);
221template <
typename T,
typename DESCRIPTOR>
224 BlockLattice3D<T,DESCRIPTOR>& extendedBlockLattice);
226template <
typename T,
typename DESCRIPTOR>
229 BlockLattice3D<T,DESCRIPTOR>& extendedBlockLattice,
Definition of a LB cell – header file.
AnalyticalF are applications from DD to XD, where X is set by the constructor.
represents all functors that operate on a cuboid in general, mother class of BlockLatticeF,...
Base block indicator functor.
BlockLatticeStructure3D is a interface class for defining dynamics on a BlockStructure3D.
virtual void freeSurfaceInitialize()=0
virtual void postProcess(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)=0
virtual void executeCoupling(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)=0
virtual ConstCell< T, DESCRIPTOR > get(int iX, int iY, int iZ) const =0
virtual Cell< T, DESCRIPTOR > get(int iX, int iY, int iZ)=0
virtual Dynamics< T, DESCRIPTOR > * getDynamics(int iX, int iY, int iZ)=0
virtual T & getPop(int iX, int iY, int iZ, unsigned iPop)=0
virtual void addPostProcessor(PostProcessorGenerator3D< T, DESCRIPTOR > const &ppGen)=0
virtual void stripeOffDensityOffset(T offset)=0
void defineField(BlockGeometryStructure3D< T > &blockGeometry, int material, AnalyticalF< 3, T, T > &field)
Define a field on a domain with a particular material number.
virtual void resetPostProcessors()=0
virtual void defineRhoU(BlockIndicatorF3D< T > &indicator, AnalyticalF< 3, T, T > &rho, AnalyticalF< 3, T, T > &u)
Define rho and u on a domain described by an indicator.
virtual void defineU(BlockIndicatorF3D< T > &indicator, AnalyticalF< 3, T, T > &u)
Define u on a domain described by an indicator.
virtual void defineRhoU(BlockGeometryStructure3D< T > &blockGeometry, int material, AnalyticalF< 3, T, T > &rho, AnalyticalF< 3, T, T > &u)
Define rho and u on a domain with a particular material number.
virtual void defineRho(BlockIndicatorF3D< T > &indicator, AnalyticalF< 3, T, T > &rho)
Define rho on a domain described by an indicator.
virtual void defineRho(BlockGeometryStructure3D< T > &blockGeometry, int material, AnalyticalF< 3, T, T > &rho)
Define rho on a domain with a particular material number.
virtual void iniEquilibrium(BlockIndicatorF3D< T > &indicator, AnalyticalF< 3, T, T > &rho, AnalyticalF< 3, T, T > &u)
Initialize by equilibrium on a domain described by an indicator.
virtual void definePopulations(BlockGeometryStructure3D< T > &blockGeometry, int material, AnalyticalF< 3, T, T > &Pop)
Define a population on a domain with a particular material number.
virtual Cell< T, DESCRIPTOR > get(const int latticeR[])=0
virtual void defineDynamics(int iX, int iY, int iZ, Dynamics< T, DESCRIPTOR > *dynamics)=0
Define the dynamics on a lattice site.
virtual void defineDynamics(BlockGeometryStructure3D< T > &blockGeometry, int material, Dynamics< T, DESCRIPTOR > *dynamics)=0
Define the dynamics on a domain with a particular material number.
std::vector< Momenta< T, DESCRIPTOR > * > momentaVector
virtual void iniRegularized(BlockIndicatorF3D< T > &indicator, AnalyticalF< 3, T, T > &rho, AnalyticalF< 3, T, T > &u, AnalyticalF< 3, T, T > &pi)
Initialize by non- and equilibrium on a domain described by an indicator.
std::vector< Dynamics< T, DESCRIPTOR > * > dynamicsVector
virtual void stripeOffDensityOffset(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, T offset)=0
virtual void initialize()=0
virtual void freeSurfacePostProcess(size_t i)=0
~BlockLatticeStructure3D() override
virtual void defineDynamics(BlockIndicatorF3D< T > &indicator, Dynamics< T, DESCRIPTOR > *dynamics)=0
Define the dynamics on a domain described by an indicator.
virtual void defineDynamics(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, Dynamics< T, DESCRIPTOR > *dynamics)=0
Define the dynamics on a 3D sub-box.
virtual void postProcess()=0
virtual void iniEquilibrium(BlockGeometryStructure3D< T > &blockGeometry, int material, AnalyticalF< 3, T, T > &rho, AnalyticalF< 3, T, T > &u)
Initialize by equilibrium on a domain with a particular material number.
BlockLatticeStructure3D(int nx, int ny, int nz)
virtual void executeCoupling()=0
void defineField(BlockIndicatorF3D< T > &indicator, AnalyticalF< 3, T, T > &field)
Define a field on a domain described by an indicator.
virtual T & getPop(std::size_t iCell, unsigned iPop)=0
virtual void freeSurfacePostProcess(size_t i, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)=0
virtual void defineU(BlockGeometryStructure3D< T > &blockGeometry, int material, AnalyticalF< 3, T, T > &u)
Define u on a domain with a particular material number.
virtual void definePopulations(BlockIndicatorF3D< T > &indicator, AnalyticalF< 3, T, T > &Pop)
Define a population on a domain described by an indicator.
virtual void definePopulations(BlockIndicatorF3D< T > &indicator, BlockF3D< T > &Pop)
virtual void addLatticeCoupling(LatticeCouplingGenerator3D< T, DESCRIPTOR > const &lcGen, std::vector< SpatiallyExtendedObject3D * > partners)=0
virtual void collide(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)=0
virtual LatticeStatistics< T > & getStatistics()=0
virtual void definePopulations(BlockGeometryStructure3D< T > &blockGeometry, int material, BlockF3D< T > &Pop)
Define a population on a domain with a particular material number.
void defineField(BlockGeometryStructure3D< T > &blockGeometry, IndicatorF3D< T > &indicatorF, AnalyticalF< 3, T, T > &field)
Define a field on a domain described by an analytical indicator.
virtual void iniRegularized(BlockGeometryStructure3D< T > &blockGeometry, int material, AnalyticalF< 3, T, T > &rho, AnalyticalF< 3, T, T > &u, AnalyticalF< 3, T, T > &pi)
Initialize by equilibrium on a domain with a particular material number.
virtual LatticeStatistics< T > const & getStatistics() const =0
Highest-level interface to Cell data.
Highest-level interface to read-only Cell data.
IndicatorF3D is an application from .
Interface for post-processing steps – header file.
Top level namespace for all of OpenLB.
void setBlockExternalParticleField(BlockGeometryStructure2D< T > &blockGeometry, AnalyticalF< 2, T, T > &velocity, SmoothIndicatorF2D< T, T, true > &sIndicator, BlockLattice2D< T, DESCRIPTOR > &extendedBlockLattice)
bool getRangeBlockGeometrySmoothIndicatorIntersection3D(BlockGeometryStructure3D< T > &blockGeometry, SmoothIndicatorF3D< T, T, true > &sIndicator, T invDeltaX, std::vector< int > &start, std::vector< int > &end)
Interface for post-processing steps – header file.
Interface for per-cell dynamics.