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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::regionModels::singleLayerRegion
28
29Description
30 Base class for single layer region models
31
32SourceFiles
33 singleLayerRegion.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef singleLayerRegion_H
38#define singleLayerRegion_H
39
40#include "regionModel.H"
41
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44namespace Foam
45{
46namespace regionModels
47{
48
49/*---------------------------------------------------------------------------*\
50 Class singleLayerRegion Declaration
51\*---------------------------------------------------------------------------*/
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
72protected:
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
97public:
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// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Base class for region models.
Definition: regionModel.H:63
const word & modelName() const
Return the model name.
Definition: regionModelI.H:58
Base class for single layer region models.
autoPtr< volVectorField > nHatPtr_
Patch normal vectors.
wordList mappedFieldAndInternalPatchTypes() const
Return boundary types for mapped field patches.
TypeName("regionModel")
Runtime type information.
virtual const labelList & passivePatchIDs() const
Return the list of patch IDs opposite to internally.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
labelList passivePatchIDs_
List of patch IDs opposite to internally coupled patches.
virtual const volVectorField & nHat() const
Return the patch normal vectors.
wordList mappedPushedFieldPatchTypes() const
Return boundary types for pushed mapped field patches.
autoPtr< volScalarField > magSfPtr_
Face area magnitudes / [m2].
virtual bool read()
Read control parameters from dictionary.
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
Namespace for OpenFOAM.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73