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

SourceFunctionFixTime Class Reference

#include <solver.hpp>

Inheritance diagram for SourceFunctionFixTime:

Inheritance graph
[legend]
Collaboration diagram for SourceFunctionFixTime:

Collaboration graph
[legend]
List of all members.

Detailed Description

Source function with divided variables with fix time dependence.

Class describe source function v(x,t) with divided variables with fix time dependence that is v(x,t) = vx(x) * vt(t) where vt is known.

Definition at line 90 of file solver.hpp.

Public Member Functions

 SourceFunctionFixTime (unsigned _N, double _H, unsigned _M, double _T, unsigned _m1, unsigned _m2, double *_vt, double *_vx)
 Initialize source function v.
 ~SourceFunctionFixTime ()
 The destructor.
double operator() (unsigned xi, unsigned ti) const
 Return concentration particle of size xi * h at moment ti * tau.
double SquareNorm () const
 Get square L2 norm of source function.
void Update (double *q, double alpha, double dzeta)
 Update source function in gradient method.
unsigned GetN () const
 Get size of uniform grid of particles.
unsigned GetM () const
 Get size of uniform grid of time.
unsigned Get_m1 () const
 Get left bound of time support of source function.
unsigned Get_m2 () const
 Get right bound of time support of source function.
double Get_tau () const
 Get step of uniform grid of time.

Protected Attributes

unsigned N
unsigned M
unsigned m1
unsigned m2
double h
double tau


Constructor & Destructor Documentation

SourceFunctionFixTime::SourceFunctionFixTime unsigned  _N,
double  _H,
unsigned  _M,
double  _T,
unsigned  _m1,
unsigned  _m2,
double *  _vt,
double *  _vx
 

Initialize source function v.

Initialize values of source function v(x,t) = vx(x) * vt(t) on [0;H]x[0;T] with uniform grid size NxM which such that that vt(t)=0 if t not in [m1 * tau; m2 * tau] with start value vx=_vx with fixed vt.

Parameters:
_N size of uniform grid on [0;H]
_H endpoint of particle segment
_M size of uniform grid on [0;T]
_T endpoint of time segment
_m1 left bound of time support of source function
_m2 right bound of time support of source function
_vt double vector of size M+1 of values _vt
_vx double vector of size N+1 of values _vx

Definition at line 74 of file solver.cpp.

SourceFunctionFixTime::~SourceFunctionFixTime  ) 
 

The destructor.

Definition at line 103 of file solver.cpp.


Member Function Documentation

double SourceFunctionFixTime::operator() unsigned  xi,
unsigned  ti
const [virtual]
 

Return concentration particle of size xi * h at moment ti * tau.

Implements SourceFunction.

Definition at line 110 of file solver.cpp.

double SourceFunctionFixTime::SquareNorm  )  const [virtual]
 

Get square L2 norm of source function.

Implements SourceFunction.

Definition at line 120 of file solver.cpp.

void SourceFunctionFixTime::Update double *  q,
double  alpha,
double  dzeta
[virtual]
 

Update source function in gradient method.

Update vx. Let t1 = m1 * tau, t2 = m2 * tau, L2_inner(u,v) denote inner product in L2[t1;t2]. Then vx <- vx - dzeta * (alpha * vx + L2_inner(q,vt) / L2_inner(vt,vt)).

Implements SourceFunction.

Definition at line 133 of file solver.cpp.

unsigned SourceFunction::GetN  )  const [inherited]
 

Get size of uniform grid of particles.

Definition at line 47 of file solver.hpp.

References SourceFunction::N.

unsigned SourceFunction::GetM  )  const [inherited]
 

Get size of uniform grid of time.

Definition at line 49 of file solver.hpp.

References SourceFunction::M.

unsigned SourceFunction::Get_m1  )  const [inherited]
 

Get left bound of time support of source function.

Definition at line 51 of file solver.hpp.

References SourceFunction::m1.

unsigned SourceFunction::Get_m2  )  const [inherited]
 

Get right bound of time support of source function.

Definition at line 53 of file solver.hpp.

References SourceFunction::m2.

double SourceFunction::Get_tau  )  const [inherited]
 

Get step of uniform grid of time.

Definition at line 55 of file solver.hpp.

References SourceFunction::tau.


Member Data Documentation

unsigned SourceFunction::N [protected, inherited]
 

Definition at line 28 of file solver.hpp.

Referenced by SourceFunction::GetN().

unsigned SourceFunction::M [protected, inherited]
 

Definition at line 28 of file solver.hpp.

Referenced by SourceFunction::GetM().

unsigned SourceFunction::m1 [protected, inherited]
 

Definition at line 29 of file solver.hpp.

Referenced by SourceFunction::Get_m1().

unsigned SourceFunction::m2 [protected, inherited]
 

Definition at line 29 of file solver.hpp.

Referenced by SourceFunction::Get_m2().

double SourceFunction::h [protected, inherited]
 

Definition at line 30 of file solver.hpp.

double SourceFunction::tau [protected, inherited]
 

Definition at line 30 of file solver.hpp.

Referenced by SourceFunction::Get_tau().


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