QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
FdmDirichletBoundary Class Reference

#include <ql/methods/finitedifferences/utilities/fdmdirichletboundary.hpp>

+ Inheritance diagram for FdmDirichletBoundary:
+ Collaboration diagram for FdmDirichletBoundary:

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

 FdmDirichletBoundary (const ext::shared_ptr< FdmMesher > &mesher, Real valueOnBoundary, Size direction, Side side)
 
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
 
void setTime (Time) override
 
Real applyAfterApplying (Real x, Real value) const
 
- 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 Side side_
 
const Real valueOnBoundary_
 
const std::vector< Sizeindices_
 
Real xExtreme_
 

Detailed Description

Definition at line 38 of file fdmdirichletboundary.hpp.

Member Typedef Documentation

◆ operator_type

Definition at line 41 of file fdmdirichletboundary.hpp.

◆ array_type

Definition at line 42 of file fdmdirichletboundary.hpp.

◆ Side

Definition at line 43 of file fdmdirichletboundary.hpp.

Constructor & Destructor Documentation

◆ FdmDirichletBoundary()

FdmDirichletBoundary ( const ext::shared_ptr< FdmMesher > &  mesher,
Real  valueOnBoundary,
Size  direction,
FdmDirichletBoundary::Side  side 
)

Definition at line 30 of file fdmdirichletboundary.cpp.

Member Function Documentation

◆ 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 51 of file fdmdirichletboundary.cpp.

◆ applyBeforeSolving()

void applyBeforeSolving ( operator_type ,
array_type  
) const
override

Definition at line 60 of file fdmdirichletboundary.cpp.

◆ applyAfterApplying() [1/2]

void applyAfterApplying ( array_type x) const
override

Definition at line 54 of file fdmdirichletboundary.cpp.

+ Here is the caller graph for this function:

◆ applyAfterSolving()

void applyAfterSolving ( array_type rhs) const
override

Definition at line 64 of file fdmdirichletboundary.cpp.

+ Here is the call graph for this function:

◆ setTime()

void setTime ( Time  t)
overridevirtual

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

Implements BoundaryCondition< FdmLinearOp >.

Definition at line 52 of file fdmdirichletboundary.hpp.

◆ applyAfterApplying() [2/2]

Real applyAfterApplying ( Real  x,
Real  value 
) const

Definition at line 68 of file fdmdirichletboundary.cpp.

Member Data Documentation

◆ side_

const Side side_
private

Definition at line 57 of file fdmdirichletboundary.hpp.

◆ valueOnBoundary_

const Real valueOnBoundary_
private

Definition at line 58 of file fdmdirichletboundary.hpp.

◆ indices_

const std::vector<Size> indices_
private

Definition at line 59 of file fdmdirichletboundary.hpp.

◆ xExtreme_

Real xExtreme_
private

Definition at line 61 of file fdmdirichletboundary.hpp.