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 | Copyright (C) 2011-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::functionObjects::processorField
26 
27 Group
28  grpFieldFunctionObjects
29 
30 Description
31  Writes a scalar field whose value is the local processor ID. The output
32  field name is 'processorID'.
33 
34  Example of function object specification:
35  \verbatim
36  processorField1
37  {
38  type processorField;
39  libs ("libfieldFunctionObjects.so");
40  ...
41  }
42  \endverbatim
43 
44 Usage
45  \table
46  Property | Description | Required | Default value
47  type | type name: processorField | yes |
48  \endtable
49 
50 See also
51  Foam::functionObjects::fvMeshFunctionObject
52 
53 SourceFiles
54  processorField.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef functionObjects_processorField_H
59 #define functionObjects_processorField_H
60 
61 #include "fvMeshFunctionObject.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 namespace functionObjects
68 {
69 
70 /*---------------------------------------------------------------------------*\
71  Class processorField Declaration
72 \*---------------------------------------------------------------------------*/
73 
74 class processorField
75 :
76  public fvMeshFunctionObject
77 {
78  // Private member functions
79 
80  //- Disallow default bitwise copy construct
81  processorField(const processorField&);
82 
83  //- Disallow default bitwise assignment
84  void operator=(const processorField&);
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("processorField");
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 ~processorField();
106 
107 
108  // Member Functions
109 
110  //- Read the input data
111  virtual bool read(const dictionary&);
112 
113  //- Calculate the processorID field
114  virtual bool execute();
115 
116  //- Write the processorID field
117  virtual bool write();
118 };
119 
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace functionObjects
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
virtual ~processorField()
Destructor.
dictionary dict
const word & name() const
Return the name of this functionObject.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual bool execute()
Calculate the processorID field.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
virtual bool write()
Write the processorID field.
virtual bool read(const dictionary &)
Read the input data.
A class for handling words, derived from string.
Definition: word.H:59
TypeName("processorField")
Runtime type information.
Writes a scalar field whose value is the local processor ID. The output field name is &#39;processorID&#39;...
Namespace for OpenFOAM.