OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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