PRISMS-PF Manual
Loading...
Searching...
No Matches
simulation_timer.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2025 PRISMS Center at the University of Michigan
2// SPDX-License-Identifier: GNU Lesser General Public Version 2.1
3
4#pragma once
5
7
8#include <prismspf/config.h>
9
11
13{
14public:
15 SimulationTimer() = default;
16
17 explicit SimulationTimer(double step_size)
19 {}
20
21 [[nodiscard]] unsigned int
23 {
24 return current_increment;
25 }
26
27 [[nodiscard]] double
28 get_time() const
29 {
30 return current_time;
31 }
32
33 [[nodiscard]] double
35 {
36 return time_step_size;
37 }
38
39 void
45
46 void
51
52 void
57
58 void
59 set_time(double time)
60 {
62 }
63
64 void
66 {
68 }
69
70 void
72 {
74 current_time = 0.0;
75 }
76
77private:
78 unsigned int current_increment = 0;
79 double current_time = 0.0;
80 double time_step_size = 0.0;
81};
82
Definition simulation_timer.h:13
SimulationTimer()=default
SimulationTimer(double step_size)
Definition simulation_timer.h:17
double current_time
Definition simulation_timer.h:79
unsigned int get_increment() const
Definition simulation_timer.h:22
void increment(double step_size)
Definition simulation_timer.h:40
unsigned int current_increment
Definition simulation_timer.h:78
void set_time(double time)
Definition simulation_timer.h:59
double time_step_size
Definition simulation_timer.h:80
double get_timestep() const
Definition simulation_timer.h:34
void set_increment(unsigned int increment)
Definition simulation_timer.h:65
void increment()
Definition simulation_timer.h:47
double get_time() const
Definition simulation_timer.h:28
void set_timestep(double step_size)
Definition simulation_timer.h:53
void reset()
Definition simulation_timer.h:71
@ Value
Use value of the variable as a criterion for refinement.
Definition grid_refiner_criterion.h:31
Definition conditional_ostreams.cc:20