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

#include <fdmdiscountdirichletboundary.hpp>

+ Inheritance diagram for FdmDiscountDirichletBoundary:
+ Collaboration diagram for FdmDiscountDirichletBoundary:

Public Types

typedef FdmLinearOp operator_type
 
typedef FdmLinearOp::array_type array_type
 
typedef BoundaryCondition< FdmLinearOp >::Side Side
 
- Public Types inherited from BoundaryCondition< FdmLinearOp >
enum  Side
 
typedef FdmLinearOp operator_type
 
typedef Operator::array_type array_type
 

Public Member Functions

 FdmDiscountDirichletBoundary (const ext::shared_ptr< FdmMesher > &mesher, const ext::shared_ptr< YieldTermStructure > &rTS, Time maturityTime, Real valueOnBoundary, Size direction, Side side)
 
void setTime (Time) override
 
void applyBeforeApplying (operator_type &) const override
 
void applyBeforeSolving (operator_type &, array_type &) const override
 
void applyAfterApplying (array_type &) const override
 
void applyAfterSolving (array_type &) const override
 
- Public Member Functions inherited from BoundaryCondition< FdmLinearOp >
virtual ~BoundaryCondition ()=default
 
virtual void applyBeforeApplying (operator_type &) const=0
 
virtual void applyAfterApplying (array_type &) const=0
 
virtual void applyBeforeSolving (operator_type &, array_type &rhs) const=0
 
virtual void applyAfterSolving (array_type &) const=0
 
virtual void setTime (Time t)=0
 

Private Attributes

const ext::shared_ptr< FdmTimeDepDirichletBoundarybc_
 

Detailed Description

Definition at line 34 of file fdmdiscountdirichletboundary.hpp.

Member Typedef Documentation

◆ operator_type

Definition at line 37 of file fdmdiscountdirichletboundary.hpp.

◆ array_type

Definition at line 38 of file fdmdiscountdirichletboundary.hpp.

◆ Side

Definition at line 39 of file fdmdiscountdirichletboundary.hpp.

Constructor & Destructor Documentation

◆ FdmDiscountDirichletBoundary()

FdmDiscountDirichletBoundary ( const ext::shared_ptr< FdmMesher > &  mesher,
const ext::shared_ptr< YieldTermStructure > &  rTS,
Time  maturityTime,
Real  valueOnBoundary,
Size  direction,
Side  side 
)

Definition at line 49 of file fdmdiscountdirichletboundary.cpp.

Member Function Documentation

◆ setTime()

void setTime ( Time  t)
overridevirtual

This method sets the current time for time-dependent boundary conditions.

Implements BoundaryCondition< FdmLinearOp >.

Definition at line 63 of file fdmdiscountdirichletboundary.cpp.

◆ applyBeforeApplying()

void applyBeforeApplying ( operator_type ) const
overridevirtual

This method modifies an operator \( L \) before it is applied to an array \( u \) so that \( v = Lu \) will satisfy the given condition.

Implements BoundaryCondition< FdmLinearOp >.

Definition at line 66 of file fdmdiscountdirichletboundary.cpp.

◆ applyBeforeSolving()

void applyBeforeSolving ( operator_type op,
array_type r 
) const
override

Definition at line 70 of file fdmdiscountdirichletboundary.cpp.

◆ applyAfterApplying()

void applyAfterApplying ( array_type r) const
override

Definition at line 74 of file fdmdiscountdirichletboundary.cpp.

◆ applyAfterSolving()

void applyAfterSolving ( array_type r) const
override

Definition at line 77 of file fdmdiscountdirichletboundary.cpp.

Member Data Documentation

◆ bc_

const ext::shared_ptr<FdmTimeDepDirichletBoundary> bc_
private

Definition at line 55 of file fdmdiscountdirichletboundary.hpp.