QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
methodoflinesscheme.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2018 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/*! \file methodoflinesscheme.hpp
21 \brief Method of Lines scheme
22*/
23
24#ifndef quantlib_method_of_lines_scheme_hpp
25#define quantlib_method_of_lines_scheme_hpp
26
30
31namespace QuantLib {
32
34 public:
35 // typedefs
41
42 // constructors
44 Real relInitStepSize,
45 ext::shared_ptr<FdmLinearOpComposite> map,
46 const bc_set& bcSet = bc_set());
47
48 void step(array_type& a, Time t);
49 void setStep(Time dt);
50
51 protected:
52 //apply for QuantLib's Runge-Kutta implementation
53 std::vector<Real> apply(Time, const std::vector<Real>&) const;
54
57 const ext::shared_ptr<FdmLinearOpComposite> map_;
59 };
60}
61
62#endif
traits::operator_type operator_type
const BoundaryConditionSchemeHelper bcSet_
const ext::shared_ptr< FdmLinearOpComposite > map_
traits::condition_type condition_type
OperatorTraits< FdmLinearOp > traits
void step(array_type &a, Time t)
std::vector< Real > apply(Time, const std::vector< Real > &) const
std::vector< ext::shared_ptr< bc_type > > bc_set
Operator::array_type array_type
condition to be applied at every time step
const DefaultType & t
composite pattern for linear operators
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35
Differential operator traits.