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

fixedNormalSlipPointPatchField.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::fixedNormalSlipPointPatchField
00026 
00027 Description
00028     slip with user-specified normal
00029 
00030 SourceFiles
00031     fixedNormalSlipPointPatchField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef fixedNormalSlipPointPatchField_H
00036 #define fixedNormalSlipPointPatchField_H
00037 
00038 #include <OpenFOAM/slipPointPatchField.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 // Forward declaration of friend functions and operators
00046 
00047 template<class Type>
00048 class fixedNormalSlipPointPatchField;
00049 
00050 template<class Type>
00051 Ostream& operator<<
00052 (
00053     Ostream&,
00054     const fixedNormalSlipPointPatchField<Type>&
00055 );
00056 
00057 
00058 /*---------------------------------------------------------------------------*\
00059                         Class fixedNormalSlipPointPatchField Declaration
00060 \*---------------------------------------------------------------------------*/
00061 
00062 template<class Type>
00063 class fixedNormalSlipPointPatchField
00064 :
00065     public slipPointPatchField<Type>
00066 {
00067     // Private data
00068 
00069         //- User specified normal
00070         vector n_;
00071 
00072 
00073 public:
00074 
00075     //- Runtime type information
00076     TypeName("fixedNormalSlip");
00077 
00078 
00079     // Constructors
00080 
00081         //- Construct from patch and internal field
00082         fixedNormalSlipPointPatchField
00083         (
00084             const pointPatch&,
00085             const DimensionedField<Type, pointMesh>&
00086         );
00087 
00088         //- Construct from patch, internal field and dictionary
00089         fixedNormalSlipPointPatchField
00090         (
00091             const pointPatch&,
00092             const DimensionedField<Type, pointMesh>&,
00093             const dictionary&
00094         );
00095 
00096         //- Construct by mapping given patchField<Type> onto a new patch
00097         fixedNormalSlipPointPatchField
00098         (
00099             const fixedNormalSlipPointPatchField<Type>&,
00100             const pointPatch&,
00101             const DimensionedField<Type, pointMesh>&,
00102             const pointPatchFieldMapper&
00103         );
00104 
00105         //- Construct and return a clone
00106         virtual autoPtr<pointPatchField<Type> > clone() const
00107         {
00108             return autoPtr<pointPatchField<Type> >
00109             (
00110                 new fixedNormalSlipPointPatchField<Type>
00111                 (
00112                     *this
00113                 )
00114             );
00115         }
00116 
00117         //- Construct as copy setting internal field reference
00118         fixedNormalSlipPointPatchField
00119         (
00120             const fixedNormalSlipPointPatchField<Type>&,
00121             const DimensionedField<Type, pointMesh>&
00122         );
00123 
00124         //- Construct and return a clone setting internal field reference
00125         virtual autoPtr<pointPatchField<Type> > clone
00126         (
00127             const DimensionedField<Type, pointMesh>& iF
00128         ) const
00129         {
00130             return autoPtr<pointPatchField<Type> >
00131             (
00132                 new fixedNormalSlipPointPatchField<Type>
00133                 (
00134                     *this,
00135                     iF
00136                 )
00137             );
00138         }
00139 
00140     // Member functions
00141 
00142         // Evaluation functions
00143 
00144             //- Update the patch field
00145             virtual void evaluate
00146             (
00147                 const Pstream::commsTypes commsType=Pstream::blocking
00148             );
00149 
00150 
00151         //- Write
00152         virtual void write(Ostream&) const;
00153 };
00154 
00155 
00156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00157 
00158 } // End namespace Foam
00159 
00160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00161 
00162 #ifdef NoRepository
00163 #    include "fixedNormalSlipPointPatchField.C"
00164 #endif
00165 
00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00167 
00168 #endif
00169 
00170 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines