|
|
|
magGrad.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 Foam::calcTypes::magGrad 00027 00028 Description 00029 Writes scalar fields corresponding to the magnitude ot the gradient 00030 of the supplied field (name) for each time. 00031 00032 SourceFiles 00033 magGrad.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef magGrad_H 00038 #define magGrad_H 00039 00040 #include "calcType.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 namespace calcTypes 00048 { 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class magGrad Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class magGrad 00055 : 00056 public calcType 00057 { 00058 // Private Member Functions 00059 00060 //- Disallow default bitwise copy construct 00061 magGrad(const magGrad&); 00062 00063 //- Disallow default bitwise assignment 00064 void operator=(const magGrad&); 00065 00066 00067 protected: 00068 00069 // Member Functions 00070 00071 // Calculation routines 00072 00073 //- Initialise - typically setting static variables, 00074 // e.g. command line arguments 00075 virtual void init(); 00076 00077 //- Pre-time loop calculations 00078 virtual void preCalc 00079 ( 00080 const argList& args, 00081 const Time& runTime, 00082 const fvMesh& mesh 00083 ); 00084 00085 //- Time loop calculations 00086 virtual void calc 00087 ( 00088 const argList& args, 00089 const Time& runTime, 00090 const fvMesh& mesh 00091 ); 00092 00093 00094 // I-O 00095 00096 //- Write magGrad fields 00097 template<class Type> 00098 void writeMagGradField 00099 ( 00100 const IOobject& header, 00101 const fvMesh& mesh, 00102 bool& processed 00103 ); 00104 00105 00106 public: 00107 00108 //- Runtime type information 00109 TypeName("magGrad"); 00110 00111 00112 // Constructors 00113 00114 //- Construct null 00115 magGrad(); 00116 00117 00118 // Destructor 00119 00120 virtual ~magGrad(); 00121 }; 00122 00123 00124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00125 00126 } // End namespace calcTypes 00127 } // End namespace Foam 00128 00129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00130 00131 #ifdef NoRepository 00132 # include "writeMagGradField.C" 00133 #endif 00134 00135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00136 00137 #endif 00138 00139 // ************************************************************************* // |