OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

surfaceSlipDisplacementFvPatchField.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-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::surfaceSlipDisplacementFvPatchField
00027 
00028 Description
00029     fvPatchField corresponding to surfaceSlipDisplacementPointPatchField.
00030     Is just a slip type since all hard work (projection) is done in the
00031     pointPatch field.
00032 
00033 SourceFiles
00034     surfaceSlipDisplacementFvPatchField.C
00035 
00036 \*---------------------------------------------------------------------------*/
00037 
00038 #ifndef surfaceSlipDisplacementFvPatchField_H
00039 #define surfaceSlipDisplacementFvPatchField_H
00040 
00041 #include "slipFvPatchField.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                            Class surfaceSlipDisplacementFvPatch Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 template<class Type>
00053 class surfaceSlipDisplacementFvPatchField
00054 :
00055     public slipFvPatchField<Type>
00056 {
00057 
00058 public:
00059 
00060     //- Runtime type information
00061     TypeName("surfaceSlipDisplacement");
00062 
00063 
00064     // Constructors
00065 
00066         //- Construct from patch and internal field
00067         surfaceSlipDisplacementFvPatchField
00068         (
00069             const fvPatch& p,
00070             const DimensionedField<Type, volMesh>& iF
00071         )
00072         :
00073             slipFvPatchField<Type>(p, iF)
00074         {}
00075 
00076         //- Construct from patch, internal field and dictionary
00077         surfaceSlipDisplacementFvPatchField
00078         (
00079             const fvPatch& p,
00080             const DimensionedField<Type, volMesh>& iF,
00081             const dictionary& dict
00082         )
00083         :
00084             slipFvPatchField<Type>(p, iF, dict)
00085         {}
00086 
00087         //- Construct by mapping given surfaceSlipDisplacementFvPatchField
00088         //  onto a new patch
00089         surfaceSlipDisplacementFvPatchField
00090         (
00091             const surfaceSlipDisplacementFvPatchField<Type>& ptf,
00092             const fvPatch& p,
00093             const DimensionedField<Type, volMesh>& iF,
00094             const fvPatchFieldMapper& mapper
00095         )
00096         :
00097             slipFvPatchField<Type>(ptf, p, iF, mapper)
00098         {}
00099 
00100 
00101         //- Construct as copy
00102         surfaceSlipDisplacementFvPatchField
00103         (
00104             const surfaceSlipDisplacementFvPatchField<Type>& ptf
00105         )
00106         :
00107             slipFvPatchField<Type>(ptf)
00108         {}
00109 
00110         //- Construct and return a clone
00111         virtual tmp<fvPatchField<Type> > clone() const
00112         {
00113             return tmp<fvPatchField<Type> >
00114             (
00115                 new surfaceSlipDisplacementFvPatchField<Type>(*this)
00116             );
00117         }
00118 
00119         //- Construct as copy setting internal field reference
00120         surfaceSlipDisplacementFvPatchField
00121         (
00122             const surfaceSlipDisplacementFvPatchField<Type>& ptf,
00123             const DimensionedField<Type, volMesh>& iF
00124         )
00125         :
00126             slipFvPatchField<Type>(ptf, iF)
00127         {}
00128 
00129         //- Construct and return a clone setting internal field reference
00130         virtual tmp<fvPatchField<Type> > clone
00131         (
00132             const DimensionedField<Type, volMesh>& iF
00133         ) const
00134         {
00135             return tmp<fvPatchField<Type> >
00136             (
00137                 new surfaceSlipDisplacementFvPatchField<Type>(*this, iF)
00138             );
00139         }
00140 
00141         virtual void write(Ostream& os) const
00142         {
00143             slipFvPatchField<Type>::write(os);
00144             // Only so we can easily postprocess.
00145             this->writeEntry("value", os);
00146         }
00147 };
00148 
00149 
00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00151 
00152 } // End namespace Foam
00153 
00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00155 
00156 #endif
00157 
00158 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd