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< StructuredBlockStorage > | blockStorage_ |
const BlockDataID | bodyStorageID_ |
std::map< walberla::id_t, Vector3< real_t > > | bodyVelocityMap_ |
real_t | deltaTinv_ |
std::function< bool(pe::BodyID)> | dpmBodySelectorFct_ |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |