My Project
programmer's documentation
cs_medcoupling_remapper.hxx
Go to the documentation of this file.
1 #ifndef __CS_MEDCOUPLING_REMAPPER_HXX__
2 #define __CS_MEDCOUPLING_REMAPPER_HXX__
3 
4 /*============================================================================
5  * Interpolation using MEDCoupling Remapper.
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2019 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 /*----------------------------------------------------------------------------
31  * Standard C library headers
32  *----------------------------------------------------------------------------*/
33 
34 /*----------------------------------------------------------------------------
35  * MED library headers
36  *----------------------------------------------------------------------------*/
37 
39 
40 #if defined(HAVE_MEDCOUPLING_LOADER)
41 
42 /*----------------------------------------------------------------------------
43  * Local headers
44  *----------------------------------------------------------------------------*/
45 
46 #include "cs_base.h"
47 
48 /*----------------------------------------------------------------------------*/
49 
50 /*============================================================================
51  * Structure definitions
52  *============================================================================*/
53 
54 typedef struct _cs_medcoupling_remapper_t cs_medcoupling_remapper_t;
55 
56 /*============================================================================
57  * Public C function prototypes
58  *============================================================================*/
59 
60 /*----------------------------------------------------------------------------*/
68 /*----------------------------------------------------------------------------*/
69 
70 cs_medcoupling_remapper_t *
71 cs_medcoupling_remapper_by_id(int r_id);
72 
73 /* -------------------------------------------------------------------------- */
81 /*----------------------------------------------------------------------------*/
82 
83 cs_medcoupling_remapper_t *
84 cs_medcoupling_remapper_by_name_try(const char *name);
85 
86 /*----------------------------------------------------------------------------*/
101 /*----------------------------------------------------------------------------*/
102 
103 int
104 cs_medcoupling_remapper_initialize(const char *name,
105  int elt_dim,
106  const char *select_criteria,
107  const char *medfile_path,
108  int n_fields,
109  const char **field_names,
110  int iteration,
111  int order);
112 
113 /*----------------------------------------------------------------------------*/
121 /*----------------------------------------------------------------------------*/
122 
123 void
124 cs_medcoupling_remapper_set_iteration(cs_medcoupling_remapper_t *r,
125  int iteration,
126  int order);
127 
128 /*----------------------------------------------------------------------------*/
135 /*----------------------------------------------------------------------------*/
136 
137 void
138 cs_medcoupling_remapper_setup(cs_medcoupling_remapper_t *r);
139 
140 /*----------------------------------------------------------------------------*/
151 /*----------------------------------------------------------------------------*/
152 
153 cs_real_t *
154 cs_medcoupling_remapper_copy_values(cs_medcoupling_remapper_t *r,
155  int field_id,
156  double default_val);
157 
158 /*----------------------------------------------------------------------------*/
165 /*----------------------------------------------------------------------------*/
166 
167 void
168 cs_medcoupling_remapper_translate(cs_medcoupling_remapper_t *r,
169  cs_real_t translation[3]);
170 
171 /*----------------------------------------------------------------------------*/
180 /*----------------------------------------------------------------------------*/
181 
182 void
183 cs_medcoupling_remapper_rotate(cs_medcoupling_remapper_t *r,
184  cs_real_t invariant[3],
185  cs_real_t axis[3],
186  cs_real_t angle);
187 
188 /*----------------------------------------------------------------------------*/
201 /*----------------------------------------------------------------------------*/
202 
203 void
204 cs_medcoupling_remapper_find_time_index(cs_medcoupling_remapper_t *r,
205  cs_real_t t,
206  int *id1,
207  int *id2);
208 
209 /*----------------------------------------------------------------------------*/
221 /*----------------------------------------------------------------------------*/
222 void
223 cs_medcoupling_remapper_get_time_from_index(cs_medcoupling_remapper_t *r,
224  int id,
225  cs_real_t *t);
226 
227 /*----------------------------------------------------------------------------*/
240 /*----------------------------------------------------------------------------*/
241 
242 void
243 cs_medcoupling_remapper_get_iter_order_from_index(cs_medcoupling_remapper_t *r,
244  int id,
245  int *it,
246  int *order);
247 
248 /*----------------------------------------------------------------------------*/
254 /*----------------------------------------------------------------------------*/
255 
256 void
257 cs_medcoupling_remapper_update_time_value(cs_medcoupling_remapper_t *r,
258  int id);
259 /*----------------------------------------------------------------------------*/
263 /*----------------------------------------------------------------------------*/
264 
265 void
266 cs_medcoupling_remapper_destroy_all(void);
267 
268 /*----------------------------------------------------------------------------*/
269 
271 
272 #endif /* MEDCOUPLING_LOADER */
273 
274 #endif /* __CS_MEDCOUPLING_REMAPPER_HXX__ */
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
t
Definition: cs_field_pointer.h:98
cs_base.h