![]() |
|
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 correctedLnGrad 00027 00028 Description 00029 Simple central-difference lnGrad scheme with non-orthogonal correction. 00030 00031 SourceFiles 00032 correctedLnGrad.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef correctedLnGrad_H 00037 #define correctedLnGrad_H 00038 00039 #include "lnGradScheme.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00047 00048 namespace fa 00049 { 00050 00051 /*---------------------------------------------------------------------------*\ 00052 Class correctedLnGrad Declaration 00053 \*---------------------------------------------------------------------------*/ 00054 00055 template<class Type> 00056 class correctedLnGrad 00057 : 00058 public lnGradScheme<Type> 00059 { 00060 // Private Member Functions 00061 00062 //- Disallow default bitwise assignment 00063 void operator=(const correctedLnGrad&); 00064 00065 00066 public: 00067 00068 //- Runtime type information 00069 TypeName("corrected"); 00070 00071 00072 // Constructors 00073 00074 //- Construct from mesh 00075 correctedLnGrad(const faMesh& mesh) 00076 : 00077 lnGradScheme<Type>(mesh) 00078 {} 00079 00080 00081 //- Construct from mesh and data stream 00082 correctedLnGrad(const faMesh& mesh, Istream&) 00083 : 00084 lnGradScheme<Type>(mesh) 00085 {} 00086 00087 00088 // Destructor 00089 00090 virtual ~correctedLnGrad(); 00091 00092 00093 // Member Functions 00094 00095 //- Return the interpolation weighting factors for the given field 00096 virtual tmp<edgeScalarField> deltaCoeffs 00097 ( 00098 const GeometricField<Type, faPatchField, areaMesh>& 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 correctedLnGrad 00111 // for the given field 00112 virtual tmp<GeometricField<Type, faPatchField, edgeMesh> > 00113 correction(const GeometricField<Type, faPatchField, areaMesh>&) const; 00114 }; 00115 00116 00117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00118 00119 } // End namespace fa 00120 00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00122 00123 } // End namespace Foam 00124 00125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00126 00127 #ifdef NoRepository 00128 # include "correctedLnGrad.C" 00129 #endif 00130 00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00132 00133 #endif 00134 00135 // ************************************************************************* //