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