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

SmoluchowskiCalcFast Class Reference

#include <operator.hpp>

Inheritance diagram for SmoluchowskiCalcFast:

Inheritance graph
[legend]
Collaboration diagram for SmoluchowskiCalcFast:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class of fast calculation needed by smoluchowski operators applying.

Class contained computations of integral operators Lk (see SmoluchowskiCalc class for details) by trapezoidal rule with fast algrorithm of matvec with matrix (or its transpose or their upper/lower triangular part) in skeleton format and fast discrete fourier transform.

Definition at line 148 of file operator.hpp.

Public Member Functions

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

Protected Attributes

const SkeletonK
const SkeletonPsi
unsigned N
double H
double h


Constructor & Destructor Documentation

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

Initialize class of smoluchowski fast 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 179 of file operator.cpp.

References Skeleton::GetRank().

SmoluchowskiCalcFast::~SmoluchowskiCalcFast  ) 
 

The destructor.

Definition at line 194 of file operator.cpp.


Member Function Documentation

void SmoluchowskiCalcFast::calc_L1 const double *  f,
const double *  g,
double *  res
[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

Implements SmoluchowskiCalc.

Definition at line 207 of file operator.cpp.

References Matrix::elem(), Skeleton::GetRank(), Complex::GetRe(), Skeleton::GetU(), Skeleton::GetV(), and FourierTransform::MatvecFast().

void SmoluchowskiCalcFast::calc_L2 const double *  f,
const double *  g,
double *  res
[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

Implements SmoluchowskiCalc.

Definition at line 240 of file operator.cpp.

References Matrix::elem(), Skeleton::GetRank(), Complex::GetRe(), Skeleton::GetU(), Skeleton::GetV(), and FourierTransform::MatvecFast().

void SmoluchowskiCalcFast::fix_f_arg const double *  f  )  [virtual]
 

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

Implements SmoluchowskiCalc.

Definition at line 274 of file operator.cpp.

References Matrix::elem(), Skeleton::GetRank(), Skeleton::GetU(), and FourierTransform::MatvecFast().

void SmoluchowskiCalcFast::calc_L1_fix_f const double *  g,
double *  res
[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

Implements SmoluchowskiCalc.

Definition at line 292 of file operator.cpp.

References Matrix::elem(), Skeleton::GetRank(), Complex::GetRe(), Skeleton::GetV(), and FourierTransform::MatvecFast().

void SmoluchowskiCalcFast::calc_L2_fix_f const double *  g,
double *  res
[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

Implements SmoluchowskiCalc.

Definition at line 323 of file operator.cpp.

References Matrix::elem(), Skeleton::GetRank(), Complex::GetRe(), Skeleton::GetV(), and FourierTransform::MatvecFast().

void SmoluchowskiCalcFast::calc_L3 const double *  g,
double *  res
const [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

Implements SmoluchowskiCalc.

Definition at line 356 of file operator.cpp.

References Matrix::elem(), Skeleton::GetM(), and Skeleton::MatvecLT().

void SmoluchowskiCalcFast::calc_L4 const double *  g,
double *  res
const [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

Implements SmoluchowskiCalc.

Definition at line 366 of file operator.cpp.

References Matrix::elem(), Skeleton::GetM(), and Skeleton::MatvecUT().

void SmoluchowskiCalcFast::calc_L5 const double *  g,
double *  res
const [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

Implements SmoluchowskiCalc.

Definition at line 376 of file operator.cpp.

References Matrix::elem(), Skeleton::GetM(), and Skeleton::MatvecF().

unsigned SmoluchowskiCalc::GetN  )  const [inherited]
 

Get the size of uniform grid.

Definition at line 47 of file operator.hpp.

References SmoluchowskiCalc::N.

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

double SmoluchowskiCalc::GetH  )  const [inherited]
 

Get the endpoint of segment [0;H].

Definition at line 49 of file operator.hpp.

References SmoluchowskiCalc::H.

Referenced by SmoluchowskiOperator::SmoluchowskiOperator().


Member Data Documentation

const Skeleton& SmoluchowskiCalc::K [protected, inherited]
 

Definition at line 28 of file operator.hpp.

const Skeleton& SmoluchowskiCalc::Psi [protected, inherited]
 

Definition at line 29 of file operator.hpp.

unsigned SmoluchowskiCalc::N [protected, inherited]
 

Definition at line 30 of file operator.hpp.

Referenced by SmoluchowskiCalc::GetN().

double SmoluchowskiCalc::H [protected, inherited]
 

Definition at line 31 of file operator.hpp.

Referenced by SmoluchowskiCalc::GetH().

double SmoluchowskiCalc::h [protected, inherited]
 

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