#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.
See sect. Finite-differences framework for details on the method.
In this implementation, the passed operator must be derived from either TimeConstantOperator or TimeDependentOperator. Also, it must implement at least the following interface:
typedef ... arrayType;
Operator( const Operator&);
Operator& operator=( const Operator&);
Size size();
void setTime(Time t);
arrayType applyTo( const arrayType&);
arrayType solveFor( const arrayType&);
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.
|
Protected Types |
typedef Operator::arrayType | arrayType |
typedef Operator | operatorType |
typedef BoundaryCondition<
Operator > | bcType |
Protected Member Functions |
| MixedScheme (const Operator &L, Real theta, const std::vector< boost::shared_ptr< bcType > > &bcs) |
void | step (arrayType &a, Time t) |
void | setStep (Time dt) |
Protected Attributes |
Operator | L_ |
Operator | I_ |
Operator | explicitPart_ |
Operator | implicitPart_ |
Time | dt_ |
Real | theta_ |
std::vector< boost::shared_ptr<
bcType > > | bcs_ |
Friends |
class | FiniteDifferenceModel< MixedScheme< Operator > > |
|