FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

surfaceNormalFixedValueFvPatchVectorField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::surfaceNormalFixedValueFvPatchVectorField
00026 
00027 Description
00028     Describes a surface normal vector boundary condition by its magnitude.
00029     Note: The value is positive for outward-pointing vectors
00030 
00031 SourceFiles
00032     surfaceNormalFixedValueFvPatchVectorField.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef surfaceNormalFixedValueFvPatchVectorField_H
00037 #define surfaceNormalFixedValueFvPatchVectorField_H
00038 
00039 #include <finiteVolume/fvPatchFields.H>
00040 #include <finiteVolume/fixedValueFvPatchFields.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                  Class surfaceNormalFixedValueFvPatch Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 class surfaceNormalFixedValueFvPatchVectorField
00052 :
00053     public fixedValueFvPatchVectorField
00054 {
00055     // Private data
00056     
00057         scalarField refValue_;
00058 
00059 
00060 public:
00061 
00062     //- Runtime type information
00063     TypeName("surfaceNormalFixedValue");
00064 
00065 
00066     // Constructors
00067 
00068         //- Construct from patch and internal field
00069         surfaceNormalFixedValueFvPatchVectorField
00070         (
00071             const fvPatch&,
00072             const DimensionedField<vector, volMesh>&
00073         );
00074 
00075         //- Construct from patch, internal field and dictionary
00076         surfaceNormalFixedValueFvPatchVectorField
00077         (
00078             const fvPatch&,
00079             const DimensionedField<vector, volMesh>&,
00080             const dictionary&
00081         );
00082 
00083         //- Construct by mapping given
00084         //  surfaceNormalFixedValueFvPatchVectorField
00085         //  onto a new patch
00086         surfaceNormalFixedValueFvPatchVectorField
00087         (
00088             const surfaceNormalFixedValueFvPatchVectorField&,
00089             const fvPatch&,
00090             const DimensionedField<vector, volMesh>&,
00091             const fvPatchFieldMapper&
00092         );
00093 
00094         //- Construct as copy
00095         surfaceNormalFixedValueFvPatchVectorField
00096         (
00097             const surfaceNormalFixedValueFvPatchVectorField&
00098         );
00099 
00100         //- Construct and return a clone
00101         virtual tmp<fvPatchVectorField> clone() const
00102         {
00103             return tmp<fvPatchVectorField>
00104             (
00105                 new surfaceNormalFixedValueFvPatchVectorField(*this)
00106             );
00107         }
00108 
00109         //- Construct as copy setting internal field reference
00110         surfaceNormalFixedValueFvPatchVectorField
00111         (
00112             const surfaceNormalFixedValueFvPatchVectorField&,
00113             const DimensionedField<vector, volMesh>&
00114         );
00115 
00116         //- Construct and return a clone setting internal field reference
00117         virtual tmp<fvPatchVectorField> clone
00118         (
00119             const DimensionedField<vector, volMesh>& iF
00120         ) const
00121         {
00122             return tmp<fvPatchVectorField>
00123             (
00124                 new surfaceNormalFixedValueFvPatchVectorField
00125                 (
00126                     *this,
00127                     iF
00128                 )
00129             );
00130         }
00131 
00132 
00133 
00134     // Member functions
00135 
00136         // Mapping functions
00137 
00138             //- Map (and resize as needed) from self given a mapping object
00139             virtual void autoMap
00140             (
00141                 const fvPatchFieldMapper&
00142             );
00143 
00144             //- Reverse map the given fvPatchField onto this fvPatchField
00145             virtual void rmap
00146             (
00147                 const fvPatchVectorField&,
00148                 const labelList&
00149             );
00150 
00151 
00152         //- Write
00153         virtual void write(Ostream&) const;
00154 };
00155 
00156 
00157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00158 
00159 } // End namespace Foam
00160 
00161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00162 
00163 #endif
00164 
00165 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines