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

#include <fdm1dimsolver.hpp>

+ Inheritance diagram for Fdm1DimSolver:
+ Collaboration diagram for Fdm1DimSolver:

Public Member Functions

 Fdm1DimSolver (const FdmSolverDesc &solverDesc, const FdmSchemeDesc &schemeDesc, ext::shared_ptr< FdmLinearOpComposite > op)
 
Real interpolateAt (Real x) const
 
Real thetaAt (Real x) const
 
Real derivativeX (Real x) const
 
Real derivativeXX (Real x) const
 
- Public Member Functions inherited from LazyObject
 LazyObject ()
 
 ~LazyObject () override=default
 
void update () override
 
bool isCalculated () const
 
void forwardFirstNotificationOnly ()
 
void alwaysForwardNotifications ()
 
void recalculate ()
 
void freeze ()
 
void unfreeze ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 

Protected Member Functions

void performCalculations () const override
 
- Protected Member Functions inherited from LazyObject
virtual void calculate () const
 

Private Attributes

const FdmSolverDesc solverDesc_
 
const FdmSchemeDesc schemeDesc_
 
const ext::shared_ptr< FdmLinearOpCompositeop_
 
const ext::shared_ptr< FdmSnapshotConditionthetaCondition_
 
const ext::shared_ptr< FdmStepConditionCompositeconditions_
 
std::vector< Realx_
 
std::vector< RealinitialValues_
 
Array resultValues_
 
ext::shared_ptr< CubicInterpolationinterpolation_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Attributes inherited from LazyObject
bool calculated_ = false
 
bool frozen_ = false
 
bool alwaysForward_
 

Detailed Description

Definition at line 38 of file fdm1dimsolver.hpp.

Constructor & Destructor Documentation

◆ Fdm1DimSolver()

Fdm1DimSolver ( const FdmSolverDesc solverDesc,
const FdmSchemeDesc schemeDesc,
ext::shared_ptr< FdmLinearOpComposite op 
)

Definition at line 32 of file fdm1dimsolver.cpp.

Member Function Documentation

◆ interpolateAt()

Real interpolateAt ( Real  x) const

Definition at line 67 of file fdm1dimsolver.cpp.

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

◆ thetaAt()

Real thetaAt ( Real  x) const

Definition at line 72 of file fdm1dimsolver.cpp.

+ Here is the call graph for this function:

◆ derivativeX()

Real derivativeX ( Real  x) const

Definition at line 88 of file fdm1dimsolver.cpp.

+ Here is the call graph for this function:

◆ derivativeXX()

Real derivativeXX ( Real  x) const

Definition at line 93 of file fdm1dimsolver.cpp.

+ Here is the call graph for this function:

◆ performCalculations()

void performCalculations ( ) const
overrideprotectedvirtual

This method must implement any calculations which must be (re)done in order to calculate the desired results.

Implements LazyObject.

Definition at line 54 of file fdm1dimsolver.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ solverDesc_

const FdmSolverDesc solverDesc_
private

Definition at line 54 of file fdm1dimsolver.hpp.

◆ schemeDesc_

const FdmSchemeDesc schemeDesc_
private

Definition at line 55 of file fdm1dimsolver.hpp.

◆ op_

const ext::shared_ptr<FdmLinearOpComposite> op_
private

Definition at line 56 of file fdm1dimsolver.hpp.

◆ thetaCondition_

const ext::shared_ptr<FdmSnapshotCondition> thetaCondition_
private

Definition at line 58 of file fdm1dimsolver.hpp.

◆ conditions_

const ext::shared_ptr<FdmStepConditionComposite> conditions_
private

Definition at line 59 of file fdm1dimsolver.hpp.

◆ x_

std::vector<Real> x_
private

Definition at line 61 of file fdm1dimsolver.hpp.

◆ initialValues_

std::vector<Real> initialValues_
private

Definition at line 61 of file fdm1dimsolver.hpp.

◆ resultValues_

Array resultValues_
mutableprivate

Definition at line 62 of file fdm1dimsolver.hpp.

◆ interpolation_

ext::shared_ptr<CubicInterpolation> interpolation_
mutableprivate

Definition at line 63 of file fdm1dimsolver.hpp.