QuantLib: NeumannBC Class Reference

A free/open-source library for quantitative finance Reference manual - version 1.6

- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
NeumannBC Class Reference
Finite-differences framework

Neumann boundary condition (i.e., constant derivative) More...

`#include <ql/methods/finitedifferences/boundarycondition.hpp>`

Inheritance diagram for NeumannBC:
[legend]

## Public Member Functions
| NeumannBC (Real value, Side side)
void | applyBeforeApplying (TridiagonalOperator &) const
void | applyAfterApplying (Array &) const
void | applyBeforeSolving (TridiagonalOperator &, Array &rhs) const
void | applyAfterSolving (Array &) const
void | setTime (Time)

## Additional Inherited Members
Public Types inherited from BoundaryCondition< TridiagonalOperator >
enum | Side
typedef TridiagonalOperator | operator_type
typedef TridiagonalOperator::array_type | array_type

## Detailed Description

Neumann boundary condition (i.e., constant derivative)

Warning:
  The value passed must not be the value of the derivative. Instead, it must be comprehensive of the grid step between the first two points–i.e., it must be the difference between f[0] and f[1].

## Member Function Documentation

void applyBeforeApplying | ( | TridiagonalOperator & |  | ) | const
| virtual

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< TridiagonalOperator >.

void applyAfterApplying | ( | Array & |  | ) | const
| virtual

This method modifies an array \( u \) so that it satisfies the given condition.

Implements BoundaryCondition< TridiagonalOperator >.

void applyBeforeSolving | ( | TridiagonalOperator & | ,
|  | Array & | rhs
| ) |  | const
| virtual

This method modifies an operator \( L \) before the linear system \( Lu' = u \) is solved so that \( u' \) will satisfy the given condition.

Implements BoundaryCondition< TridiagonalOperator >.

void applyAfterSolving | ( | Array & |  | ) | const
| virtual

This method modifies an array \( u \) so that it satisfies the given condition.

Implements BoundaryCondition< TridiagonalOperator >.

void setTime | ( | Time | t | ) |
| virtual

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

Implements BoundaryCondition< TridiagonalOperator >.