walberla::field::DistributorHandling< Distributor_T, FlagField_T > Class Template Reference

Detailed Description

template<typename Distributor_T, typename FlagField_T>
class walberla::field::DistributorHandling< Distributor_T, FlagField_T >

DistributorCreators.

Distributor_T: A distributor that has a constructor ( const weak_ptr<StructuredBlockStorage> & blockStorage, const IBlock & block, const BaseField_T & baseField, const FlagField_T & flagField, const flag_t & evaluationMask ) and distribution functions: template< typename ForwardIterator_T > inline void distribute( const Vector3<real_t> & position, ForwardIterator_T distributeValueBegin ) template< typename ForwardIterator_T > inline void distribute( const real_t & x, const real_t & y, const real_t & z, ForwardIterator_T distributeValueBegin )

See NearestNeighborDistributor for an example implementation.

A distributor is aware of the flag field (FlagField_T) and distributes values only to cells flagged by a given mask.

Distributors are used to spread a given value to the corresponding destination field. E.g. if a certain force has to be applied at some specific position onto the fluid, a distributor can be used to do so by distributing this force value (and conservation fo this force value is ensured) onto the force field.

#include <DistributorCreators.h>

+ Inheritance diagram for walberla::field::DistributorHandling< Distributor_T, FlagField_T >:

Public Member Functions

 DistributorHandling (const weak_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &distributionDestinationFieldID, const ConstBlockDataID &flagFieldID, const Set< FlagUID > &cellsToEvaluate)
 
Distributor_T * initialize (IBlock *const block) override
 must be thread-safe ! More...
 
- Public Member Functions inherited from walberla::blockforest::AlwaysInitializeBlockDataHandling< Distributor_T >
 ~AlwaysInitializeBlockDataHandling () override=default
 
void serialize (IBlock *const, const BlockDataID &, mpi::SendBuffer &) override
 must be thread-safe ! More...
 
void serializeCoarseToFine (Block *const, const BlockDataID &, mpi::SendBuffer &, const uint_t) override
 must be thread-safe ! More...
 
void serializeFineToCoarse (Block *const, const BlockDataID &, mpi::SendBuffer &) override
 must be thread-safe ! More...
 
Distributor_T * deserialize (IBlock *const block) override
 must be thread-safe ! More...
 
void deserialize (IBlock *const, const BlockDataID &, mpi::RecvBuffer &) override
 must be thread-safe ! More...
 
Distributor_T * deserializeCoarseToFine (Block *const block) override
 must be thread-safe ! More...
 
void deserializeCoarseToFine (Block *const, const BlockDataID &, mpi::RecvBuffer &) override
 must be thread-safe ! More...
 
Distributor_T * deserializeFineToCoarse (Block *const block) override
 must be thread-safe ! More...
 
void deserializeFineToCoarse (Block *const, const BlockDataID &, mpi::RecvBuffer &, const uint_t) override
 must be thread-safe ! More...
 
- Public Member Functions inherited from walberla::blockforest::BlockDataHandling< Distributor_T >
 ~BlockDataHandling () override=default
 

Private Attributes

weak_ptr< StructuredBlockStorageblockStorage_
 
BlockDataID distributionDestinationFieldID_
 
ConstBlockDataID flagFieldID_
 
Set< FlagUID > cellsToEvaluate_
 

Additional Inherited Members

- Public Types inherited from walberla::domain_decomposition::BlockDataHandling< Distributor_T >
using value_type = Distributor_T
 

Constructor & Destructor Documentation

◆ DistributorHandling()

template<typename Distributor_T , typename FlagField_T >
walberla::field::DistributorHandling< Distributor_T, FlagField_T >::DistributorHandling ( const weak_ptr< StructuredBlockStorage > &  blockStorage,
const BlockDataID distributionDestinationFieldID,
const ConstBlockDataID flagFieldID,
const Set< FlagUID > &  cellsToEvaluate 
)
inline

Member Function Documentation

◆ initialize()

template<typename Distributor_T , typename FlagField_T >
Distributor_T* walberla::field::DistributorHandling< Distributor_T, FlagField_T >::initialize ( IBlock *const  block)
inlineoverridevirtual

Member Data Documentation

◆ blockStorage_

template<typename Distributor_T , typename FlagField_T >
weak_ptr<StructuredBlockStorage> walberla::field::DistributorHandling< Distributor_T, FlagField_T >::blockStorage_
private

◆ cellsToEvaluate_

template<typename Distributor_T , typename FlagField_T >
Set< FlagUID > walberla::field::DistributorHandling< Distributor_T, FlagField_T >::cellsToEvaluate_
private

◆ distributionDestinationFieldID_

template<typename Distributor_T , typename FlagField_T >
BlockDataID walberla::field::DistributorHandling< Distributor_T, FlagField_T >::distributionDestinationFieldID_
private

◆ flagFieldID_

template<typename Distributor_T , typename FlagField_T >
ConstBlockDataID walberla::field::DistributorHandling< Distributor_T, FlagField_T >::flagFieldID_
private

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