Loading...
Searching...
No Matches
processorField.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) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2020-2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::functionObjects::processorField
29
30Group
31 grpFieldFunctionObjects
32
33Description
34 Writes a scalar field whose value is the local processor ID. The output
35 field name is \c processorID.
36
37 Operands:
38 \table
39 Operand | Type | Location
40 input | volScalarField | <time>/inputField
41 output file | - | -
42 output field | volScalarField | <time>/outputField
43 \endtable
44
45Usage
46 Minimal example by using \c system/controlDict.functions:
47 \verbatim
48 processorFieldFO
49 {
50 // Mandatory entries
51 type processorField;
52 libs (fieldFunctionObjects);
53
54 // Inherited entries
55 ...
56 }
57 \endverbatim
58
59 where the entries mean:
60 \table
61 Property | Description | Type | Reqd | Deflt
62 type | Type name: processorField | word | yes | -
63 libs | Library name: fieldFunctionObjects | word | yes | -
64 \endtable
65
66 The inherited entries are elaborated in:
67 - \link functionObject.H \endlink
68
69SourceFiles
70 processorField.C
71
72\*---------------------------------------------------------------------------*/
73
74#ifndef Foam_functionObjects_processorField_H
75#define Foam_functionObjects_processorField_H
76
78
79// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80
81namespace Foam
82{
83namespace functionObjects
84{
85
86/*---------------------------------------------------------------------------*\
87 Class processorField Declaration
88\*---------------------------------------------------------------------------*/
89
91:
93{
94public:
95
96 //- Runtime type information
97 TypeName("processorField");
98
99
100 // Constructors
101
102 //- Construct from name, Time and dictionary
104 (
105 const word& name,
106 const Time& runTime,
107 const dictionary& dict
108 );
109
110 //- No copy construct
111 processorField(const processorField&) = delete;
112
113 //- No copy assignment
114 void operator=(const processorField&) = delete;
115
116
117 //- Destructor
118 virtual ~processorField() = default;
120
121 // Member Functions
122
123 //- Read the function-object dictionary
124 virtual bool read(const dictionary& dict);
125
126 //- Execute the function-object operations
127 virtual bool execute();
129 //- Write the function-object results
130 virtual bool write();
131
132 //- Update for changes of mesh
133 // The base implementation is a no-op.
134 virtual void updateMesh(const mapPolyMesh& mpm);
135};
136
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140} // End namespace functionObjects
141} // End namespace Foam
142
143// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144
145#endif
147// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
const word & name() const noexcept
Return the name of this functionObject.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
Writes a scalar field whose value is the local processor ID. The output field name is processorID.
virtual ~processorField()=default
Destructor.
processorField(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
void operator=(const processorField &)=delete
No copy assignment.
virtual void updateMesh(const mapPolyMesh &mpm)
Update for changes of mesh.
virtual bool execute()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
processorField(const processorField &)=delete
No copy construct.
TypeName("processorField")
Runtime type information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68