checkMesh.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) 2023 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::checkMesh
26 
27 Description
28  Executes primitiveMesh::checkMesh(true) every execute time for which the
29  mesh changed, i.e. moved or changed topology.
30 
31  Useful to check the correctness of changing and morphing meshes.
32 
33  Example of checkMesh specification:
34  \verbatim
35  checkMesh
36  {
37  type checkMesh;
38  libs ("libutilityFunctionObjects.so");
39 
40  executeControl timeStep;
41  executeInterval 10;
42  }
43  \endverbatim
44  or using the standard configuration file:
45  \verbatim
46  #includeFunc checkMesh(executeInterval=10)
47  \endverbatim
48 
49 SourceFiles
50  checkMesh.C
51 
52 \*---------------------------------------------------------------------------*/
53 
54 #ifndef functionObjects_checkMesh_H
55 #define functionObjects_checkMesh_H
56 
57 #include "fvMeshFunctionObject.H"
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 namespace Foam
62 {
63 namespace functionObjects
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class checkMesh Declaration
68 \*---------------------------------------------------------------------------*/
69 
70 class checkMesh
71 :
73 {
74  // Private Data
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("checkMesh");
80 
81 
82  // Constructors
83 
84  //- Construct from Time and dictionary
85  checkMesh
86  (
87  const word& name,
88  const Time&,
89  const dictionary&
90  );
91 
92 
93  //- Destructor
94  virtual ~checkMesh();
95 
96 
97  // Member Functions
98 
99  //- Return the list of fields required
100  virtual wordList fields() const
101  {
102  return wordList::null();
103  }
104 
105  //- Execute primitiveMesh::checkMesh(true)
106  virtual bool execute();
107 
108  //- Do nothing
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
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:76
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
const word & name() const
Return the name of this functionObject.
Executes primitiveMesh::checkMesh(true) every execute time for which the mesh changed,...
Definition: checkMesh.H:72
TypeName("checkMesh")
Runtime type information.
virtual wordList fields() const
Return the list of fields required.
Definition: checkMesh.H:99
virtual ~checkMesh()
Destructor.
Definition: checkMesh.C:60
checkMesh(const word &name, const Time &, const dictionary &)
Construct from Time and dictionary.
Definition: checkMesh.C:46
virtual bool execute()
Execute primitiveMesh::checkMesh(true)
Definition: checkMesh.C:66
virtual bool write()
Do nothing.
Definition: checkMesh.C:79
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.