singleLayerRegion.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-2019 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::regionModels::singleLayerRegion
26 
27 Description
28  Base class for single layer region models
29 
30 SourceFiles
31  singleLayerRegion.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef singleLayerRegion_H
36 #define singleLayerRegion_H
37 
38 #include "regionModel.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 namespace regionModels
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class singleLayerRegion Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public regionModel
54 {
55  // Private Member Functions
56 
57  //- Construct region mesh and fields
58  void constructMeshObjects();
59 
60  //- Initialise the region
61  void initialise();
62 
63 
64 protected:
65 
66  // Protected data
67 
68  // Region addressing
69 
70  //- Patch normal vectors
72 
73  //- Face area magnitudes / [m^2]
75 
76 
77  // Addressing
78 
79  //- List of patch IDs opposite to internally coupled patches
81 
82 
83  // Protected member functions
84 
85  //- Read control parameters from dictionary
86  virtual bool read();
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("regionModel");
93 
94 
95  // Constructors
96 
97  //- Construct null
98  singleLayerRegion(const fvMesh& mesh, const word& regionType);
99 
100  //- Construct from mesh, region type and name
102  (
103  const fvMesh& mesh,
104  const word& regionType,
105  const word& modelName,
106  bool readFields = true
107  );
108 
109  //- Disallow default bitwise copy construction
110  singleLayerRegion(const singleLayerRegion&) = delete;
111 
112 
113  //- Destructor
114  virtual ~singleLayerRegion();
115 
116 
117  // Member Functions
118 
119  // Access
120 
121  // Region geometry
122 
123  //- Return the patch normal vectors
124  virtual const volVectorField& nHat() const;
125 
126  //- Return the face area magnitudes / [m^2]
127  virtual const volScalarField& magSf() const;
128 
129 
130  // Addressing
131 
132  //- Return the list of patch IDs opposite to internally
133  // coupled patches
134  virtual const labelList& passivePatchIDs() const;
135 
136 
137  // Patch type information
138 
139  //- Return boundary types for mapped field patches
140  // Also maps internal field value
141  // Mapping region prescribed by underlying mapped poly patch
142  template<class Type>
144 
145  //- Return boundary types for pushed mapped field patches
146  // Mapping region prescribed by underlying mapped poly patch
147  template<class Type>
149 
150 
151  // Member Operators
152 
153  //- Disallow default bitwise assignment
154  void operator=(const singleLayerRegion&) = delete;
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace regionModels
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #ifdef NoRepository
167 #endif
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const HashSet< word > &selectedFields, LIFOStack< regIOobject *> &storedObjects)
Read the selected GeometricFields of the specified type.
Definition: ReadFields.C:244
Base class for single layer region models.
virtual const labelList & passivePatchIDs() const
Return the list of patch IDs opposite to internally.
const word & modelName() const
Return the model name.
Definition: regionModelI.H:55
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
virtual const volVectorField & nHat() const
Return the patch normal vectors.
void operator=(const singleLayerRegion &)=delete
Disallow default bitwise assignment.
singleLayerRegion(const fvMesh &mesh, const word &regionType)
Construct null.
labelList passivePatchIDs_
List of patch IDs opposite to internally coupled patches.
autoPtr< volScalarField > magSfPtr_
Face area magnitudes / [m^2].
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m^2].
wordList mappedPushedFieldPatchTypes() const
Return boundary types for pushed mapped field patches.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
wordList mappedFieldAndInternalPatchTypes() const
Return boundary types for mapped field patches.
autoPtr< volVectorField > nHatPtr_
Patch normal vectors.
Base class for region models.
Definition: regionModel.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
TypeName("regionModel")
Runtime type information.
Namespace for OpenFOAM.
virtual bool read()
Read control parameters from dictionary.