coordinateSystems.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) 2011-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::coordinateSystems::coordinateSystems
26 
27 Description
28  Provides a centralised coordinateSystem collection.
29 
30  For example with the porous region specified in \c constant/fvModels as
31 
32  \verbatim
33  porosity
34  {
35  type porosityForce;
36 
37  porosityForceCoeffs
38  {
39  cellZone porousBlockage;
40 
41  type DarcyForchheimer;
42 
43  // D 100; // Very little blockage
44  // D 200; // Some blockage but steady flow
45  // D 500; // Slight waviness in the far wake
46  D 1000; // Fully shedding behavior
47 
48  d ($D $D $D);
49  f (0 0 0);
50 
51  coordinateSystem porousBlockage;
52  }
53  }
54  \endverbatim
55 
56  the corresponding coordinate system \c porousBlockage is looked-up
57  automatically from the \c constant/coordinateSystems dictionary:
58 
59  \verbatim
60  porousBlockage
61  {
62  type cartesian;
63  origin (0 0 0);
64  coordinateRotation
65  {
66  type axesRotation;
67  e1 (1 0 0);
68  e2 (0 1 0);
69  }
70  }
71  \endverbatim
72 
73  See \c tutorials/modules/incompressibleFluid/porousBlockage
74 
75 SourceFiles
76  coordinateSystems.C
77 
78 \*---------------------------------------------------------------------------*/
79 #ifndef coordinateSystems_H
80 #define coordinateSystems_H
81 
82 #include "coordinateSystem.H"
83 #include "PtrDictionary.H"
84 #include "DemandDrivenMeshObject.H"
85 
86 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87 
88 namespace Foam
89 {
90 namespace coordinateSystems
91 {
92 
93 /*---------------------------------------------------------------------------*\
94  Class coordinateSystems Declaration
95 \*---------------------------------------------------------------------------*/
96 
98 :
100  <
101  objectRegistry,
102  DeletableMeshObject,
103  coordinateSystems
104  >,
105  public PtrDictionary<coordinateSystem>
106 {
107 protected:
108 
109  friend class DemandDrivenMeshObject
110  <
114  >;
115 
116  // Protected Constructors
117 
118  //- Read construct from objectRegistry
119  explicit coordinateSystems(const objectRegistry& obr);
120 
121 
122 public:
123 
124  //- Runtime type information
125  TypeName("coordinateSystems");
126 
127 
128  // Constructors
129 
130  //- Disallow default bitwise copy construction
131  coordinateSystems(const coordinateSystems&) = delete;
132 
134  <
138  >::New;
139 
140 
141  //- Destructor
142  virtual ~coordinateSystems()
143  {}
144 
145 
146  // Member Functions
147 
148  //- Is object global
149  virtual bool global() const
150  {
151  return true;
152  }
153 
154  //- ReadData function required for regIOobject read operation
155  virtual bool readData(Istream&);
156 
157  //- WriteData function required for regIOobject write operation
158  bool writeData(Ostream&) const;
159 
160 
161  // Member Operators
162 
163  //- Disallow default bitwise assignment
164  void operator=(const coordinateSystems&) = delete;
165 };
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 } // End namespace coordinateSystems
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 template<>
175 struct typeGlobal
176 <
178  <
181  coordinateSystems::coordinateSystems
182  >
183 >
184 {
185  static const bool global = true;
186 };
187 
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 } // End namespace Foam
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 #endif
196 
197 // ************************************************************************* //
MeshObject types:
Definition: MeshObjects.H:67
Templated abstract base-class for demand-driven mesh objects used to automate their allocation to the...
static coordinateSystems & New(const word &name, const objectRegistry &mesh)
Construct and return the named DemandDrivenMeshObject.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
Template dictionary class which manages the storage associated with it.
Definition: PtrDictionary.H:56
Provides a centralised coordinateSystem collection.
bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
TypeName("coordinateSystems")
Runtime type information.
coordinateSystems(const objectRegistry &obr)
Read construct from objectRegistry.
virtual bool global() const
Is object global.
void operator=(const coordinateSystems &)=delete
Disallow default bitwise assignment.
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
Registry of regIOobjects.
Namespace for OpenFOAM.
Trait for obtaining global status.
Definition: IOobject.H:503
static const bool global
Definition: IOobject.H:504