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 Attributes | List of all members
CrankNicolsonScheme Class Reference

#include <cranknicolsonscheme.hpp>

+ Collaboration diagram for CrankNicolsonScheme:

Public Types

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

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

Protected Attributes

Real dt_
 
const Real theta_
 
const ext::shared_ptr< ExplicitEulerSchemeexplicit_
 
const ext::shared_ptr< ImplicitEulerSchemeimplicit_
 

Detailed Description

Definition at line 37 of file cranknicolsonscheme.hpp.

Member Typedef Documentation

◆ traits

Definition at line 40 of file cranknicolsonscheme.hpp.

◆ operator_type

Definition at line 41 of file cranknicolsonscheme.hpp.

◆ array_type

Definition at line 42 of file cranknicolsonscheme.hpp.

◆ bc_set

Definition at line 43 of file cranknicolsonscheme.hpp.

◆ condition_type

Definition at line 44 of file cranknicolsonscheme.hpp.

Constructor & Destructor Documentation

◆ CrankNicolsonScheme()

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

Definition at line 24 of file cranknicolsonscheme.cpp.

Member Function Documentation

◆ step()

void step ( array_type a,
Time  t 
)

Definition at line 37 of file cranknicolsonscheme.cpp.

◆ setStep()

void setStep ( Time  dt)

Definition at line 47 of file cranknicolsonscheme.cpp.

◆ numberOfIterations()

Size numberOfIterations ( ) const

Definition at line 53 of file cranknicolsonscheme.cpp.

Member Data Documentation

◆ dt_

Real dt_
protected

Definition at line 60 of file cranknicolsonscheme.hpp.

◆ theta_

const Real theta_
protected

Definition at line 61 of file cranknicolsonscheme.hpp.

◆ explicit_

const ext::shared_ptr<ExplicitEulerScheme> explicit_
protected

Definition at line 62 of file cranknicolsonscheme.hpp.

◆ implicit_

const ext::shared_ptr<ImplicitEulerScheme> implicit_
protected

Definition at line 63 of file cranknicolsonscheme.hpp.