PRISMS-PF Manual
Loading...
Searching...
No Matches
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
6#include <deal.II/base/timer.h>
7
8#include <prismspf/config.h>
9
11
22class Timer
23{
24public:
28 Timer() = default;
29
35 ~Timer();
36
37 Timer(const Timer &) = delete;
38 Timer &
39 operator=(const Timer &) = delete;
40 Timer(Timer &&) = delete;
41 Timer &
42 operator=(Timer &&) = delete;
43
63 struct Scope
64 {
65 public:
66 explicit Scope(const char *name)
67 : name(name)
68 {
70 }
71
73 {
75 }
76
77 Scope(const Scope &) = delete;
78 Scope &
79 operator=(const Scope &) = delete;
80 Scope(Scope &&) = delete;
81 Scope &
82 operator=(Scope &&) = delete;
83
84 private:
85 const char *name;
86 };
87
91 static void
92 start_section(const char *name);
93
97 static void
98 end_section(const char *name);
99
103 static dealii::TimerOutput &
104 serial_timer();
105
109 static dealii::TimerOutput &
111
115 static void
117};
118
Timer class for PRISMS-PF.
Definition timer.h:23
Timer(Timer &&)=delete
~Timer()
Destructor.
Definition timer.cc:110
static dealii::TimerOutput & parallel_timer()
deal.II timer for parallel MPI process
Definition timer.cc:157
static void start_section(const char *name)
Start a new timer section.
Definition timer.cc:116
Timer & operator=(const Timer &)=delete
Timer()=default
Constructor.
static dealii::TimerOutput & serial_timer()
deal.II timer for the 0th MPI process
Definition timer.cc:147
static void print_summary()
Print a sorted summary of the timed sections.
Definition timer.cc:168
static void end_section(const char *name)
End the timer section.
Definition timer.cc:127
Timer(const Timer &)=delete
Timer & operator=(Timer &&)=delete
@ Value
Use value of the variable as a criterion for refinement.
Definition grid_refiner_criterion.h:31
Definition conditional_ostreams.cc:20
Timer scope guard.
Definition timer.h:64
Scope & operator=(Scope &&)=delete
const char * name
Definition timer.h:85
Scope(const char *name)
Definition timer.h:66
Scope(Scope &&)=delete
Scope & operator=(const Scope &)=delete
~Scope()
Definition timer.h:72
Scope(const Scope &)=delete