Langevin C++ source

Loading...
Searching...
No Matches
langevin_prepare.cpp
Go to the documentation of this file.
1
5
6#include "langevin_types.hpp"
7#include "langevin_coefficients.hpp"
8#include "langevin_base.hpp"
9
11 void BaseLangevin::prepare(const Coefficients& coefficients)
12{
13 // Set "linear" coefficients
14 linear_coefficient = coefficients.linear;
15 noise_coefficient = coefficients.noise;
16 const auto explcdt = exp(-linear_coefficient*dt);
17 lambda = (
18 (2*linear_coefficient*explcdt)
19 /
20 ((1-explcdt)*(noise_coefficient*noise_coefficient))
21 );
22 lambda_on_explcdt = lambda / explcdt;
23 // Set "nonlinear" coefficients in function supplied by child class
24 set_nonlinear_coefficients(coefficients);
25}
BaseLangevin::lambda
double lambda
Dornic method stochastic-step variable.
Definition langevin_base.hpp:44
BaseLangevin::dt
double dt
Time step, i.e, epoch-to-epoch Δt.
Definition langevin_base.hpp:26
BaseLangevin::lambda_on_explcdt
double lambda_on_explcdt
Dornic method stochastic-step variable.
Definition langevin_base.hpp:46
BaseLangevin::noise_coefficient
double noise_coefficient
Dornic method coefficient.
Definition langevin_base.hpp:42
BaseLangevin::linear_coefficient
double linear_coefficient
Dornic method coefficient.
Definition langevin_base.hpp:40
BaseLangevin::set_nonlinear_coefficients
virtual void set_nonlinear_coefficients(const Coefficients &coefficients)
Method to set nonlinear coefficients for deterministic integration step: to be defined by application...
Definition langevin_base.hpp:87
BaseLangevin::prepare
void prepare(const Coefficients &coefficients)
Set initial condition of Langevin density field grid.
Definition langevin_prepare.cpp:11
langevin_base.hpp
Base class for Langevin equation integrator.
langevin_coefficients.hpp
Container for nonlinear Langevin equation coefficients.
langevin_types.hpp
Type definitions for BaseLangevin integrator.
Coefficients
Container for nonlinear Langevin equation coefficients.
Definition langevin_coefficients.hpp:24