30 const ext::shared_ptr<FdmMesher>& mesher,
31 const ext::shared_ptr<GeneralizedBlackScholesProcess> & bsProcess,
34 Real illegalLocalVolOverwrite,
37 rTS_ (bsProcess->riskFreeRate().currentLink()),
38 qTS_ (bsProcess->dividendYield().currentLink()),
39 volTS_ (bsProcess->blackVolatility().currentLink()),
40 localVol_((localVol) ? bsProcess->localVolatility().currentLink()
45 mapT_ (direction, mesher),
47 illegalLocalVolOverwrite_(illegalLocalVolOverwrite),
57 for (
const auto& iter : *
mesher_->layout()) {
58 const Size i = iter.index();
93 return Array(
r.size(), 0.0);
98 return Array(
r.size(), 0.0);
const Handle< BlackVolTermStructure > volTS_
1-D array used in linear algebra.
FdmBlackScholesFwdOp(const ext::shared_ptr< FdmMesher > &mesher, const ext::shared_ptr< GeneralizedBlackScholesProcess > &process, Real strike, bool localVol=false, Real illegalLocalVolOverwrite=-Null< Real >(), Size direction=0)
Size size() const override
Array apply_direction(Size direction, const Array &r) const override
Array preconditioner(const Array &r, Real s) const override
std::vector< SparseMatrix > toMatrixDecomp() const override
const TripleBandLinearOp dxxMap_
void setTime(Time t1, Time t2) override
Time is required.
Array apply_mixed(const Array &r) const override
const ext::shared_ptr< YieldTermStructure > qTS_
const FirstDerivativeOp dxMap_
const ext::shared_ptr< FdmMesher > mesher_
Array solve_splitting(Size direction, const Array &r, Real s) const override
const ext::shared_ptr< YieldTermStructure > rTS_
const ext::shared_ptr< BlackVolTermStructure > volTS_
Array apply(const Array &r) const override
const ext::shared_ptr< LocalVolTermStructure > localVol_
const Real illegalLocalVolOverwrite_
SparseMatrix toMatrix() const override
TripleBandLinearOp multR(const Array &u) const
Array solve_splitting(const Array &r, Real a, Real b=1.0) const
void axpyb(const Array &a, const TripleBandLinearOp &x, const TripleBandLinearOp &y, const Array &b)
TripleBandLinearOp mult(const Array &u) const
Array apply(const Array &r) const override
Black Scholes linear operator for the Fokker-Planck forward equation.
const ext::shared_ptr< YieldTermStructure > rTS_
memory layout of a fdm linear operator
const ext::shared_ptr< FdmMesher > mesher_
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container
functionals and combinators not included in the STL
Array Exp(const Array &v)
ext::shared_ptr< YieldTermStructure > q
ext::shared_ptr< YieldTermStructure > r
ext::shared_ptr< BlackVolTermStructure > v
second derivative operator