interpolateXY.H
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) 2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 InNamespace
28  Foam
29 
30 Description
31  Interpolates y values from one curve to another with a different x
32  distribution.
33 
34 SourceFiles
35  interpolateXY.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef interpolateXY_H
40 #define interpolateXY_H
41 
42 #include "scalar.H"
43 #include "primitiveFieldsFwd.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 template<class Type>
53 Field<Type> interpolateXY
54 (
55  const scalarField& xNew,
56  const scalarField& xOld,
57  const Field<Type>& yOld
58 );
59 
60 
61 template<class Type>
62 Type interpolateXY
63 (
64  const scalar x,
65  const UList<scalar>& xOld,
66  const UList<Type>& yOld
67 );
68 
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 } // End namespace Foam
73 
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75 
76 #ifdef NoRepository
77  #include "interpolateXY.C"
78 #endif
79 
80 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81 
82 #endif
83 
84 // ************************************************************************* //
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< Type > interpolateXY(const scalarField &xNew, const scalarField &xOld, const Field< Type > &yOld)
Definition: interpolateXY.C:34
Namespace for OpenFOAM.