walberla::pe_coupling::discrete_particle_methods::BodyVelocityTimeDerivativeEvaluator Class Reference

Detailed Description

Evaluates the time derivative of the body velocity.

Using the operator()(), an internal map is filled with pairs of the body ID and its current velocity, after clearing the old map. Calling get(..), the body's former velocity is fetched from the map and used to calculate a simple approximation of the body velocity time derivative (du/dt = ( u_new - u_old ) / deltaT )

Whether or not a body gets treated by the evaluator depends on the return value of 'dpmBodySelectorFct'.

#include <BodyVelocityTimeDerivativeEvaluator.h>

Public Member Functions

 BodyVelocityTimeDerivativeEvaluator (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &bodyStorageID, const real_t &deltaT=real_t(1), const std::function< bool(pe::BodyID)> &dpmBodySelectorFct=selectRegularBodies)
 
void operator() ()
 
void resetDeltaT (const real_t &deltaT)
 
void get (Vector3< real_t > &particleVelocityTimeDerivative, const Vector3< real_t > currentParticleVelocity, const walberla::id_t &bodySystemID)
 

Private Attributes

shared_ptr< StructuredBlockStorageblockStorage_
 
const BlockDataID bodyStorageID_
 
std::map< walberla::id_t, Vector3< real_t > > bodyVelocityMap_
 
real_t deltaTinv_
 
std::function< bool(pe::BodyID)> dpmBodySelectorFct_
 

Constructor & Destructor Documentation

◆ BodyVelocityTimeDerivativeEvaluator()

walberla::pe_coupling::discrete_particle_methods::BodyVelocityTimeDerivativeEvaluator::BodyVelocityTimeDerivativeEvaluator ( const shared_ptr< StructuredBlockStorage > &  blockStorage,
const BlockDataID bodyStorageID,
const real_t deltaT = real_t(1),
const std::function< bool(pe::BodyID)> &  dpmBodySelectorFct = selectRegularBodies 
)
inline

Member Function Documentation

◆ get()

void walberla::pe_coupling::discrete_particle_methods::BodyVelocityTimeDerivativeEvaluator::get ( Vector3< real_t > &  particleVelocityTimeDerivative,
const Vector3< real_t currentParticleVelocity,
const walberla::id_t bodySystemID 
)
inline

◆ operator()()

void walberla::pe_coupling::discrete_particle_methods::BodyVelocityTimeDerivativeEvaluator::operator() ( )
inline

◆ resetDeltaT()

void walberla::pe_coupling::discrete_particle_methods::BodyVelocityTimeDerivativeEvaluator::resetDeltaT ( const real_t deltaT)
inline

Member Data Documentation

◆ blockStorage_

shared_ptr<StructuredBlockStorage> walberla::pe_coupling::discrete_particle_methods::BodyVelocityTimeDerivativeEvaluator::blockStorage_
private

◆ bodyStorageID_

const BlockDataID walberla::pe_coupling::discrete_particle_methods::BodyVelocityTimeDerivativeEvaluator::bodyStorageID_
private

◆ bodyVelocityMap_

std::map< walberla::id_t, Vector3< real_t > > walberla::pe_coupling::discrete_particle_methods::BodyVelocityTimeDerivativeEvaluator::bodyVelocityMap_
private

◆ deltaTinv_

real_t walberla::pe_coupling::discrete_particle_methods::BodyVelocityTimeDerivativeEvaluator::deltaTinv_
private

◆ dpmBodySelectorFct_

std::function<bool(pe::BodyID)> walberla::pe_coupling::discrete_particle_methods::BodyVelocityTimeDerivativeEvaluator::dpmBodySelectorFct_
private

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