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

multivariateSurfaceInterpolationScheme.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 Description
00026     Abstract base class for surface interpolation schemes.
00027 
00028 \*---------------------------------------------------------------------------*/
00029 
00030 #include "fv.H"
00031 #include "multivariateSurfaceInterpolationScheme.H"
00032 #include "volFields.H"
00033 #include "surfaceFields.H"
00034 
00035 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00036 
00037 namespace Foam
00038 {
00039 
00040 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00041 
00042 //- Construct from face-flux field and coefficient
00043 template<class Type>
00044 multivariateSurfaceInterpolationScheme<Type>::
00045 multivariateSurfaceInterpolationScheme
00046 (
00047     const fvMesh& mesh,
00048     const multivariateSurfaceInterpolationScheme<Type>::fieldTable& vtfs,
00049     const surfaceScalarField&,
00050     Istream&
00051 )
00052 :
00053     mesh_(mesh),
00054     fields_(vtfs)
00055 {}
00056 
00057 
00058 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
00059 
00060 // Return weighting factors for scheme given by name in dictionary
00061 template<class Type>
00062 tmp<multivariateSurfaceInterpolationScheme<Type> >
00063 multivariateSurfaceInterpolationScheme<Type>::New
00064 (
00065     const fvMesh& mesh,
00066     const multivariateSurfaceInterpolationScheme<Type>::fieldTable& vtfs,
00067     const surfaceScalarField& faceFlux,
00068     Istream& schemeData
00069 )
00070 {
00071     if (fv::debug)
00072     {
00073         Info<< "multivariateSurfaceInterpolationScheme<Type>::New"
00074                "(const fvMesh& mesh, const fieldTable&, "
00075                "const surfaceScalarField&, Istream&) : "
00076                "constructing surfaceInterpolationScheme<Type>"
00077             << endl;
00078     }
00079 
00080     word schemeName(schemeData);
00081 
00082     typename IstreamConstructorTable::iterator constructorIter =
00083         IstreamConstructorTablePtr_->find(schemeName);
00084 
00085     if (constructorIter == IstreamConstructorTablePtr_->end())
00086     {
00087         FatalIOErrorIn
00088         (
00089             "multivariateSurfaceInterpolationScheme<Type>::New"
00090             "(const fvMesh& mesh, const fieldTable&, "
00091             "const surfaceScalarField&, Istream&)",
00092             schemeData
00093         )   << "unknown discretisation scheme " << schemeName << endl << endl
00094             << "Valid schemes are :" << endl
00095             << IstreamConstructorTablePtr_->toc()
00096             << exit(FatalIOError);
00097     }
00098 
00099     return constructorIter()(mesh, vtfs, faceFlux, schemeData);
00100 }
00101 
00102 
00103 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
00104 
00105 template<class Type>
00106 multivariateSurfaceInterpolationScheme<Type>::
00107 ~multivariateSurfaceInterpolationScheme()
00108 {}
00109 
00110 
00111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00112 
00113 } // End namespace Foam
00114 
00115 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd