![]() |
|
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 LimitFuncs 00027 00028 Description 00029 00030 Class to create NVD/TVD limited weighting-factors. 00031 The particular differencing scheme class is supplied as a template argument, 00032 the weight function of which is called by the weight function of this class 00033 for the internal faces as well as faces of coupled patches 00034 (e.g. processor-processor patches). The weight function is supplied the 00035 central-differencing weighting factor, the face-flux, the cell and face 00036 gradients (from which the normalised variable distribution may be created) 00037 and the cell centre distance. 00038 00039 This code organisation is both neat and efficient, allowing for convenient 00040 implementation of new schemes to run on parallelised cases. 00041 00042 SourceFiles 00043 LimitFuncs.C 00044 00045 \*---------------------------------------------------------------------------*/ 00046 00047 #ifndef LimitFuncs_H 00048 #define LimitFuncs_H 00049 00050 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00051 00052 namespace Foam 00053 { 00054 00055 namespace limitFuncs 00056 { 00057 00058 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00059 00060 template<class Type> 00061 class null 00062 { 00063 public: 00064 00065 null() 00066 {} 00067 00068 inline tmp<GeometricField<Type, fvPatchField, volMesh> > operator() 00069 ( 00070 const GeometricField<Type, fvPatchField, volMesh>& phi 00071 ) const 00072 { 00073 return phi; 00074 } 00075 }; 00076 00077 00078 template<class Type> 00079 class magSqr 00080 { 00081 public: 00082 00083 magSqr() 00084 {} 00085 00086 inline tmp<volScalarField> operator() 00087 ( 00088 const GeometricField<Type, fvPatchField, volMesh>& 00089 ) const; 00090 }; 00091 00092 00093 template<class Type> 00094 class rhoMagSqr 00095 { 00096 public: 00097 00098 rhoMagSqr() 00099 {} 00100 00101 inline tmp<volScalarField> operator() 00102 ( 00103 const GeometricField<Type, fvPatchField, volMesh>& 00104 ) const; 00105 }; 00106 00107 00108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00109 00110 } // End namespace limitFuncs 00111 } // End namespace Foam 00112 00113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00114 00115 #ifdef NoRepository 00116 # include "LimitFuncs.C" 00117 #endif 00118 00119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00120 00121 #endif 00122 00123 // ************************************************************************* //