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::surfaceNormalFixedValueFvPatchVectorField
28 Describes a surface normal vector boundary condition by its magnitude.
29 Note: The value is positive for outward-pointing vectors
32 surfaceNormalFixedValueFvPatchVectorField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef surfaceNormalFixedValueFvPatchVectorField_H
37 #define surfaceNormalFixedValueFvPatchVectorField_H
39 #include "fvPatchFields.H"
40 #include "fixedValueFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class surfaceNormalFixedValueFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 class surfaceNormalFixedValueFvPatchVectorField
53 public fixedValueFvPatchVectorField
57 scalarField refValue_;
62 //- Runtime type information
63 TypeName("surfaceNormalFixedValue");
68 //- Construct from patch and internal field
69 surfaceNormalFixedValueFvPatchVectorField
72 const DimensionedField<vector, volMesh>&
75 //- Construct from patch, internal field and dictionary
76 surfaceNormalFixedValueFvPatchVectorField
79 const DimensionedField<vector, volMesh>&,
83 //- Construct by mapping given
84 // surfaceNormalFixedValueFvPatchVectorField
86 surfaceNormalFixedValueFvPatchVectorField
88 const surfaceNormalFixedValueFvPatchVectorField&,
90 const DimensionedField<vector, volMesh>&,
91 const fvPatchFieldMapper&
95 surfaceNormalFixedValueFvPatchVectorField
97 const surfaceNormalFixedValueFvPatchVectorField&
100 //- Construct and return a clone
101 virtual tmp<fvPatchVectorField> clone() const
103 return tmp<fvPatchVectorField>
105 new surfaceNormalFixedValueFvPatchVectorField(*this)
109 //- Construct as copy setting internal field reference
110 surfaceNormalFixedValueFvPatchVectorField
112 const surfaceNormalFixedValueFvPatchVectorField&,
113 const DimensionedField<vector, volMesh>&
116 //- Construct and return a clone setting internal field reference
117 virtual tmp<fvPatchVectorField> clone
119 const DimensionedField<vector, volMesh>& iF
122 return tmp<fvPatchVectorField>
124 new surfaceNormalFixedValueFvPatchVectorField
138 //- Map (and resize as needed) from self given a mapping object
141 const fvPatchFieldMapper&
144 //- Reverse map the given fvPatchField onto this fvPatchField
147 const fvPatchVectorField&,
153 virtual void write(Ostream&) const;
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace Foam
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 // ************************************************************************* //