Local definitions
const int nremapper_fields = 1;
const char **field_names = NULL;
BFT_MALLOC(field_names, nremapper_fields,
const char *);
field_names[0] = "TEMPERATURE";
#define BFT_MALLOC(_ptr, _ni, _type)
Allocate memory for _ni elements of type _type.
Definition: bft_mem.h:62
Initialization of some variables
int it0 = -1;
int it1 = -1;
Create a medcoupling remapper
if (r == NULL) {
int elts_dim = 2;
const char file_name[] = "/home/myname/study/2Dmap_Tfluid.med";
elts_dim,
"inlet",
file_name,
nremapper_fields,
field_names,
it0,
it1);
}
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:679
cs_medcoupling_remapper_t * cs_medcoupling_remapper_by_id(int r_id)
get a remapper by its id
Definition: cs_medcoupling_remapper.cxx:613
cs_medcoupling_remapper_t * cs_medcoupling_remapper_by_name_try(const char *name)
get a remapper by its name
Definition: cs_medcoupling_remapper.cxx:640
void cs_medcoupling_remapper_setup(cs_medcoupling_remapper_t *r)
update the interpolation matrix of the remapper
Definition: cs_medcoupling_remapper.cxx:816
struct _cs_medcoupling_remapper_t cs_medcoupling_remapper_t
Definition: cs_medcoupling_remapper.h:44
Translate or rotate med data if needed
if (false) {
cs_real_t translation_vector[3] = {1.0, 0.0, 0.0};
}
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
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:913
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:887
We retrieve an array containing the interpolated values.
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:856
We prescribe for the inlet a Dirichlet condition on the scalar "scalar1":
icodcl[f_id] = 1;
rcodcl1[f_id] = bc_scalar[ielt];
}
const cs_zone_t * cs_boundary_zone_by_name(const char *name)
Return a pointer to a boundary zone based on its name if present.
Definition: cs_boundary_zone.c:711
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
cs_field_t * cs_field_by_name_try(const char *name)
Return a pointer to a field based on its name if present.
Definition: cs_field.c:2366
cs_real_t * rcodcl1
Definition: cs_field.h:109
int * icodcl
Definition: cs_field.h:108
Field descriptor.
Definition: cs_field.h:130
cs_field_bc_coeffs_t * bc_coeffs
Definition: cs_field.h:158
const cs_lnum_t * elt_ids
Definition: cs_zone.h:65
cs_lnum_t n_elts
Definition: cs_zone.h:64