#include <ql/FiniteDifferences/mixedscheme.hpp>
Inheritance diagram for MixedScheme:
[legend]List of all members.
Detailed Description
template<class Operator>
class QuantLib::MixedScheme< Operator >
Mixed (explicit/implicit) scheme for finite difference methods.
In this implementation, the passed operator must be derived from either TimeConstantOperator or TimeDependentOperator. Also, it must implement at least the following interface:
typedef ... array_type;
Operator(const Operator&);
Operator& operator=(const Operator&);
Size size();
void setTime(Time t);
array_type applyTo(const array_type&);
array_type solveFor(const array_type&);
static Operator identity(Size size);
Operator operator*(Real, const Operator&);
Operator operator+(const Operator&, const Operator&);
Operator operator+(const Operator&, const Operator&);
- Warning:
- The differential operator must be linear for this evolver to work.
- Todo:
- derive variable theta schemes
- introduce multi time-level schemes.
|
Public Types |
typedef OperatorTraits< Operator > | traits |
typedef traits::operator_type | operator_type |
typedef traits::array_type | array_type |
typedef traits::bc_set | bc_set |
typedef traits::condition_type | condition_type |
Public Member Functions |
| MixedScheme (const operator_type &L, Real theta, const bc_set &bcs) |
void | step (array_type &a, Time t) |
void | setStep (Time dt) |
Protected Attributes |
operator_type | L_ |
operator_type | I_ |
operator_type | explicitPart_ |
operator_type | implicitPart_ |
Time | dt_ |
Real | theta_ |
bc_set | bcs_ |
|