Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
incremental_function.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2018 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_incremental_function_h
17 #define dealii_incremental_function_h
18 
19 
20 #include <deal.II/base/function.h>
21 #include <deal.II/base/thread_management.h>
22 
23 DEAL_II_NAMESPACE_OPEN
24 
25 template <typename number>
26 class Vector;
27 
28 namespace Functions
29 {
44  template <int dim, typename RangeNumberType = double>
45  class IncrementalFunction : public Function<dim, RangeNumberType>
46  {
47  public:
52  static const unsigned int dimension = dim;
53 
58 
70 
78  virtual RangeNumberType
79  value(const Point<dim> &p, const unsigned int component = 0) const override;
80 
87  virtual void
88  vector_value(const Point<dim> & p,
89  Vector<RangeNumberType> &values) const override;
90 
96  void
98 
99  private:
104 
109 
114 
119  };
120 
121 } // namespace Functions
122 
123 
124 DEAL_II_NAMESPACE_CLOSE
125 
126 #endif
static const unsigned int dimension
virtual void vector_value(const Point< dim > &p, Vector< RangeNumberType > &values) const override
LinearAlgebra::distributed::Vector< Number > Vector
typename FunctionTime< typename numbers::NumberTraits< RangeNumberType >::real_type >::time_type time_type
Definition: function.h:168
void set_decrement(const time_type delta_t)
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const override
IncrementalFunction(Function< dim, RangeNumberType > &base)
typename Function< dim, RangeNumberType >::time_type time_type
Function< dim, RangeNumberType > & base
Vector< RangeNumberType > values_old