quadgrid 0.1
simple cartesian quad grid with particles for c++/octave
Loading...
Searching...
No Matches
stepper Class Reference

Functor class for moving particles. More...

Public Member Functions

 stepper (std::vector< double > &x_, std::vector< double > &y_, std::vector< double > &vx_, std::vector< double > &vy_, double dt_, double D_, std::function< double(void)> &noise_)
void operator() (int n)
 call operator applying motion to the n-th particle.

Private Attributes

std::vector< double > & x
std::vector< double > & y
std::vector< double > & vx
std::vector< double > & vy
double dt
double D
std::function< double(void)> normal

Detailed Description

Functor class for moving particles.

This class captures references to particle positions and velocities and overloads the call operator to allow use in STL algorithms in particular the std::for_each method

Constructor & Destructor Documentation

◆ stepper()

stepper::stepper ( std::vector< double > & x_,
std::vector< double > & y_,
std::vector< double > & vx_,
std::vector< double > & vy_,
double dt_,
double D_,
std::function< double(void)> & noise_ )
inline

Member Function Documentation

◆ operator()()

void stepper::operator() ( int n)
inline

call operator applying motion to the n-th particle.

overload of the call operator to apply motion to the n-th particle use velocity field for deterministic motion component plus gaussian noise to represent diffusion/Brownian motion

Member Data Documentation

◆ D

double stepper::D
private

◆ dt

double stepper::dt
private

◆ normal

std::function<double (void)> stepper::normal
private

◆ vx

std::vector<double>& stepper::vx
private

◆ vy

std::vector<double>& stepper::vy
private

◆ x

std::vector<double>& stepper::x
private

◆ y

std::vector<double>& stepper::y
private

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