programmer's documentation
mei_math_util.h
Go to the documentation of this file.
1 #ifndef __MEI_MATH_UTIL_H__
2 #define __MEI_MATH_UTIL_H__
3 
10 /*
11  This file is part of Code_Saturne, a general-purpose CFD tool.
12 
13  Copyright (C) 1998-2015 EDF S.A.
14 
15  This program is free software; you can redistribute it and/or modify it under
16  the terms of the GNU General Public License as published by the Free Software
17  Foundation; either version 2 of the License, or (at your option) any later
18  version.
19 
20  This program is distributed in the hope that it will be useful, but WITHOUT
21  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
23  details.
24 
25  You should have received a copy of the GNU General Public License along with
26  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
27  Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 */
29 
30 /*----------------------------------------------------------------------------*/
31 
32 /*----------------------------------------------------------------------------
33  * Fichiers `include' librairie standard C
34  *----------------------------------------------------------------------------*/
35 
36 #include <math.h>
37 
38 /*============================================================================
39  * Type definitions
40  *============================================================================*/
41 
42 /*----------------------------------------------------------------------------*/
46 /*----------------------------------------------------------------------------*/
47 
48 typedef struct {
49 
50  int ncols;
51  int nrows;
52  double **values;
53  char *name;
54  char *description;
57 
58 /*============================================================================
59  * Public function definitions
60  *============================================================================*/
61 
62 /*----------------------------------------------------------------------------
63  * Return an interpolated value.
64  *
65  * param [in] filename char
66  * param [in] c1 double
67  * param [in] c2 double
68  * param [in] x variable to interpolate
69  *
70  * return interpolated value
71  *----------------------------------------------------------------------------*/
72 
73 double
74 mei_interp1d(const char *filename,
75  int c1,
76  int c2,
77  double x);
78 
79 /*-----------------------------------------------------------------------------*/
80 /*
81  * Destroy all user data set for 1D interpolation.
82  */
83 /*-----------------------------------------------------------------------------*/
84 
85 void mei_data_free(void);
86 
87 /*-----------------------------------------------------------------------------*/
88 
89 #endif
void mei_data_free(void)
Destroy all user data set for 1D interpolation.
Definition: mei_math_util.c:512
char * name
Definition: mei_math_util.h:53
int ncols
Definition: mei_math_util.h:50
int nrows
Definition: mei_math_util.h:51
double precision, dimension(ncharm), save c2
Definition: cpincl.f90:226
double mei_interp1d(const char *filename, int c1, int c2, double x)
Return the 1D interpolation if a value.
Definition: mei_math_util.c:477
double ** values
Definition: mei_math_util.h:52
char * description
Definition: mei_math_util.h:54
Structure associated to a single user data set for 1D interpolation.
Definition: mei_math_util.h:48
double precision, dimension(ncharm), save c1
Definition: cpincl.f90:226