multivariateSurfaceInterpolationScheme.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Description
25  Abstract base class for surface interpolation schemes.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "fv.H"
31 #include "volFields.H"
32 #include "surfaceFields.H"
33 
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38 
39 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40 
41 //- Construct from face-flux field and coefficient
42 template<class Type>
45 (
46  const fvMesh& mesh,
47  const multivariateSurfaceInterpolationScheme<Type>::fieldTable& vtfs,
48  const surfaceScalarField&,
49  Istream&
50 )
51 :
52  mesh_(mesh),
53  fields_(vtfs)
54 {}
55 
56 
57 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
58 
59 // Return weighting factors for scheme given by name in dictionary
60 template<class Type>
61 tmp<multivariateSurfaceInterpolationScheme<Type> >
63 (
64  const fvMesh& mesh,
66  const surfaceScalarField& faceFlux,
67  Istream& schemeData
68 )
69 {
70  if (fv::debug)
71  {
72  Info<< "multivariateSurfaceInterpolationScheme<Type>::New"
73  "(const fvMesh& mesh, const fieldTable&, "
74  "const surfaceScalarField&, Istream&) : "
75  "constructing surfaceInterpolationScheme<Type>"
76  << endl;
77  }
78 
79  const word schemeName(schemeData);
80 
81  typename IstreamConstructorTable::iterator constructorIter =
82  IstreamConstructorTablePtr_->find(schemeName);
83 
84  if (constructorIter == IstreamConstructorTablePtr_->end())
85  {
87  (
88  schemeData
89  ) << "Unknown discretisation scheme " << schemeName << nl << nl
90  << "Valid schemes are :" << endl
91  << IstreamConstructorTablePtr_->sortedToc()
92  << exit(FatalIOError);
93  }
94 
95  return constructorIter()(mesh, vtfs, faceFlux, schemeData);
96 }
97 
98 
99 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
100 
101 template<class Type>
104 {}
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace Foam
110 
111 // ************************************************************************* //
volFields.H
Foam::multivariateSurfaceInterpolationScheme::multivariateSurfaceInterpolationScheme
multivariateSurfaceInterpolationScheme(const multivariateSurfaceInterpolationScheme &)
Disallow default bitwise copy construct.
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
fv.H
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
Foam::FatalIOError
IOerror FatalIOError
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
surfaceFields.H
Foam::surfaceFields.
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::Info
messageStream Info
Foam::multivariateSurfaceInterpolationScheme
Abstract base class for multi-variate surface interpolation schemes.
Definition: multivariateSurfaceInterpolationScheme.H:50
Foam::multivariateSurfaceInterpolationScheme::~multivariateSurfaceInterpolationScheme
virtual ~multivariateSurfaceInterpolationScheme()
Destructor.
Definition: multivariateSurfaceInterpolationScheme.C:103
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::multivariateSurfaceInterpolationScheme::New
static tmp< multivariateSurfaceInterpolationScheme< Type > > New(const fvMesh &mesh, const fieldTable &fields, const surfaceScalarField &faceFlux, Istream &schemeData)
Return a pointer to a new gradScheme created on freestore.
Definition: multivariateSurfaceInterpolationScheme.C:63
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
multivariateSurfaceInterpolationScheme.H
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:52
FatalIOErrorInFunction
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:330
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::multivariateSurfaceInterpolationScheme::fieldTable
fieldTable
Definition: multivariateSurfaceInterpolationScheme.H:58