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

calcType.C

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 \*---------------------------------------------------------------------------*/
00025 
00026 #include <foamCalcFunctions/calcType.H>
00027 
00028 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
00029 
00030 defineTypeNameAndDebug(calcType, 0);
00031 
00032 defineRunTimeSelectionTable(calcType, dictionary);
00033 
00034 
00035 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00036 
00037 Foam::calcType::calcType()
00038 {}
00039 
00040 
00041 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
00042 
00043 Foam::calcType::~calcType()
00044 {}
00045 
00046 
00047 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
00048 
00049 void Foam::calcType::init()
00050 {
00051     // Do nothing
00052 }
00053 
00054 
00055 void Foam::calcType::preCalc
00056 (
00057     const argList& args,
00058     const Time& runTime,
00059     const fvMesh& mesh
00060 )
00061 {
00062     // Do nothing
00063 }
00064 
00065 
00066 void Foam::calcType::calc
00067 (
00068     const argList& args,
00069     const Time& runTime,
00070     const fvMesh& mesh
00071 )
00072 {
00073     // Do nothing
00074 }
00075 
00076 
00077 void Foam::calcType::postCalc
00078 (
00079     const argList& args,
00080     const Time& runTime,
00081     const fvMesh& mesh
00082 )
00083 {
00084     // Do nothing
00085 }
00086 
00087 
00088 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00089 
00090 void Foam::calcType::tryInit()
00091 {
00092     FatalIOError.throwExceptions();
00093 
00094     try
00095     {
00096         init();
00097     }
00098     catch(IOerror& err)
00099     {
00100         Warning<< err << endl;
00101     }
00102 }
00103 
00104 
00105 void Foam::calcType::tryPreCalc
00106 (
00107     const argList& args,
00108     const Time& runTime,
00109     const fvMesh& mesh
00110 )
00111 {
00112     FatalIOError.throwExceptions();
00113 
00114     try
00115     {
00116         preCalc(args, runTime, mesh);
00117     }
00118     catch(IOerror& err)
00119     {
00120         Warning<< err << endl;
00121     }
00122 }
00123 
00124 
00125 void Foam::calcType::tryCalc
00126 (
00127     const argList& args,
00128     const Time& runTime,
00129     const fvMesh& mesh
00130 )
00131 {
00132     FatalIOError.throwExceptions();
00133 
00134     try
00135     {
00136         calc(args, runTime, mesh);
00137     }
00138     catch(IOerror& err)
00139     {
00140         Warning<< err << endl;
00141     }
00142 }
00143 
00144 
00145 void Foam::calcType::tryPostCalc
00146 (
00147     const argList& args,
00148     const Time& runTime,
00149     const fvMesh& mesh
00150 )
00151 {
00152     FatalIOError.throwExceptions();
00153 
00154     try
00155     {
00156         postCalc(args, runTime, mesh);
00157     }
00158     catch(IOerror& err)
00159     {
00160         Warning<< err << endl;
00161     }
00162 }
00163 
00164 
00165 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines