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 | Friends | List of all members
ImplicitEulerScheme Class Reference

#include <impliciteulerscheme.hpp>

+ Collaboration diagram for ImplicitEulerScheme:

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

 ImplicitEulerScheme (ext::shared_ptr< FdmLinearOpComposite > map, 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

void step (array_type &a, Time t, Real theta)
 
Array apply (const Array &r, Real theta) const
 

Protected Attributes

Time dt_
 
ext::shared_ptr< Sizeiterations_
 
const Real relTol_
 
const ext::shared_ptr< FdmLinearOpCompositemap_
 
const BoundaryConditionSchemeHelper bcSet_
 
const SolverType solverType_
 

Friends

class CrankNicolsonScheme
 

Detailed Description

Definition at line 35 of file impliciteulerscheme.hpp.

Member Typedef Documentation

◆ traits

Definition at line 40 of file impliciteulerscheme.hpp.

◆ operator_type

Definition at line 41 of file impliciteulerscheme.hpp.

◆ array_type

Definition at line 42 of file impliciteulerscheme.hpp.

◆ bc_set

Definition at line 43 of file impliciteulerscheme.hpp.

◆ condition_type

Definition at line 44 of file impliciteulerscheme.hpp.

Member Enumeration Documentation

◆ SolverType

enum SolverType
Enumerator
BiCGstab 
GMRES 

Definition at line 37 of file impliciteulerscheme.hpp.

Constructor & Destructor Documentation

◆ ImplicitEulerScheme()

ImplicitEulerScheme ( ext::shared_ptr< FdmLinearOpComposite map,
const bc_set bcSet = bc_set(),
Real  relTol = 1e-8,
SolverType  solverType = BiCGstab 
)
explicit

Definition at line 30 of file impliciteulerscheme.cpp.

Member Function Documentation

◆ step() [1/2]

void step ( array_type a,
Time  t 
)

Definition at line 41 of file impliciteulerscheme.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStep()

void setStep ( Time  dt)

Definition at line 82 of file impliciteulerscheme.cpp.

◆ numberOfIterations()

Size numberOfIterations ( ) const

Definition at line 86 of file impliciteulerscheme.cpp.

◆ step() [2/2]

void step ( array_type a,
Time  t,
Real  theta 
)
protected

Definition at line 45 of file impliciteulerscheme.cpp.

+ Here is the call graph for this function:

◆ apply()

Array apply ( const Array r,
Real  theta 
) const
protected

Definition at line 37 of file impliciteulerscheme.cpp.

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ CrankNicolsonScheme

friend class CrankNicolsonScheme
friend

Definition at line 57 of file impliciteulerscheme.hpp.

Member Data Documentation

◆ dt_

Time dt_
protected

Definition at line 62 of file impliciteulerscheme.hpp.

◆ iterations_

ext::shared_ptr<Size> iterations_
protected

Definition at line 63 of file impliciteulerscheme.hpp.

◆ relTol_

const Real relTol_
protected

Definition at line 65 of file impliciteulerscheme.hpp.

◆ map_

const ext::shared_ptr<FdmLinearOpComposite> map_
protected

Definition at line 66 of file impliciteulerscheme.hpp.

◆ bcSet_

const BoundaryConditionSchemeHelper bcSet_
protected

Definition at line 67 of file impliciteulerscheme.hpp.

◆ solverType_

const SolverType solverType_
protected

Definition at line 68 of file impliciteulerscheme.hpp.