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

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