|
|
|
quadraticFitSnGradData.HGo 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-2009 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 quadraticFitSnGradData 00027 00028 Description 00029 Data for the quadratic fit correction snGrad scheme 00030 00031 SourceFiles 00032 quadraticFitSnGradData.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef quadraticFitSnGradData_H 00037 #define quadraticFitSnGradData_H 00038 00039 #include "MeshObject.H" 00040 #include "fvMesh.H" 00041 #include "extendedCellToFaceStencil.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class quadraticFitSnGradData Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class quadraticFitSnGradData 00053 : 00054 public MeshObject<fvMesh, quadraticFitSnGradData> 00055 { 00056 // Private data 00057 00058 const scalar centralWeight_; 00059 const label dim_; 00060 00061 //- minimum stencil size 00062 const label minSize_; 00063 00064 //- Extended stencil addressing 00065 extendedCellToFaceStencil stencil_; 00066 00067 //- For each cell in the mesh store the values which multiply the 00068 // values of the stencil to obtain the gradient for each direction 00069 List<scalarList> fit_; 00070 00071 00072 // Private member functions 00073 00074 //- Find the normal direction and i, j and k directions for face faci 00075 static void findFaceDirs 00076 ( 00077 vector& idir, // value changed in return 00078 vector& jdir, // value changed in return 00079 vector& kdir, // value changed in return 00080 const fvMesh& mesh, 00081 const label faci 00082 ); 00083 00084 label calcFit(const List<point>&, const label faci); 00085 00086 00087 public: 00088 00089 TypeName("quadraticFitSnGradData"); 00090 00091 00092 // Constructors 00093 00094 explicit quadraticFitSnGradData 00095 ( 00096 const fvMesh& mesh, 00097 const scalar cWeight 00098 ); 00099 00100 00101 // Destructor 00102 00103 virtual ~quadraticFitSnGradData() 00104 {}; 00105 00106 00107 // Member functions 00108 00109 //- Return reference to the stencil 00110 const extendedCellToFaceStencil& stencil() const 00111 { 00112 return stencil_; 00113 } 00114 00115 //- Return reference to fit coefficients 00116 const List<scalarList>& fit() const { return fit_; } 00117 00118 //- Delete the data when the mesh moves not implemented 00119 virtual bool movePoints(); 00120 }; 00121 00122 00123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00124 00125 } // End namespace Foam 00126 00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00128 00129 #endif 00130 00131 // ************************************************************************* // |