8.3
general documentation
cs_medcoupling_remapper.h
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-2024 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/*============================================================================
41 * Structure definitions
42 *============================================================================*/
43
44typedef struct _cs_medcoupling_remapper_t cs_medcoupling_remapper_t;
45
46/*============================================================================
47 * Public C function prototypes
48 *============================================================================*/
49
50/*----------------------------------------------------------------------------*/
58/*----------------------------------------------------------------------------*/
59
62
63/* -------------------------------------------------------------------------- */
71/*----------------------------------------------------------------------------*/
72
75
76/*----------------------------------------------------------------------------*/
91/*----------------------------------------------------------------------------*/
92
93int
95 int elt_dim,
96 const char *select_criteria,
97 const char *medfile_path,
98 int n_fields,
99 const char **field_names,
100 int iteration,
101 int order);
102
103/*----------------------------------------------------------------------------*/
111/*----------------------------------------------------------------------------*/
112
113void
115 int iteration,
116 int order);
117
118/*----------------------------------------------------------------------------*/
132/*----------------------------------------------------------------------------*/
133
134void
136 const char key[],
137 const char value[]);
138
139/*----------------------------------------------------------------------------*/
145/*----------------------------------------------------------------------------*/
146
147void
149
150/*----------------------------------------------------------------------------*/
162/*----------------------------------------------------------------------------*/
163
164cs_real_t *
166 int field_id,
167 double default_val);
168
169/*----------------------------------------------------------------------------*/
176/*----------------------------------------------------------------------------*/
177
178void
180 cs_real_t translation[3]);
181
182/*----------------------------------------------------------------------------*/
191/*----------------------------------------------------------------------------*/
192
193void
195 cs_real_t invariant[3],
196 cs_real_t axis[3],
197 cs_real_t angle);
198
199/*----------------------------------------------------------------------------*/
212/*----------------------------------------------------------------------------*/
213
214void
216 cs_real_t t,
217 int *id1,
218 int *id2);
219
220/*----------------------------------------------------------------------------*/
232/*----------------------------------------------------------------------------*/
233
234void
236 int id,
237 cs_real_t *t);
238
239/*----------------------------------------------------------------------------*/
252/*----------------------------------------------------------------------------*/
253
254void
256 int id,
257 int *it,
258 int *order);
259
260/*----------------------------------------------------------------------------*/
266/*----------------------------------------------------------------------------*/
267
268void
270 int id);
271/*----------------------------------------------------------------------------*/
275/*----------------------------------------------------------------------------*/
276
277void
279
280/*----------------------------------------------------------------------------*/
281
283
284#endif /* __CS_MEDCOUPLING_REMAPPER_HXX__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
@ t
Definition: cs_field_pointer.h:94
void cs_medcoupling_remapper_update_time_value(cs_medcoupling_remapper_t *r, int id)
Load the time value corresponding to id.
Definition: cs_medcoupling_remapper.cxx:1064
cs_real_t * cs_medcoupling_remapper_copy_values(cs_medcoupling_remapper_t *r, int field_id, double default_val)
Interpolate values for a given field.
Definition: cs_medcoupling_remapper.cxx:862
void cs_medcoupling_remapper_find_time_index(cs_medcoupling_remapper_t *r, cs_real_t t, int *id1, int *id2)
Retrieve the two closest time steps indexes.
Definition: cs_medcoupling_remapper.cxx:951
struct _cs_medcoupling_remapper_t cs_medcoupling_remapper_t
Definition: cs_medcoupling_remapper.h:44
void cs_medcoupling_remapper_destroy_all(void)
Destroy all remappers.
Definition: cs_medcoupling_remapper.cxx:1047
int cs_medcoupling_remapper_initialize(const char *name, int elt_dim, const char *select_criteria, const char *medfile_path, int n_fields, const char **field_names, int iteration, int order)
initialize a remapper based on a set of given arguments
Definition: cs_medcoupling_remapper.cxx:685
void cs_medcoupling_remapper_rotate(cs_medcoupling_remapper_t *r, cs_real_t invariant[3], cs_real_t axis[3], cs_real_t angle)
Rotate the mesh using a center point, axis and angle.
Definition: cs_medcoupling_remapper.cxx:919
void cs_medcoupling_remapper_get_time_from_index(cs_medcoupling_remapper_t *r, int id, cs_real_t *t)
Retrieve the two closest time steps indexes.
Definition: cs_medcoupling_remapper.cxx:996
void cs_medcoupling_remapper_set_options(cs_medcoupling_remapper_t *r, const char key[], const char value[])
set non-default options for a remapper
Definition: cs_medcoupling_remapper.cxx:760
cs_medcoupling_remapper_t * cs_medcoupling_remapper_by_id(int r_id)
get a remapper by its id
Definition: cs_medcoupling_remapper.cxx:619
void cs_medcoupling_remapper_translate(cs_medcoupling_remapper_t *r, cs_real_t translation[3])
translate the mesh using a given vector
Definition: cs_medcoupling_remapper.cxx:893
void cs_medcoupling_remapper_set_iteration(cs_medcoupling_remapper_t *r, int iteration, int order)
set and load a given time iteration from the MED file
Definition: cs_medcoupling_remapper.cxx:725
void cs_medcoupling_remapper_get_iter_order_from_index(cs_medcoupling_remapper_t *r, int id, int *it, int *order)
Retrieve the two closest time steps indexes.
Definition: cs_medcoupling_remapper.cxx:1025
cs_medcoupling_remapper_t * cs_medcoupling_remapper_by_name_try(const char *name)
get a remapper by its name
Definition: cs_medcoupling_remapper.cxx:646
void cs_medcoupling_remapper_setup(cs_medcoupling_remapper_t *r)
update the interpolation matrix of the remapper
Definition: cs_medcoupling_remapper.cxx:822