writeMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2025 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::writeMesh
26 
27 Description
28  Writes changing mesh data (e.g., points, faces, zones) at times other than
29  the write times defined in the controlDict
30 
31  Example of function object specification:
32  \verbatim
33  writeMesh1
34  {
35  type writeMesh;
36  libs ("libutilityFunctionObjects.so");
37  writeControl adjustableRunTime;
38  writeInterval 0.002;
39  }
40  \endverbatim
41 
42 Usage
43  \table
44  Property | Description | Required | Default value
45  type | type name: writeMesh | yes |
46  region | the name of the region | no | default region
47  \endtable
48 
49 See also
50  Foam::functionObject
51  Foam::functionObjects::timeControl
52 
53 SourceFiles
54  writeMesh.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef writeMesh_functionObject_H
59 #define writeMesh_functionObject_H
60 
61 #include "regionFunctionObject.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 namespace functionObjects
68 {
69 
70 /*---------------------------------------------------------------------------*\
71  Class writeMesh Declaration
72 \*---------------------------------------------------------------------------*/
73 
74 class writeMesh
75 :
76  public regionFunctionObject
77 {
78 public:
79 
80  //- Runtime type information
81  TypeName("writeMesh");
82 
83 
84  // Constructors
85 
86  //- Inherit constructors
88 
89 
90  //- Destructor
91  virtual ~writeMesh();
92 
93 
94  // Member Functions
95 
96  //- Return the list of fields required
97  virtual wordList fields() const
98  {
99  return wordList::null();
100  }
101 
102  //- Return true if the functionObject should be executed at the start
103  virtual bool executeAtStart() const;
104 
105  //- Do nothing
106  virtual bool execute();
107 
108  //- Write the registered objects
109  virtual bool write();
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace functionObjects
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
static const List< word > & null()
Return a null List.
Definition: ListI.H:118
regionFunctionObject(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual wordList fields() const
Return the list of fields required.
Definition: writeMesh.H:111
virtual ~writeMesh()
Destructor.
Definition: writeMesh.C:44
virtual bool executeAtStart() const
Return true if the functionObject should be executed at the start.
Definition: writeMesh.C:50
TypeName("writeMesh")
Runtime type information.
virtual bool execute()
Do nothing.
Definition: writeMesh.C:56
virtual bool write()
Write the registered objects.
Definition: writeMesh.C:62
Namespace for OpenFOAM.