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
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_lnum_t n_b_faces
Definition: cs_mesh.h:98
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:661
cs_medcoupling_remapper_t * cs_medcoupling_remapper_by_id(int r_id)
get a remapper by its id
Definition: cs_medcoupling_remapper.cxx:595
cs_medcoupling_remapper_t * cs_medcoupling_remapper_by_name_try(const char *name)
get a remapper by its name
Definition: cs_medcoupling_remapper.cxx:622
void cs_medcoupling_remapper_setup(cs_medcoupling_remapper_t *r)
update the interpolation matrix of the remapper
Definition: cs_medcoupling_remapper.cxx:798
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:304
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:899
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:873
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:841
We prescribe for the inlet a Dirichlet condition on the scalar "scalar1":
for (
cs_lnum_t ielt = 0; ielt < nelts; ielt++) {
icodcl[iscal*n_b_faces + f_id] = 1;
rcodcl[iscal*n_b_faces + f_id] = bc_scalar[ielt];
}
#define BFT_FREE(_ptr)
Free allocated memory.
Definition: bft_mem.h:101
int cs_field_get_key_int(const cs_field_t *f, int key_id)
Return a integer value for a given key associated with a field.
Definition: cs_field.c:2991
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:2364
int cs_field_key_id(const char *name)
Return an id associated with a given key name.
Definition: cs_field.c:2497
void cs_selector_get_b_face_list(const char *criteria, cs_lnum_t *n_b_faces, cs_lnum_t b_face_list[])
Fill a list of boundary faces verifying a given selection criteria.
Definition: cs_selector.c:213
Field descriptor.
Definition: cs_field.h:125