singleLayerRegion.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2013 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::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 
56 private:
57 
58  // Private Member Functions
59 
60  //- Disallow default bitwise copy construct
62 
63  //- Disallow default bitwise assignment
64  void operator=(const singleLayerRegion&);
65 
66  //- Construct region mesh and fields
67  void constructMeshObjects();
68 
69  //- Initialise the region
70  void initialise();
71 
72 
73 protected:
74 
75  // Protected data
76 
77  // Region addressing
78 
79  //- Patch normal vectors
81 
82  //- Face area magnitudes / [m2]
84 
85 
86  // Addressing
87 
88  //- List of patch IDs opposite to internally coupled patches
90 
91 
92  // Protected member functions
93 
94  //- Read control parameters from dictionary
95  virtual bool read();
96 
97 
98 public:
99 
100  //- Runtime type information
101  TypeName("regionModel");
102 
103 
104  // Constructors
105 
106  //- Construct null
107  singleLayerRegion(const fvMesh& mesh, const word& regionType);
108 
109  //- Construct from mesh, region type and name
111  (
112  const fvMesh& mesh,
113  const word& regionType,
114  const word& modelName,
115  bool readFields = true
116  );
117 
118 
119  //- Destructor
120  virtual ~singleLayerRegion();
121 
122 
123  // Member Functions
124 
125  // Access
126 
127  // Region geometry
128 
129  //- Return the patch normal vectors
130  virtual const volVectorField& nHat() const;
131 
132  //- Return the face area magnitudes / [m2]
133  virtual const volScalarField& magSf() const;
134 
135 
136  // Addressing
137 
138  //- Return the list of patch IDs opposite to internally
139  // coupled patches
140  virtual const labelList& passivePatchIDs() const;
141 
142 
143  // Patch type information
144 
145  //- Return boundary types for mapped field patches
146  // Also maps internal field value
147  // Mapping region prescribed by underlying mapped poly patch
148  template<class Type>
150 
151  //- Return boundary types for pushed mapped field patches
152  // Mapping region prescribed by underlying mapped poly patch
153  template<class Type>
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 // ************************************************************************* //
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
wordList mappedPushedFieldPatchTypes() const
Return boundary types for pushed mapped field patches.
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
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
const word & modelName() const
Return the model name.
Definition: regionModelI.H:55
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].
wordList mappedFieldAndInternalPatchTypes() const
Return boundary types for mapped field patches.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
autoPtr< volVectorField > nHatPtr_
Patch normal vectors.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
virtual const labelList & passivePatchIDs() const
Return the list of patch IDs opposite to internally.
TypeName("regionModel")
Runtime type information.
Namespace for OpenFOAM.
virtual bool read()
Read control parameters from dictionary.