QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
fdmdiscountdirichletboundary.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2019 Klaus Spanderen
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20
25#ifndef quantlib_fdm_discount_dirichlet_boundary_hpp
26#define quantlib_fdm_discount_dirichlet_boundary_hpp
27
28#include <ql/methods/finitedifferences/utilities/fdmtimedepdirichletboundary.hpp>
29
30namespace QuantLib {
31
32 class YieldTermStructure;
33
35 : public BoundaryCondition<FdmLinearOp> {
36 public:
40
42 const ext::shared_ptr<FdmMesher>& mesher,
43 const ext::shared_ptr<YieldTermStructure>& rTS,
44 Time maturityTime,
45 Real valueOnBoundary,
46 Size direction, Side side);
47
48 void setTime(Time) override;
49 void applyBeforeApplying(operator_type&) const override;
50 void applyBeforeSolving(operator_type&, array_type&) const override;
51 void applyAfterApplying(array_type&) const override;
52 void applyAfterSolving(array_type&) const override;
53
54 private:
55 const ext::shared_ptr<FdmTimeDepDirichletBoundary> bc_;
56 };
57}
58
59#endif
1-D array used in linear algebra.
Definition: array.hpp:52
Abstract boundary condition class for finite difference problems.
void applyAfterSolving(array_type &) const override
BoundaryCondition< FdmLinearOp >::Side Side
void applyAfterApplying(array_type &) const override
void applyBeforeApplying(operator_type &) const override
void applyBeforeSolving(operator_type &, array_type &) const override
const ext::shared_ptr< FdmTimeDepDirichletBoundary > bc_
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35