FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

div.H

Go 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-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::calcTypes::div
00026 
00027 Description
00028     Writes scalar fields corresponding to the divergence of the supplied
00029     field (name) for each time.
00030 
00031 SourceFiles
00032     div.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef div_H
00037 #define div_H
00038 
00039 #include <foamCalcFunctions/calcType.H>
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 namespace calcTypes
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050                           Class div Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class div
00054 :
00055     public calcType
00056 {
00057     // Private Member Functions
00058 
00059         //- Disallow default bitwise copy construct
00060         div(const div&);
00061 
00062         //- Disallow default bitwise assignment
00063         void operator=(const div&);
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 div fields
00096             template<class Type>
00097             void writeDivField
00098             (
00099                 const IOobject& header,
00100                 const fvMesh& mesh,
00101                 bool& processed
00102             );
00103 
00104 
00105 public:
00106 
00107     //- Runtime type information
00108     TypeName("div");
00109 
00110 
00111     // Constructors
00112 
00113         //- Construct null
00114         div();
00115 
00116 
00117     // Destructor
00118 
00119         virtual ~div();
00120 };
00121 
00122 
00123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00124 
00125 } // End namespace calcTypes
00126 } // End namespace Foam
00127 
00128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00129 
00130 #ifdef NoRepository
00131 #   include <foamCalcFunctions/writeDivField.C>
00132 #endif
00133 
00134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00135 
00136 #endif
00137 
00138 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines