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