parProfiling.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2019-2020 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::functionObjects::parProfiling
28
29Group
30 grpUtilitiesFunctionObjects
31
32Description
33 Simple (simplistic) mpi-profiling.
34
35Usage
36 Example of function object specification:
37 \verbatim
38 profiling
39 {
40 type parProfiling;
41 libs (utilityFunctionObjects);
42
43 // Report stats on exit only (instead of every time step)
44 executeControl onEnd;
45 writeControl none;
46 }
47 \endverbatim
48
49SourceFiles
50 parProfiling.C
51
52\*---------------------------------------------------------------------------*/
53
54#ifndef functionObjects_parProfiling_H
55#define functionObjects_parProfiling_H
56
57#include "functionObject.H"
58
59// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60
61namespace Foam
62{
63
64// Forward declaration of classes
65class Time;
66
67namespace functionObjects
68{
69
70/*---------------------------------------------------------------------------*\
71 Class parProfiling Declaration
72\*---------------------------------------------------------------------------*/
74class parProfiling
75:
76 public functionObject
77{
78 // Private Member Functions
79
80 //- No copy construct
81 parProfiling(const parProfiling&) = delete;
82
83 //- No copy assignment
84 void operator=(const parProfiling&) = delete;
85
86
87public:
88
89 //- Runtime type information
90 TypeName("parProfiling");
91
92
93 // Constructors
94
95 //- Construct from Time and dictionary
97 (
98 const word& name,
99 const Time& runTime,
100 const dictionary& dict
101 );
102
103
104 //- Destructor
105 virtual ~parProfiling();
106
107
108 // Member Functions
109
110 //- Report the current profiling information
111 void report();
112
113 //- Report
114 virtual bool execute();
115
116 //- Do nothing
117 virtual bool write();
118
119 //- Report
120 virtual bool end();
121};
122
123
124// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125
126} // End namespace functionObjects
127} // End namespace Foam
128
129// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131#endif
132
133// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base-class for Time/database function objects.
const word & name() const noexcept
Return the name of this functionObject.
Simple (simplistic) mpi-profiling.
Definition: parProfiling.H:76
virtual ~parProfiling()
Destructor.
Definition: parProfiling.C:73
TypeName("parProfiling")
Runtime type information.
void report()
Report the current profiling information.
Definition: parProfiling.C:81
virtual bool write()
Do nothing.
Definition: parProfiling.C:179
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73