OpenFOAM logo
Open Source CFD Toolkit

correctedSnGrad.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-2005 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     correctedSnGrad
00027 
00028 Description
00029     Simple central-difference snGrad scheme with non-orthogonal correction.
00030 
00031 SourceFiles
00032     correctedSnGrad.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef correctedSnGrad_H
00037 #define correctedSnGrad_H
00038 
00039 #include "snGradScheme.H"
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00047 
00048 namespace fv
00049 {
00050 
00051 /*---------------------------------------------------------------------------*\
00052                  Class correctedSnGrad Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 template<class Type>
00056 class correctedSnGrad
00057 :
00058     public snGradScheme<Type>
00059 {
00060     // Private Member Functions
00061 
00062         //- Disallow default bitwise assignment
00063         void operator=(const correctedSnGrad&);
00064 
00065 
00066 public:
00067 
00068     //- Runtime type information
00069     TypeName("corrected");
00070 
00071 
00072     // Constructors
00073 
00074         //- Construct from mesh
00075         correctedSnGrad(const fvMesh& mesh)
00076         :
00077             snGradScheme<Type>(mesh)
00078         {}
00079 
00080 
00081         //- Construct from mesh and data stream
00082         correctedSnGrad(const fvMesh& mesh, Istream&)
00083         :
00084             snGradScheme<Type>(mesh)
00085         {}
00086 
00087 
00088     // Destructor
00089 
00090         virtual ~correctedSnGrad();
00091 
00092 
00093     // Member Functions
00094 
00095         //- Return the interpolation weighting factors for the given field
00096         virtual tmp<surfaceScalarField> deltaCoeffs
00097         (
00098             const GeometricField<Type, fvPatchField, volMesh>&
00099         ) const
00100         {
00101             return this->mesh().deltaCoeffs();
00102         }
00103 
00104         //- Return true if this scheme uses an explicit correction
00105         virtual bool corrected() const
00106         {
00107             return !this->mesh().orthogonal();
00108         }
00109 
00110         //- Return the explicit correction to the correctedSnGrad
00111         //  for the given field
00112         virtual tmp<GeometricField<Type, fvPatchField, surfaceMesh> >
00113         correction(const GeometricField<Type, fvPatchField, volMesh>&) const;
00114 };
00115 
00116 
00117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00118 
00119 } // End namespace fv
00120 
00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00122 
00123 } // End namespace Foam
00124 
00125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00126 
00127 #ifdef NoRepository
00128 #   include "correctedSnGrad.C"
00129 #endif
00130 
00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00132 
00133 #endif
00134 
00135 // ************************************************************************* //
For further information go to www.openfoam.org