![]() |
|
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 motionDiff 00027 00028 Description 00029 Virtual base class for motion diffusion. 00030 00031 SourceFiles 00032 motionDiff.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef motionDiff_H 00037 #define motionDiff_H 00038 00039 #include "tetPolyMesh.H" 00040 #include "elementFieldsFwd.H" 00041 #include "tetDecompositionMotionSolver.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class motionDiff Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class motionDiff 00053 { 00054 private: 00055 00056 // Private data 00057 00058 //- Mesh reference 00059 const tetDecompositionMotionSolver& mSolver_; 00060 00061 public: 00062 00063 //- Runtime type information 00064 TypeName("motionDiff"); 00065 00066 00067 // Declare run-time constructor selection tables 00068 00069 declareRunTimeSelectionTable 00070 ( 00071 autoPtr, 00072 motionDiff, 00073 dictionary, 00074 ( 00075 const tetDecompositionMotionSolver& mSolver 00076 ), 00077 (mSolver) 00078 ); 00079 00080 00081 // Selectors 00082 00083 //- Select null constructed 00084 static autoPtr<motionDiff> New 00085 ( 00086 const tetDecompositionMotionSolver& mSolver 00087 ); 00088 00089 00090 // Constructors 00091 00092 //- Construct from components 00093 motionDiff(const tetDecompositionMotionSolver& mSolver) 00094 : 00095 mSolver_(mSolver) 00096 {} 00097 00098 00099 // Destructor 00100 00101 virtual ~motionDiff(); 00102 00103 00104 // Member Functions 00105 00106 //- Return reference to mesh 00107 const tetDecompositionMotionSolver& mSolver() const 00108 { 00109 return mSolver_; 00110 } 00111 00112 //- Return reference to mesh 00113 const tetPolyMesh& tetMesh() const 00114 { 00115 return mSolver_.tetMesh(); 00116 } 00117 00118 //- Return diffusivity field 00119 virtual const elementScalarField& gamma() const = 0; 00120 00121 00122 //- Correct the motion diffusivity 00123 virtual void correct() = 0; 00124 }; 00125 00126 00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00128 00129 } // End namespace Foam 00130 00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00132 00133 #endif 00134 00135 // ************************************************************************* //