1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::singleLayerRegion
28 Base class for single layer region models
33 \*---------------------------------------------------------------------------*/
35 #ifndef singleLayerRegion_H
36 #define singleLayerRegion_H
38 #include "regionModel.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace regionModels
47 /*---------------------------------------------------------------------------*\
48 Class singleLayerRegion Declaration
49 \*---------------------------------------------------------------------------*/
51 class singleLayerRegion
58 // Private Member Functions
60 //- Disallow default bitwise copy construct
61 singleLayerRegion(const singleLayerRegion&);
63 //- Disallow default bitwise assignment
64 void operator=(const singleLayerRegion&);
66 //- Construct region mesh and fields
67 void constructMeshObjects();
69 //- Initialise the region
79 //- Patch normal vectors
80 autoPtr<volVectorField> nHatPtr_;
82 //- Face area magnitudes / [m2]
83 autoPtr<volScalarField> magSfPtr_;
88 //- List of patch IDs opposite to internally coupled patches
89 labelList passivePatchIDs_;
92 // Protected member functions
94 //- Read control parameters from dictionary
100 //- Runtime type information
101 TypeName("regionModel");
107 singleLayerRegion(const fvMesh& mesh);
109 //- Construct from mesh, region type and name
113 const word& regionType,
114 const word& modelName,
115 bool readFields = true
120 virtual ~singleLayerRegion();
129 //- Return the patch normal vectors
130 virtual const volVectorField& nHat() const;
132 //- Return the face area magnitudes / [m2]
133 virtual const volScalarField& magSf() const;
138 //- Return the list of patch IDs opposite to internally
140 virtual const labelList& passivePatchIDs() const;
143 // Patch type information
145 //- Return boundary types for mapped field patches
146 // Also maps internal field value
147 // Mapping region prescribed by underlying mapped poly patch
149 wordList mappedFieldAndInternalPatchTypes() const;
151 //- Return boundary types for pushed mapped field patches
152 // Mapping region prescribed by underlying mapped poly patch
154 wordList mappedPushedFieldPatchTypes() const;
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 } // End namespace regionModels
161 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 #include "singleLayerRegionTemplates.C"
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 // ************************************************************************* //