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
Fdm2DimSolver Class Reference

#include <fdm2dimsolver.hpp>

+ Inheritance diagram for Fdm2DimSolver:
+ Collaboration diagram for Fdm2DimSolver:

Public Member Functions

 Fdm2DimSolver (const FdmSolverDesc &solverDesc, const FdmSchemeDesc &schemeDesc, ext::shared_ptr< FdmLinearOpComposite > op)
 
Real interpolateAt (Real x, Real y) const
 
Real thetaAt (Real x, Real y) const
 
Real derivativeX (Real x, Real y) const
 
Real derivativeY (Real x, Real y) const
 
Real derivativeXX (Real x, Real y) const
 
Real derivativeYY (Real x, Real y) const
 
Real derivativeXY (Real x, Real y) 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< Realy_
 
std::vector< RealinitialValues_
 
Matrix resultValues_
 
ext::shared_ptr< BicubicSplineinterpolation_
 

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 fdm2dimsolver.hpp.

Constructor & Destructor Documentation

◆ Fdm2DimSolver()

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

Definition at line 32 of file fdm2dimsolver.cpp.

Member Function Documentation

◆ interpolateAt()

Real interpolateAt ( Real  x,
Real  y 
) const

Definition at line 77 of file fdm2dimsolver.cpp.

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

◆ thetaAt()

Real thetaAt ( Real  x,
Real  y 
) const

Definition at line 82 of file fdm2dimsolver.cpp.

+ Here is the call graph for this function:

◆ derivativeX()

Real derivativeX ( Real  x,
Real  y 
) const

Definition at line 98 of file fdm2dimsolver.cpp.

+ Here is the call graph for this function:

◆ derivativeY()

Real derivativeY ( Real  x,
Real  y 
) const

Definition at line 103 of file fdm2dimsolver.cpp.

+ Here is the call graph for this function:

◆ derivativeXX()

Real derivativeXX ( Real  x,
Real  y 
) const

Definition at line 108 of file fdm2dimsolver.cpp.

+ Here is the call graph for this function:

◆ derivativeYY()

Real derivativeYY ( Real  x,
Real  y 
) const

Definition at line 113 of file fdm2dimsolver.cpp.

+ Here is the call graph for this function:

◆ derivativeXY()

Real derivativeXY ( Real  x,
Real  y 
) const

Definition at line 118 of file fdm2dimsolver.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 63 of file fdm2dimsolver.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ solverDesc_

const FdmSolverDesc solverDesc_
private

Definition at line 57 of file fdm2dimsolver.hpp.

◆ schemeDesc_

const FdmSchemeDesc schemeDesc_
private

Definition at line 58 of file fdm2dimsolver.hpp.

◆ op_

const ext::shared_ptr<FdmLinearOpComposite> op_
private

Definition at line 59 of file fdm2dimsolver.hpp.

◆ thetaCondition_

const ext::shared_ptr<FdmSnapshotCondition> thetaCondition_
private

Definition at line 61 of file fdm2dimsolver.hpp.

◆ conditions_

const ext::shared_ptr<FdmStepConditionComposite> conditions_
private

Definition at line 62 of file fdm2dimsolver.hpp.

◆ x_

std::vector<Real> x_
private

Definition at line 64 of file fdm2dimsolver.hpp.

◆ y_

std::vector<Real> y_
private

Definition at line 64 of file fdm2dimsolver.hpp.

◆ initialValues_

std::vector<Real> initialValues_
private

Definition at line 64 of file fdm2dimsolver.hpp.

◆ resultValues_

Matrix resultValues_
mutableprivate

Definition at line 65 of file fdm2dimsolver.hpp.

◆ interpolation_

ext::shared_ptr<BicubicSpline> interpolation_
mutableprivate

Definition at line 66 of file fdm2dimsolver.hpp.