fvMeshFunctionObject.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) 2016-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::fvMeshFunctionObject
26 
27 Description
28  Specialisation of Foam::functionObject for an Foam::fvMesh, providing a
29  reference to the Foam::fvMesh.
30 
31  If the selected region is not an Foam::fvMesh a Foam::FatalError will be
32  generated.
33 
34 See also
35  Foam::functionObject
36  Foam::functionObjects::objectRegistryFunctionObject
37  Foam::functionObjects::regionFunctionObject
38 
39 SourceFiles
40  fvMeshFunctionObject.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef fvMeshFunctionObject_functionObject_H
45 #define fvMeshFunctionObject_functionObject_H
46 
47 #include "regionFunctionObject.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 // Forward declaration of classes
55 class fvMesh;
56 
57 namespace functionObjects
58 {
59 
60 /*---------------------------------------------------------------------------*\
61  Class fvMeshFunctionObject Declaration
62 \*---------------------------------------------------------------------------*/
63 
65 :
67 {
68 
69 protected:
70 
71  // Protected member data
72 
73  //- Reference to the fvMesh
74  const fvMesh& mesh_;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("fvMeshFunctionObject");
81 
82 
83  // Constructors
84 
85  //- Construct from Time and dictionary
87  (
88  const word& name,
89  const Time& runTime,
90  const dictionary& dict
91  );
92 
93  //- Construct from the region objectRegistry
95  (
96  const word& name,
97  const objectRegistry& obr
98  );
99 
100  //- Disallow default bitwise copy construction
102 
103 
104  //- Destructor
105  virtual ~fvMeshFunctionObject();
106 
107 
108  // Member Functions
109 
110  //- Return a reference to the mesh
111  const fvMesh& mesh() const
112  {
113  return mesh_;
114  }
115 
116 
117  // Member Operators
118 
119  //- Disallow default bitwise assignment
120  void operator=(const fvMeshFunctionObject&) = delete;
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:76
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
const word & name() const
Return the name of this functionObject.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fvMeshFunctionObject(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
const fvMesh & mesh_
Reference to the fvMesh.
const fvMesh & mesh() const
Return a reference to the mesh.
void operator=(const fvMeshFunctionObject &)=delete
Disallow default bitwise assignment.
TypeName("fvMeshFunctionObject")
Runtime type information.
Specialisation of Foam::functionObject for a region.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:96
Registry of regIOobjects.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict