template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
class walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >
Base class that is supposed (but not required) to be used for defining specific lattice models.
The concept each lattice model has to follow (for an actual implementation see for example lbm::D3Q19) is as follows:
- It must define a type "Stencil" that refers to a stencil located in module "stencil"
- It must define a type "CommunicationStencil" that is used to determine which neighbors are involved during communication
- There must be a static array named 'w' of size 'Stencil::Size' that contains the weights for each direction. If you want to retrieve the weight that corresponds to a specific direction 'dir' you first have to map this direction to the appropriate array index by using the underlying stencil: the weight of direction 'dir' is equal to w[ Stencil::idx[dir] ]! In Addition to 'w', there must also be a static array 'wInv' containing the inverse values of 'w'.
- It must define a type "CollisionModel". An object of type "CollisionModel" must be returned when calling the member function 'collisionModel()' - this function also needs to be implemented. Each "CollisionModel" must define a type "tag" which may evaluate to SRT_tag, TRT_tag, or MRT_tag (see "CollisionModel.h"). For an exemplary implementation of such a "CollisionModel" see classes lbm::collision_model::SRT or lbm::collision_model::TRT.
- It must define a type "ForceModel". An object of type "ForceModel" must be returned when calling the member function 'forceModel()' - this function also needs to be implemented. For details on force models see Force Model for the LBM in 'ForceModel.h'.
- There must be a static boolean value named 'compressible' that must be set to false for incompressible lattice models, otherwise it must be set to true.
- There must be a member function "configure( IBlock & block, StructuredBlockStorage & sbs )" that returns nothing and takes a block and a structured block storage as arguments. Everytime a PDF field is assigned to a specific block, the "configure" function is called for the lattice model that is stored within this PDF field (see lbm/field/AddToStorage.h).