multiDimPolyFunctions.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) 2020 DLR
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "multiDimPolyFunctions.H"
29 #include "error.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35  defineTypeNameAndDebug(multiDimPolyFunctions, 0);
36  defineRunTimeSelectionTable(multiDimPolyFunctions, word);
37 }
38 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
43 (
44  const word& multiDimPolyFunctionsType,
45  const labelVector& dirs
46 )
47 {
48  auto cstrIter = wordConstructorTablePtr_->cfind(multiDimPolyFunctionsType);
49 
50  if (!cstrIter.found())
51  {
53  (
54  "multiDimPolyFunction",
55  multiDimPolyFunctionsType,
56  *wordConstructorTablePtr_
57  ) << exit(FatalError);
58  }
59 
60  return autoPtr<multiDimPolyFunctions>(cstrIter()(dirs));
61 }
62 
63 
64 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
65 
67 :
68  nTerms_(-1),
69  geomDir_(dirs),
70  geomCorrection_(pos0(dirs.x()), pos0(dirs.y()), pos0(dirs.z())),
71  coeffs_(),
72  termValues_()
73 {}
74 
75 
76 // ************************************************************************* //
Foam::multiDimPolyFunctions::New
static autoPtr< multiDimPolyFunctions > New(const word &multiDimPolyFunctionsType, const labelVector &dirs)
Select a multiDimPolyFunctions.
Definition: multiDimPolyFunctions.C:43
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::defineRunTimeSelectionTable
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Foam::pos0
dimensionedScalar pos0(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:188
error.H
Foam::multiDimPolyFunctions::multiDimPolyFunctions
multiDimPolyFunctions(const labelVector &dirs)
Construct with directions.
Definition: multiDimPolyFunctions.C:66
Foam::FatalError
error FatalError
FatalErrorInLookup
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
Definition: error.H:385
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::autoPtr< Foam::multiDimPolyFunctions >
Foam::Vector< label >
x
x
Definition: LISASMDCalcMethod2.H:52
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
multiDimPolyFunctions.H
y
scalar y
Definition: LISASMDCalcMethod1.H:14