32#ifndef quantlib_system_evolver_hpp
33#define quantlib_system_evolver_hpp
45 template <
typename array_type>
46 class [[deprecated(
"Use the new finite-differences framework instead")]]
StepConditionSet {
47 typedef ext::shared_ptr<StepCondition<array_type> >
itemType;
52 for (
Size i=0; i < stepConditions_.size(); i++) {
53 stepConditions_[i]->applyTo(a[i],
t);
57 stepConditions_.push_back(a);
61 template <
typename bc_set>
76 template <
typename traits>
79 typedef std::vector<typename traits::array_type>
array_type;
81 typedef std::vector<typename traits::bc_type>
bc_type;
91 template <
class Evolver>
92 class [[deprecated(
"Use the new finite-differences framework instead")]]
ParallelEvolver {
104 evolvers_.reserve(L.size());
105 for (
Size i=0; i < L.size(); i++) {
106 evolvers_.push_back(ext::shared_ptr<Evolver>(
new
107 Evolver(L[i], bcs[i])));
113 for (
Size i=0; i < evolvers_.size(); i++) {
114 evolvers_[i]->step(a[i],
t);
118 for (
Size i=0; i < evolvers_.size(); i++) {
119 evolvers_[i]->setStep(dt);
std::vector< bc_set > bcSet_
const bc_set & operator[](Size i) const
void push_back(const bc_set &a)
std::vector< ext::shared_ptr< Evolver > > evolvers_
ParallelEvolver(const operator_type &L, const bc_set &bcs)
traits::array_type array_type
QL_DEPRECATED_DISABLE_WARNING typedef ParallelEvolverTraits< typename Evolver::traits > traits
void step(array_type &a, Time t)
QL_DEPRECATED_ENABLE_WARNING typedef traits::operator_type operator_type
QL_DEPRECATED_DISABLE_WARNING typedef StepConditionSet< typename traits::array_type > condition_type
std::vector< typename traits::array_type > array_type
BoundaryConditionSet< typename traits::bc_set > bc_set
std::vector< typename traits::operator_type > operator_type
std::vector< typename traits::bc_type > bc_type
std::vector< itemType > stepConditions_
void push_back(const itemType &a)
ext::shared_ptr< StepCondition< array_type > > itemType
void applyTo(std::vector< array_type > &a, Time t) const
generic finite difference model
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container
#define QL_DEPRECATED_DISABLE_WARNING
#define QL_DEPRECATED_ENABLE_WARNING
conditions to be applied at every time step