marian::ForwardKolmogorowEquation Class Reference

Class implements Forward Kolmogorow Equation. More...

#include <forwardKolmogorovEq.hpp>

Public Member Functions

 ForwardKolmogorowEquation (ConvectionDiffusion process)
 constructor
 
std::vector< double > solve (SmartPointer< FDScheme > scheme, std::vector< double > init, std::vector< SmartPointer< BoundaryCondition > > bcs, std::vector< double > spatial_grid, std::vector< double > time_grid)
 Solves forward equation. More...
 
std::vector< double > solveAndSave (SmartPointer< FDScheme > scheme, std::vector< double > init, std::vector< SmartPointer< BoundaryCondition > > bcs, std::vector< double > spatial_grid, std::vector< double > time_grid, std::string file_name)
 Solves equation and save it to CSV file. More...
 
TridiagonalOperator getOperator (const std::vector< double > &sgrid)
 Constructs the discretized linear operator for Forward Kolmogorow Equation in form of Tridiagonal operator. More...
 

Private Attributes

ConvectionDiffusion process_
 Stochastic process.
 

Detailed Description

Forward Kolmogorow Equation arise in the theory of continuous-time continuous-state Markov processes. Let's assume that the physical system state x(t) evolves according to the stochastic differential equation

\[ dx(t)=\mu dt+\sigma dW(t)\]

then probability distribution p(t,x) of x is governed by the Kolmogorov forward equation

\[\frac{d p(t,x)}{dt} = \Big(\frac{1}{2}\sigma^2 \frac{\partial^2 }{\partial x^2} - \mu \frac{\partial }{\partial x}\Big) p(t,x) \]

More information see [9] [11]

This class is used to construct the PDE basing on diffusion process and solve it using finite difference method.

Examples:
FokkerPlanckEqExample.cpp.

Member Function Documentation

TridiagonalOperator marian::ForwardKolmogorowEquation::getOperator ( const std::vector< double > &  spatial_grid)

The operator is given as:

\[\hat{L} = \frac{1}{2}\sigma^2 \frac{\partial^2 }{\partial x^2} - \mu \frac{\partial^2 }{\partial x} \]

std::vector< double > marian::ForwardKolmogorowEquation::solve ( SmartPointer< FDScheme scheme,
std::vector< double >  init,
std::vector< SmartPointer< BoundaryCondition > >  bcs,
std::vector< double >  spatial_grid,
std::vector< double >  time_grid 
)
Parameters
schemeDifferential scheme
initInitial value
bcsBoundary conditions
spatial_gridSpatial grid used to discretize the system
time_gridTime grid used to discretize the system
Returns
Solution in form of std::vector
std::vector< double > marian::ForwardKolmogorowEquation::solveAndSave ( SmartPointer< FDScheme scheme,
std::vector< double >  init,
std::vector< SmartPointer< BoundaryCondition > >  bcs,
std::vector< double >  spatial_grid,
std::vector< double >  time_grid,
std::string  file_name 
)
Parameters
schemeDifferential scheme
initInitial value
bcsBoundary conditions
spatial_gridSpatial grid used to discretize the system
time_gridTime grid used to discretize the system
file_nameCSV file name
Returns
Solution in form of std::vector

The documentation for this class was generated from the following files:
  • C:/Unix/home/OEM/fdm/src/diffusion/forwardKolmogorovEq.hpp
  • C:/Unix/home/OEM/fdm/src/diffusion/forwardKolmogorovEq.cpp