HArD::Core3D
Hybrid Arbitrary Degree::Core 3D - Library to implement 3D schemes with vertex, edge, face and cell polynomials as unknowns
Loading...
Searching...
No Matches
src
Common
display_timer.hpp
Go to the documentation of this file.
1
// Function to store and display wall/proc times obtained by boost::timer::cpu_timer
2
3
/*
4
*
5
* This library was developed around HHO methods, although some parts of it have a more
6
* general purpose. If you use this code or part of it in a scientific publication,
7
* please mention the following book as a reference for the underlying principles
8
* of HHO schemes:
9
*
10
* The Hybrid High-Order Method for Polytopal Meshes: Design, Analysis, and Applications.
11
* D. A. Di Pietro and J. Droniou. Modeling, Simulation and Applications, vol. 19.
12
* Springer International Publishing, 2020, xxxi + 525p. doi: 10.1007/978-3-030-37203-3.
13
* url: https://hal.archives-ouvertes.fr/hal-02151813.
14
*
15
*/
16
17
#ifndef DISPLAY_TIMER_HPP
18
#define DISPLAY_TIMER_HPP
19
20
#include <boost/timer/timer.hpp>
21
22
namespace
HArDCore3D
23
{
24
31
32
inline
std::pair<double,double>
store_times
(
33
boost::timer::cpu_timer &
timer
,
34
std::string
message
=
""
35
)
36
{
37
double
twall
=
double
(
timer
.elapsed().wall) * pow(10, -9);
38
double
tproc
=
double
(
timer
.elapsed().user +
timer
.elapsed().system) * pow(10, -9);
39
40
if
(
message
!=
""
){
41
std::cout <<
message
<<
twall
<<
"/"
<<
tproc
<< std::endl;
42
}
43
44
return
std::make_pair(
twall
,
tproc
);
45
}
46
48
49
}
// end of namespace HArDCore3D
50
51
#endif
HArDCore3D::Matrix
@ Matrix
Definition
basis.hpp:67
HArDCore3D::store_times
std::pair< double, double > store_times(boost::timer::cpu_timer &timer, std::string message="")
Function to store and display wall/proc timers from boost::timer::cpu_timer.
Definition
display_timer.hpp:32
HArDCore3D
Definition
ddr-magnetostatics.hpp:41
Generated by
1.9.8