Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

SmoluchowskiCalc Class Reference

#include <operator.hpp>

Inheritance diagram for SmoluchowskiCalc:

Inheritance graph
[legend]
Collaboration diagram for SmoluchowskiCalc:

Collaboration graph
[legend]
List of all members.

Detailed Description

Abstract class of all calculation needed by smoluchowski operators applying.

Class defined functions to calculate results of applying operators Lk needed by smolychowski operators by trapezoidal rule. There are:

Definition at line 26 of file operator.hpp.

Public Member Functions

 SmoluchowskiCalc (const Skeleton &K_skel, const Skeleton &Psi_skel, double _H, unsigned _N)
 Initialize smoluchowski calculation.
virtual ~SmoluchowskiCalc ()
 The destructor.
unsigned GetN () const
 Get the size of uniform grid.
double GetH () const
 Get the endpoint of segment [0;H].
virtual void calc_L1 (const double *f, const double *g, double *res)=0
 Calculate int_{0}^{x}{K(x-y,y)f(x-y)g(y)dy}.
virtual void calc_L2 (const double *f, const double *g, double *res)=0
 Calculate int_{x}^{H}{K(y-x,x)f(y-x)g(y)dy}.
virtual void fix_f_arg (const double *f)=0
 Fix argument f in calc_L1 and calc_L2; see calc_L1_fix_f, calc_L2_fix_f.
virtual void calc_L1_fix_f (const double *g, double *res)=0
 Calculate calc_L1 with previously saved argument f.
virtual void calc_L2_fix_f (const double *g, double *res)=0
 Calculate calc_L2 with previously saved argument f.
virtual void calc_L3 (const double *g, double *res) const =0
 Calculate int_{0}^{x}{Psi(x,y)g(y)dy}.
virtual void calc_L4 (const double *g, double *res) const =0
 Calculate int_{x}^{H}{Psi(y,x)g(y)dy}.
virtual void calc_L5 (const double *g, double *res) const =0
 Calculate int_{0}^{H}{K(x,y)g(y)dy}.

Protected Attributes

const SkeletonK
const SkeletonPsi
unsigned N
double H
double h


Constructor & Destructor Documentation

SmoluchowskiCalc::SmoluchowskiCalc const Skeleton K_skel,
const Skeleton Psi_skel,
double  _H,
unsigned  _N
 

Initialize smoluchowski calculation.

Let K, Psi be a coagulation and fragmentation kernel defined on [0;H]x[0;H]. Let NxN be a size of uniform grid on [0;H]x[0;H].

Parameters:
K_skel skeleton approximation of matrix of K values on grid
Psi_skel skeleton approximation of matrix of Psi values on grid
_H endpoint of segment [0;H]
_N size of uniform grid on [0;H]

Definition at line 4 of file operator.cpp.

virtual SmoluchowskiCalc::~SmoluchowskiCalc  )  [virtual]
 

The destructor.

Definition at line 45 of file operator.hpp.


Member Function Documentation

unsigned SmoluchowskiCalc::GetN  )  const
 

Get the size of uniform grid.

Definition at line 47 of file operator.hpp.

References N.

Referenced by SmoluchowskiSolver::adjoint_problem(), SmoluchowskiSolver::forward_problem(), SmoluchowskiSolver::GetN(), SmoluchowskiSolver::inverse_problem(), SmoluchowskiOperator::SmoluchowskiOperator(), and SmoluchowskiSolver::SmoluchowskiSolver().

double SmoluchowskiCalc::GetH  )  const
 

Get the endpoint of segment [0;H].

Definition at line 49 of file operator.hpp.

References H.

Referenced by SmoluchowskiOperator::SmoluchowskiOperator().

virtual void SmoluchowskiCalc::calc_L1 const double *  f,
const double *  g,
double *  res
[pure virtual]
 

Calculate int_{0}^{x}{K(x-y,y)f(x-y)g(y)dy}.

Find res(x) = int_{0}^{x}{K(x-y,y)f(x-y)g(y)dy} by trapezoidal rule on uniform grid.

Parameters:
f double vector values of function f of size N+1
g double vector values of function g of size N+1
res double vector values of function res of size N+1

Implemented in SmoluchowskiCalcDirect, and SmoluchowskiCalcFast.

Referenced by SmoluchowskiNonLinearOperator::Apply().

virtual void SmoluchowskiCalc::calc_L2 const double *  f,
const double *  g,
double *  res
[pure virtual]
 

Calculate int_{x}^{H}{K(y-x,x)f(y-x)g(y)dy}.

Find res(x) = int_{x}^{H}{K(y-x,x)f(y-x)g(y)dy} by trapezoidal rule on uniform grid.

Parameters:
f double vector values of function f of size N+1
g double vector values of function g of size N+1
res double vector values of function res of size N+1

Implemented in SmoluchowskiCalcDirect, and SmoluchowskiCalcFast.

virtual void SmoluchowskiCalc::fix_f_arg const double *  f  )  [pure virtual]
 

Fix argument f in calc_L1 and calc_L2; see calc_L1_fix_f, calc_L2_fix_f.

Implemented in SmoluchowskiCalcDirect, and SmoluchowskiCalcFast.

Referenced by SmoluchowskiLinearOperator::SmoluchowskiLinearOperator().

virtual void SmoluchowskiCalc::calc_L1_fix_f const double *  g,
double *  res
[pure virtual]
 

Calculate calc_L1 with previously saved argument f.

Find res(x) = int_{0}^{x}{K(x-y,y)f(x-y)g(y)dy} by trapezoidal rule on uniform grid with f saved by fix_f_arg.

Parameters:
g double vector values of function g of size N+1
res double vector values of function res of size N+1

Implemented in SmoluchowskiCalcDirect, and SmoluchowskiCalcFast.

Referenced by SmoluchowskiLinearOperator::Apply().

virtual void SmoluchowskiCalc::calc_L2_fix_f const double *  g,
double *  res
[pure virtual]
 

Calculate calc_L2 with previously saved argument f.

Find res(x) = int_{x}^{H}{K(y-x,x)f(y-x)g(y)dy} by trapezoidal rule on uniform grid with f saved by fix_f_arg.

Parameters:
g double vector values of function g of size N+1
res double vector values of function res of size N+1

Implemented in SmoluchowskiCalcDirect, and SmoluchowskiCalcFast.

Referenced by SmoluchowskiLinearOperator::ApplyAdjoint().

virtual void SmoluchowskiCalc::calc_L3 const double *  g,
double *  res
const [pure virtual]
 

Calculate int_{0}^{x}{Psi(x,y)g(y)dy}.

Find res(x) = int_{0}^{x}{Psi(x,y)g(y)dy} by trapezoidal rule on uniform grid.

Parameters:
g double vector values of function g of size N+1
res double vector values of function res of size N+1

Implemented in SmoluchowskiCalcDirect, and SmoluchowskiCalcFast.

Referenced by SmoluchowskiNonLinearOperator::Apply(), and SmoluchowskiLinearOperator::ApplyAdjoint().

virtual void SmoluchowskiCalc::calc_L4 const double *  g,
double *  res
const [pure virtual]
 

Calculate int_{x}^{H}{Psi(y,x)g(y)dy}.

Find res(x) = int_{x}^{H}{Psi(y,x)g(y)dy} by trapezoidal rule on uniform grid.

Parameters:
g double vector values of function g of size N+1
res double vector values of function res of size N+1

Implemented in SmoluchowskiCalcDirect, and SmoluchowskiCalcFast.

Referenced by SmoluchowskiLinearOperator::Apply(), and SmoluchowskiNonLinearOperator::Apply().

virtual void SmoluchowskiCalc::calc_L5 const double *  g,
double *  res
const [pure virtual]
 

Calculate int_{0}^{H}{K(x,y)g(y)dy}.

Find res(x) = int_{0}^{H}{K(x,y)g(y)dy} by trapezoidal rule on uniform grid.

Parameters:
g double vector values of function g of size N+1
res double vector values of function res of size N+1

Implemented in SmoluchowskiCalcDirect, and SmoluchowskiCalcFast.

Referenced by SmoluchowskiLinearOperator::Apply(), SmoluchowskiNonLinearOperator::Apply(), and SmoluchowskiLinearOperator::ApplyAdjoint().


Member Data Documentation

const Skeleton& SmoluchowskiCalc::K [protected]
 

Definition at line 28 of file operator.hpp.

const Skeleton& SmoluchowskiCalc::Psi [protected]
 

Definition at line 29 of file operator.hpp.

unsigned SmoluchowskiCalc::N [protected]
 

Definition at line 30 of file operator.hpp.

Referenced by GetN().

double SmoluchowskiCalc::H [protected]
 

Definition at line 31 of file operator.hpp.

Referenced by GetH().

double SmoluchowskiCalc::h [protected]
 

Definition at line 31 of file operator.hpp.


The documentation for this class was generated from the following files:
Generated on Sun May 25 01:58:11 2025 for SmoluchowskiSolver by Doxygen