27#ifndef quantlib_fd_vanilla_engine_hpp
28#define quantlib_fd_vanilla_engine_hpp
44 class [[deprecated(
"Use the new finite-differences framework instead")]]
FDVanillaEngine {
50 bool timeDependent =
false)
51 : process_(
std::move(process)), timeSteps_(timeSteps), gridPoints_(gridPoints),
52 timeDependent_(timeDependent), intrinsicValues_(gridPoints), BCs_(2) {}
55 const Array&
grid()
const {
return intrinsicValues_.grid(); }
60 virtual void setGridLimits()
const;
61 virtual void setGridLimits(
Real,
Time)
const;
62 virtual void initializeInitialCondition()
const;
63 virtual void initializeBoundaryConditions()
const;
64 virtual void initializeOperator()
const;
65 virtual Time getResidualTime()
const;
67 ext::shared_ptr<GeneralizedBlackScholesProcess>
process_;
77 mutable std::vector<ext::shared_ptr<bc_type> >
BCs_;
81 void ensureStrikeInGrid()
const;
84 Time residualTime)
const;
boundary conditions for differential operators
1-D array used in linear algebra.
Abstract boundary condition class for finite difference problems.
virtual ~FDVanillaEngine()=default
TridiagonalOperator finiteDifferenceOperator_
QL_DEPRECATED_DISABLE_WARNING FDVanillaEngine(ext::shared_ptr< GeneralizedBlackScholesProcess > process, Size timeSteps, Size gridPoints, bool timeDependent=false)
QL_DEPRECATED_DISABLE_WARNING SampledCurve intrinsicValues_
std::vector< ext::shared_ptr< bc_type > > BCs_
ext::shared_ptr< Payoff > payoff_
QL_DEPRECATED_ENABLE_WARNING typedef BoundaryCondition< TridiagonalOperator > bc_type
const Array & grid() const
static const Real safetyZoneFactor_
ext::shared_ptr< GeneralizedBlackScholesProcess > process_
Base implementation for tridiagonal operator.
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container
Base class for pricing engines.
#define QL_DEPRECATED_DISABLE_WARNING
#define QL_DEPRECATED_ENABLE_WARNING
a class that contains a sampled curve