9.2
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-2026 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 library headers
32 *----------------------------------------------------------------------------*/
33
34/*----------------------------------------------------------------------------
35 * MED library headers
36 *----------------------------------------------------------------------------*/
37
38/*============================================================================
39 * Structure definitions
40 *============================================================================*/
41
42typedef struct _cs_medcoupling_remapper_t cs_medcoupling_remapper_t;
43
44/*============================================================================
45 * Public function prototypes
46 *============================================================================*/
47
48/*----------------------------------------------------------------------------*/
56/*----------------------------------------------------------------------------*/
57
60
61/* -------------------------------------------------------------------------- */
69/*----------------------------------------------------------------------------*/
70
73
74/*----------------------------------------------------------------------------*/
89/*----------------------------------------------------------------------------*/
90
91int
93 int elt_dim,
94 const char *select_criteria,
95 const char *medfile_path,
96 int n_fields,
97 const char **field_names,
98 int iteration,
99 int order);
100
101/*----------------------------------------------------------------------------*/
109/*----------------------------------------------------------------------------*/
110
111void
113 int iteration,
114 int order);
115
116/*----------------------------------------------------------------------------*/
130/*----------------------------------------------------------------------------*/
131
132void
134 const char key[],
135 const char value[]);
136
137/*----------------------------------------------------------------------------*/
143/*----------------------------------------------------------------------------*/
144
145void
147
148/*----------------------------------------------------------------------------*/
160/*----------------------------------------------------------------------------*/
161
162cs_real_t *
164 int field_id,
165 double default_val);
166
167/*----------------------------------------------------------------------------*/
174/*----------------------------------------------------------------------------*/
175
176void
178 cs_real_t translation[3]);
179
180/*----------------------------------------------------------------------------*/
189/*----------------------------------------------------------------------------*/
190
191void
193 cs_real_t invariant[3],
194 cs_real_t axis[3],
195 cs_real_t angle);
196
197/*----------------------------------------------------------------------------*/
210/*----------------------------------------------------------------------------*/
211
212void
214 cs_real_t t,
215 int *id1,
216 int *id2);
217
218/*----------------------------------------------------------------------------*/
230/*----------------------------------------------------------------------------*/
231
232void
234 int id,
235 cs_real_t *t);
236
237/*----------------------------------------------------------------------------*/
250/*----------------------------------------------------------------------------*/
251
252void
254(
256 int id,
257 int *it,
258 int *order
259);
260
261/*----------------------------------------------------------------------------*/
267/*----------------------------------------------------------------------------*/
268
269void
271 int id);
272
273/*----------------------------------------------------------------------------*/
277/*----------------------------------------------------------------------------*/
278
279void
281
282/*----------------------------------------------------------------------------*/
283
284#endif /* CS_MEDCOUPLING_REMAPPER_HXX */
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
@ t
Definition: cs_field_pointer.h:91
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:1095
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:875
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:973
struct _cs_medcoupling_remapper_t cs_medcoupling_remapper_t
Definition: cs_medcoupling_remapper.h:42
void cs_medcoupling_remapper_destroy_all(void)
Destroy all remappers.
Definition: cs_medcoupling_remapper.cxx:1077
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:689
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:938
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:1021
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:770
cs_medcoupling_remapper_t * cs_medcoupling_remapper_by_id(int r_id)
get a remapper by its id
Definition: cs_medcoupling_remapper.cxx:622
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:909
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:732
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:1053
cs_medcoupling_remapper_t * cs_medcoupling_remapper_by_name_try(const char *name)
get a remapper by its name
Definition: cs_medcoupling_remapper.cxx:649
void cs_medcoupling_remapper_setup(cs_medcoupling_remapper_t *r)
update the interpolation matrix of the remapper
Definition: cs_medcoupling_remapper.cxx:834