Reference documentation for deal.II version 9.6.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
function_time.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 1999 - 2020 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_function_time_h
16#define dealii_function_time_h
17
18
19#include <deal.II/base/config.h>
20
22
70template <typename Number = double>
72{
73public:
78 FunctionTime(const Number initial_time = Number(0.0));
79
83 virtual ~FunctionTime() = default;
84
88 Number
89 get_time() const;
90
94 virtual void
95 set_time(const Number new_time);
96
100 virtual void
101 advance_time(const Number delta_t);
102
106 using time_type = Number;
107
108private:
112 Number time;
113};
114
115
116
117/*----------------------------- Inline functions ----------------------------*/
118
119#ifndef DOXYGEN
120
121template <typename Number>
122inline Number
124{
125 return time;
126}
127
128#endif
130
131#endif
virtual void set_time(const Number new_time)
virtual ~FunctionTime()=default
Number get_time() const
virtual void advance_time(const Number delta_t)
FunctionTime(const Number initial_time=Number(0.0))
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504