24#ifndef quantlib_pde_hpp
25#define quantlib_pde_hpp
40 for (
Size i = 1; i < tg.
size() - 1; i++) {
54 template <
class PdeClass>
59 PdeClass pde(process);
74 template <
class PdeClass>
85 typename PdeClass::grid_type
grid_;
89 template <
class PdeClass>
95 Time residualTime = 0.0) :
98 ext::shared_ptr<GenericTimeSetter<PdeClass> >(
1-D array used in linear algebra.
1-D array used in linear algebra.
PdeClass::grid_type grid_
GenericTimeSetter(const Array &grid, T process)
void setTime(Time t, TridiagonalOperator &L) const override
Real drift(Time, Real) const override
Real diffusion(Time, Real) const override
PdeConstantCoeff(const typename PdeClass::argument_type &process, Time t, Real x)
Real discount(Time, Real) const override
PdeOperator(const Array &grid, T process, Time residualTime=0.0)
virtual Real discount(Time t, Real x) const =0
virtual Real drift(Time t, Real x) const =0
virtual void generateOperator(Time t, const TransformedGrid &tg, TridiagonalOperator &L) const
virtual ~PdeSecondOrderParabolic()=default
virtual Real diffusion(Time t, Real x) const =0
encapsulation of time-setting logic
Base implementation for tridiagonal operator.
ext::shared_ptr< TimeSetter > timeSetter_
void setMidRow(Size, Real, Real, Real)
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container
ext::shared_ptr< YieldTermStructure > r