24 template <
int dim,
typename RangeNumberType>
27 :
Function<dim, RangeNumberType>(base.n_components)
30 , values_old(base.n_components)
35 template <
int dim,
typename RangeNumberType>
41 ExcMessage(
"The decrement must be set to a non-negative value."));
47 template <
int dim,
typename RangeNumberType>
51 const unsigned int comp)
const
55 std::lock_guard<std::mutex> lock(mutex);
60 const auto orig_time = base.get_time();
62 base.set_time(this->get_time());
63 const RangeNumberType current = base.value(p, comp);
65 base.set_time(this->get_time() - delta_t);
66 const RangeNumberType old = base.value(p, comp);
69 base.set_time(orig_time);
76 template <
int dim,
typename RangeNumberType>
84 std::lock_guard<std::mutex> lock(mutex);
89 const auto orig_time = base.get_time();
91 base.set_time(this->get_time());
92 base.vector_value(p, values);
94 base.set_time(this->get_time() - delta_t);
95 base.vector_value(p, values_old);
100 base.set_time(orig_time);
105#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)