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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2019-2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "fv.H"
31#include "volFields.H"
32#include "surfaceFields.H"
33
34// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
35
36template<class Type>
39(
40 const fvMesh& mesh,
41 const multivariateSurfaceInterpolationScheme<Type>::fieldTable& vtfs,
42 const surfaceScalarField&,
43 Istream&
44)
45:
46 mesh_(mesh),
47 fields_(vtfs)
48{}
49
50
51// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
52
53template<class Type>
56(
57 const fvMesh& mesh,
59 const surfaceScalarField& faceFlux,
60 Istream& schemeData
61)
62{
63 if (fv::debug)
64 {
66 << "Constructing surfaceInterpolationScheme<Type>" << endl;
67 }
68
69 const word schemeName(schemeData);
70
71 auto* ctorPtr = IstreamConstructorTable(schemeName);
72
73 if (!ctorPtr)
74 {
76 (
77 schemeData,
78 "discretisation",
79 schemeName,
80 *IstreamConstructorTablePtr_
81 ) << exit(FatalIOError);
82 }
83
84 return ctorPtr(mesh, vtfs, faceFlux, schemeData);
85}
86
87
88// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Abstract base class for multi-variate surface interpolation schemes.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
Definition: error.H:478
#define InfoInFunction
Report an information message using Foam::Info.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
IOerror FatalIOError
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::surfaceFields.