walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder > Class Template Referenceabstract

Detailed Description

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:

  1. It must define a type "Stencil" that refers to a stencil located in module "stencil"
  2. It must define a type "CommunicationStencil" that is used to determine which neighbors are involved during communication
  3. 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'.
  4. 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.
  5. 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'.
  6. 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.
  7. 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).

#include <LatticeModelBase.h>

+ Inheritance diagram for walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >:

Public Types

typedef CollisionModel_T CollisionModel
 
typedef ForceModel_T ForceModel
 

Public Member Functions

 LatticeModelBase (const CollisionModel_T &cm, const ForceModel_T &fm)
 
virtual ~LatticeModelBase ()
 
virtual void pack (mpi::SendBuffer &buffer) const
 
virtual void unpack (mpi::RecvBuffer &buffer)
 
void configure (IBlock &block, StructuredBlockStorage &sbs)
 
const CollisionModel_T & collisionModel () const
 
CollisionModel_T & collisionModel ()
 
const ForceModel_T & forceModel () const
 
ForceModel_T & forceModel ()
 

Static Public Attributes

static const bool compressible = Compressible
 
static const int equilibriumAccuracyOrder = EquilibriumAccuracyOrder
 

Protected Member Functions

virtual void config (IBlock &block, StructuredBlockStorage &sbs)=0
 

Protected Attributes

CollisionModel_T collisionModel_
 
ForceModel_T forceModel_
 

Member Typedef Documentation

template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
typedef CollisionModel_T walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::CollisionModel
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
typedef ForceModel_T walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::ForceModel

Constructor & Destructor Documentation

template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::LatticeModelBase ( const CollisionModel_T &  cm,
const ForceModel_T &  fm 
)
inline
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
virtual walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::~LatticeModelBase ( )
inlinevirtual

Member Function Documentation

template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
const CollisionModel_T& walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::collisionModel ( ) const
inline
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
CollisionModel_T& walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::collisionModel ( )
inline
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
virtual void walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::config ( IBlock &  block,
StructuredBlockStorage &  sbs 
)
protectedpure virtual
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
void walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::configure ( IBlock &  block,
StructuredBlockStorage &  sbs 
)
inline
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
const ForceModel_T& walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::forceModel ( ) const
inline
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
ForceModel_T& walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::forceModel ( )
inline
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
virtual void walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::pack ( mpi::SendBuffer buffer) const
inlinevirtual
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
virtual void walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::unpack ( mpi::RecvBuffer buffer)
inlinevirtual

Member Data Documentation

template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
CollisionModel_T walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::collisionModel_
protected
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
const bool walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::compressible = Compressible
static
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
const int walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::equilibriumAccuracyOrder = EquilibriumAccuracyOrder
static
template<typename CollisionModel_T, bool Compressible, typename ForceModel_T, int EquilibriumAccuracyOrder = 2>
ForceModel_T walberla::lbm::LatticeModelBase< CollisionModel_T, Compressible, ForceModel_T, EquilibriumAccuracyOrder >::forceModel_
protected

The documentation for this class was generated from the following file: