QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TrBDF2Scheme< TrapezoidalScheme > Class Template Reference

#include <trbdf2scheme.hpp>

+ Collaboration diagram for TrBDF2Scheme< TrapezoidalScheme >:

Public Types

enum  SolverType { BiCGstab , GMRES }
 
typedef OperatorTraits< FdmLinearOptraits
 
typedef traits::operator_type operator_type
 
typedef traits::array_type array_type
 
typedef traits::bc_set bc_set
 
typedef traits::condition_type condition_type
 

Public Member Functions

 TrBDF2Scheme (Real alpha, ext::shared_ptr< FdmLinearOpComposite > map, const ext::shared_ptr< TrapezoidalScheme > &trapezoidalScheme, const bc_set &bcSet=bc_set(), Real relTol=1e-8, SolverType solverType=BiCGstab)
 
void step (array_type &a, Time t)
 
void setStep (Time dt)
 
Size numberOfIterations () const
 

Protected Member Functions

Array apply (const Array &r) const
 

Protected Attributes

Time dt_
 
Real beta_
 
ext::shared_ptr< Sizeiterations_
 
const Real alpha_
 
const ext::shared_ptr< FdmLinearOpCompositemap_
 
const ext::shared_ptr< TrapezoidalScheme > & trapezoidalScheme_
 
const BoundaryConditionSchemeHelper bcSet_
 
const Real relTol_
 
const SolverType solverType_
 

Detailed Description

template<class TrapezoidalScheme>
class QuantLib::TrBDF2Scheme< TrapezoidalScheme >

Definition at line 39 of file trbdf2scheme.hpp.

Member Typedef Documentation

◆ traits

Definition at line 44 of file trbdf2scheme.hpp.

◆ operator_type

Definition at line 45 of file trbdf2scheme.hpp.

◆ array_type

Definition at line 46 of file trbdf2scheme.hpp.

◆ bc_set

Definition at line 47 of file trbdf2scheme.hpp.

◆ condition_type

Definition at line 48 of file trbdf2scheme.hpp.

Member Enumeration Documentation

◆ SolverType

enum SolverType
Enumerator
BiCGstab 
GMRES 

Definition at line 41 of file trbdf2scheme.hpp.

Constructor & Destructor Documentation

◆ TrBDF2Scheme()

TrBDF2Scheme ( Real  alpha,
ext::shared_ptr< FdmLinearOpComposite map,
const ext::shared_ptr< TrapezoidalScheme > &  trapezoidalScheme,
const bc_set bcSet = bc_set(),
Real  relTol = 1e-8,
SolverType  solverType = BiCGstab 
)

Definition at line 78 of file trbdf2scheme.hpp.

Member Function Documentation

◆ step()

void step ( array_type a,
Time  t 
)

Definition at line 106 of file trbdf2scheme.hpp.

+ Here is the call graph for this function:

◆ setStep()

void setStep ( Time  dt)

Definition at line 90 of file trbdf2scheme.hpp.

◆ numberOfIterations()

Size numberOfIterations

Definition at line 96 of file trbdf2scheme.hpp.

◆ apply()

Array apply ( const Array r) const
protected

Definition at line 101 of file trbdf2scheme.hpp.

Member Data Documentation

◆ dt_

Time dt_
protected

Definition at line 65 of file trbdf2scheme.hpp.

◆ beta_

Real beta_
protected

Definition at line 66 of file trbdf2scheme.hpp.

◆ iterations_

ext::shared_ptr<Size> iterations_
protected

Definition at line 67 of file trbdf2scheme.hpp.

◆ alpha_

const Real alpha_
protected

Definition at line 69 of file trbdf2scheme.hpp.

◆ map_

const ext::shared_ptr<FdmLinearOpComposite> map_
protected

Definition at line 70 of file trbdf2scheme.hpp.

◆ trapezoidalScheme_

const ext::shared_ptr<TrapezoidalScheme>& trapezoidalScheme_
protected

Definition at line 71 of file trbdf2scheme.hpp.

◆ bcSet_

const BoundaryConditionSchemeHelper bcSet_
protected

Definition at line 72 of file trbdf2scheme.hpp.

◆ relTol_

const Real relTol_
protected

Definition at line 73 of file trbdf2scheme.hpp.

◆ solverType_

const SolverType solverType_
protected

Definition at line 74 of file trbdf2scheme.hpp.