Reference documentation for deal.II version 9.5.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// Copyright (C) 1999 - 2020 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_function_time_h
17#define dealii_function_time_h
18
19
20#include <deal.II/base/config.h>
21
23
71template <typename Number = double>
73{
74public:
79 FunctionTime(const Number initial_time = Number(0.0));
80
84 virtual ~FunctionTime() = default;
85
89 Number
90 get_time() const;
91
95 virtual void
96 set_time(const Number new_time);
97
101 virtual void
102 advance_time(const Number delta_t);
103
107 using time_type = Number;
108
109private:
113 Number time;
114};
115
116
117
118/*----------------------------- Inline functions ----------------------------*/
119
120#ifndef DOXYGEN
121
122template <typename Number>
123inline Number
125{
126 return time;
127}
128
129#endif
131
132#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:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473