25 template <
int dim,
typename RangeNumberType>
28 :
Function<dim, RangeNumberType>(base.n_components)
31 , values_old(base.n_components)
36 template <
int dim,
typename RangeNumberType>
42 ExcMessage(
"The decrement must be set to a non-negative value."));
48 template <
int dim,
typename RangeNumberType>
52 const unsigned int comp)
const
56 std::lock_guard<std::mutex> lock(mutex);
61 const auto orig_time = base.get_time();
63 base.set_time(this->get_time());
64 const RangeNumberType current = base.value(p, comp);
66 base.set_time(this->get_time() - delta_t);
67 const RangeNumberType old = base.value(p, comp);
70 base.set_time(orig_time);
77 template <
int dim,
typename RangeNumberType>
85 std::lock_guard<std::mutex> lock(mutex);
90 const auto orig_time = base.get_time();
92 base.set_time(this->get_time());
93 base.vector_value(p, values);
95 base.set_time(this->get_time() - delta_t);
96 base.vector_value(p, values_old);
101 base.set_time(orig_time);
106#include "incremental_function.inst"
void set_decrement(const time_type delta_t)
typename Function< dim, RangeNumberType >::time_type time_type
IncrementalFunction(Function< dim, RangeNumberType > &base)
virtual void vector_value(const Point< dim > &p, Vector< RangeNumberType > &values) const override
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const override
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcMessage(std::string arg1)