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-2018 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  //- Disallow default bitwise copy construct
59 
60  //- Disallow default bitwise assignment
61  void operator=(const singleLayerRegion&);
62 
63  //- Construct region mesh and fields
64  void constructMeshObjects();
65 
66  //- Initialise the region
67  void initialise();
68 
69 
70 protected:
71 
72  // Protected data
73 
74  // Region addressing
75 
76  //- Patch normal vectors
78 
79  //- Face area magnitudes / [m2]
81 
82 
83  // Addressing
84 
85  //- List of patch IDs opposite to internally coupled patches
87 
88 
89  // Protected member functions
90 
91  //- Read control parameters from dictionary
92  virtual bool read();
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("regionModel");
99 
100 
101  // Constructors
102 
103  //- Construct null
104  singleLayerRegion(const fvMesh& mesh, const word& regionType);
105 
106  //- Construct from mesh, region type and name
108  (
109  const fvMesh& mesh,
110  const word& regionType,
111  const word& modelName,
112  bool readFields = true
113  );
114 
115 
116  //- Destructor
117  virtual ~singleLayerRegion();
118 
119 
120  // Member Functions
121 
122  // Access
123 
124  // Region geometry
125 
126  //- Return the patch normal vectors
127  virtual const volVectorField& nHat() const;
128 
129  //- Return the face area magnitudes / [m2]
130  virtual const volScalarField& magSf() const;
131 
132 
133  // Addressing
134 
135  //- Return the list of patch IDs opposite to internally
136  // coupled patches
137  virtual const labelList& passivePatchIDs() const;
138 
139 
140  // Patch type information
141 
142  //- Return boundary types for mapped field patches
143  // Also maps internal field value
144  // Mapping region prescribed by underlying mapped poly patch
145  template<class Type>
147 
148  //- Return boundary types for pushed mapped field patches
149  // Mapping region prescribed by underlying mapped poly patch
150  template<class Type>
152 };
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace regionModels
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #ifdef NoRepository
164 #endif
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #endif
169 
170 // ************************************************************************* //
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.
labelList passivePatchIDs_
List of patch IDs opposite to internally coupled patches.
autoPtr< volScalarField > magSfPtr_
Face area magnitudes / [m2].
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
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.