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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::regionModels::singleLayerRegion
28 
29 Description
30  Base class for single layer region models
31 
32 SourceFiles
33  singleLayerRegion.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef singleLayerRegion_H
38 #define singleLayerRegion_H
39 
40 #include "regionModel.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace regionModels
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class singleLayerRegion Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public regionModel
56 {
57  // Private Member Functions
58 
59  //- No copy construct
60  singleLayerRegion(const singleLayerRegion&) = delete;
61 
62  //- No copy assignment
63  void operator=(const singleLayerRegion&) = delete;
64 
65  //- Construct region mesh and fields
66  void constructMeshObjects();
67 
68  //- Initialise the region
69  void initialise();
70 
71 
72 protected:
73 
74  // Protected data
75 
76  // Region addressing
77 
78  //- Patch normal vectors
80 
81  //- Face area magnitudes / [m2]
83 
84 
85  // Addressing
86 
87  //- List of patch IDs opposite to internally coupled patches
89 
90 
91  // Protected member functions
92 
93  //- Read control parameters from dictionary
94  virtual bool read();
95 
96 
97 public:
98 
99  //- Runtime type information
100  TypeName("regionModel");
101 
102 
103  // Constructors
104 
105  //- Construct null
106  singleLayerRegion(const fvMesh& mesh, const word& regionType);
107 
108  //- Construct from mesh, region type and name
110  (
111  const fvMesh& mesh,
112  const word& regionType,
113  const word& modelName,
114  bool readFields = true
115  );
116 
117 
118  //- Destructor
119  virtual ~singleLayerRegion();
120 
121 
122  // Member Functions
123 
124  // Access
125 
126  // Region geometry
127 
128  //- Return the patch normal vectors
129  virtual const volVectorField& nHat() const;
130 
131  //- Return the face area magnitudes / [m2]
132  virtual const volScalarField& magSf() const;
133 
134 
135  // Addressing
136 
137  //- Return the list of patch IDs opposite to internally
138  // coupled patches
139  virtual const labelList& passivePatchIDs() const;
140 
141 
142  // Patch type information
143 
144  //- Return boundary types for mapped field patches
145  // Also maps internal field value
146  // Mapping region prescribed by underlying mapped poly patch
147  template<class Type>
149 
150  //- Return boundary types for pushed mapped field patches
151  // Mapping region prescribed by underlying mapped poly patch
152  template<class Type>
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace regionModels
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #ifdef NoRepository
166 #endif
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
Foam::regionModels::singleLayerRegion::passivePatchIDs
virtual const labelList & passivePatchIDs() const
Return the list of patch IDs opposite to internally.
Definition: singleLayerRegion.C:237
Foam::regionModels::singleLayerRegion
Base class for single layer region models.
Definition: singleLayerRegion.H:52
Foam::regionModels::singleLayerRegion::mappedFieldAndInternalPatchTypes
wordList mappedFieldAndInternalPatchTypes() const
Return boundary types for mapped field patches.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::regionModels::singleLayerRegion::~singleLayerRegion
virtual ~singleLayerRegion()
Destructor.
Definition: singleLayerRegion.C:204
regionModel.H
Foam::regionModels::singleLayerRegion::TypeName
TypeName("regionModel")
Runtime type information.
Foam::regionModels::regionModel::modelName
const word & modelName() const
Return the model name.
Definition: regionModelI.H:58
Foam::regionModels::regionModel
Base class for region models.
Definition: regionModel.H:60
singleLayerRegionTemplates.C
Foam::regionModels::singleLayerRegion::magSfPtr_
autoPtr< volScalarField > magSfPtr_
Face area magnitudes / [m2].
Definition: singleLayerRegion.H:81
Foam::regionModels::singleLayerRegion::magSf
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
Definition: singleLayerRegion.C:223
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::regionModels::singleLayerRegion::mappedPushedFieldPatchTypes
wordList mappedPushedFieldPatchTypes() const
Return boundary types for pushed mapped field patches.
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::regionModels::singleLayerRegion::passivePatchIDs_
labelList passivePatchIDs_
List of patch IDs opposite to internally coupled patches.
Definition: singleLayerRegion.H:87
Foam::readFields
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
Definition: ReadFieldsTemplates.C:312
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::List< label >
Foam::regionModels::singleLayerRegion::nHatPtr_
autoPtr< volVectorField > nHatPtr_
Patch normal vectors.
Definition: singleLayerRegion.H:78
Foam::regionModels::singleLayerRegion::nHat
virtual const volVectorField & nHat() const
Return the patch normal vectors.
Definition: singleLayerRegion.C:210
Foam::GeometricField< vector, fvPatchField, volMesh >
Foam::regionModels::singleLayerRegion::read
virtual bool read()
Read control parameters from dictionary.
Definition: singleLayerRegion.C:155