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 Class 00025 Foam::fvSchemes 00026 00027 Description 00028 Selector class for finite volume differencing schemes. 00029 fvMesh is derived from fvShemes so that all fields have access to the 00030 fvSchemes from the mesh reference they hold. 00031 00032 SourceFiles 00033 fvSchemes.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef fvSchemes_H 00038 #define fvSchemes_H 00039 00040 #include <OpenFOAM/IOdictionary.H> 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 /*---------------------------------------------------------------------------*\ 00048 Class fvSchemes Declaration 00049 \*---------------------------------------------------------------------------*/ 00050 00051 class fvSchemes 00052 : 00053 public IOdictionary 00054 { 00055 // Private data 00056 00057 dictionary ddtSchemes_; 00058 ITstream defaultDdtScheme_; 00059 00060 dictionary d2dt2Schemes_; 00061 ITstream defaultD2dt2Scheme_; 00062 00063 dictionary interpolationSchemes_; 00064 ITstream defaultInterpolationScheme_; 00065 00066 dictionary divSchemes_; 00067 ITstream defaultDivScheme_; 00068 00069 dictionary gradSchemes_; 00070 ITstream defaultGradScheme_; 00071 00072 dictionary snGradSchemes_; 00073 ITstream defaultSnGradScheme_; 00074 00075 dictionary laplacianSchemes_; 00076 ITstream defaultLaplacianScheme_; 00077 00078 dictionary fluxRequired_; 00079 bool defaultFluxRequired_; 00080 00081 dictionary cacheFields_; 00082 00083 00084 // Private Member Functions 00085 00086 //- Clear the dictionaries and streams before reading 00087 void clear(); 00088 00089 //- Disallow default bitwise copy construct 00090 fvSchemes(const fvSchemes&); 00091 00092 //- Disallow default bitwise assignment 00093 void operator=(const fvSchemes&); 00094 00095 00096 public: 00097 00098 //- Debug switch 00099 static int debug; 00100 00101 00102 // Constructors 00103 00104 //- Construct for objectRegistry 00105 fvSchemes(const objectRegistry& obr); 00106 00107 00108 // Member Functions 00109 00110 // Access 00111 00112 const dictionary& schemesDict() const; 00113 00114 ITstream& ddtScheme(const word& name) const; 00115 00116 ITstream& d2dt2Scheme(const word& name) const; 00117 00118 ITstream& interpolationScheme(const word& name) const; 00119 00120 ITstream& divScheme(const word& name) const; 00121 00122 ITstream& gradScheme(const word& name) const; 00123 00124 ITstream& snGradScheme(const word& name) const; 00125 00126 ITstream& laplacianScheme(const word& name) const; 00127 00128 bool fluxRequired(const word& name) const; 00129 00130 bool cache(const word& name) const; 00131 00132 00133 // Read 00134 00135 //- Read the fvSchemes 00136 bool read(); 00137 }; 00138 00139 00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00141 00142 } // End namespace Foam 00143 00144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00145 00146 #endif 00147 00148 // ************************ vim: set sw=4 sts=4 et: ************************ //