8.1
general documentation
cs_medcoupling_remapper.h File Reference

Go to the source code of this file.

Typedefs

typedef struct _cs_medcoupling_remapper_t cs_medcoupling_remapper_t
 

Functions

cs_medcoupling_remapper_tcs_medcoupling_remapper_by_id (int r_id)
 get a remapper by its id More...
 
cs_medcoupling_remapper_tcs_medcoupling_remapper_by_name_try (const char *name)
 get a remapper by its name More...
 
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 More...
 
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 More...
 
void cs_medcoupling_remapper_set_options (cs_medcoupling_remapper_t *r, const char key[], const char value[])
 set non-default options for a remapper More...
 
void cs_medcoupling_remapper_setup (cs_medcoupling_remapper_t *r)
 update the interpolation matrix of the remapper More...
 
cs_real_tcs_medcoupling_remapper_copy_values (cs_medcoupling_remapper_t *r, int field_id, double default_val)
 Interpolate values for a given field. More...
 
void cs_medcoupling_remapper_translate (cs_medcoupling_remapper_t *r, cs_real_t translation[3])
 translate the mesh using a given vector More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void cs_medcoupling_remapper_update_time_value (cs_medcoupling_remapper_t *r, int id)
 Load the time value corresponding to id. More...
 
void cs_medcoupling_remapper_destroy_all (void)
 Destroy all remappers. More...
 

Typedef Documentation

◆ cs_medcoupling_remapper_t

typedef struct _cs_medcoupling_remapper_t cs_medcoupling_remapper_t

Function Documentation

◆ cs_medcoupling_remapper_by_id()

cs_medcoupling_remapper_t* cs_medcoupling_remapper_by_id ( int  r_id)

get a remapper by its id

Parameters
[in]r_idid of the remapper
Returns
pointer to cs_medcoupling_remapper_t struct

◆ cs_medcoupling_remapper_by_name_try()

cs_medcoupling_remapper_t* cs_medcoupling_remapper_by_name_try ( const char *  name)

get a remapper by its name

Parameters
[in]namename of the remapper
Returns
pointer to cs_medcoupling_remapper_t struct

◆ cs_medcoupling_remapper_copy_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.

Parameters
[in]rpointer to the cs_medcoupling_remapper_t struct
[in]field_idid of the field to interpolate (in the list given before)
[in]default_valvalue to apply for elements not intersected by source mesh
Returns
pointer to cs_real_t array containing the new values

◆ cs_medcoupling_remapper_destroy_all()

void cs_medcoupling_remapper_destroy_all ( void  )

Destroy all remappers.

◆ cs_medcoupling_remapper_find_time_index()

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.

The returned value is int[2]. If the requested time value if outside the time bounds stored in the file, the both values are identical (first or last value), and a warning is printed in the listing file.

Parameters
[in]rpointer to remapper object
[in]trequested time value
[in,out]id1first returned index
[in,out]id2second returned index

◆ cs_medcoupling_remapper_get_iter_order_from_index()

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.

The returned value is int[2]. If the requested time value if outside the time bounds stored in the file, the both values are identical (first or last value), and a warning is output in the lod file.

Parameters
[in]rpointer to remapper object
[in]idrequested time index
[in,out]itindex iteration
[in,out]orderindex iteration order

◆ cs_medcoupling_remapper_get_time_from_index()

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.

The returned value is int[2]. If the requested time value if outside the time bounds stored in the file, the both values are identical (first or last value), and a warning is printed in the listing file.

Parameters
[in]rpointer to remapper object
[in]idrequested index
[in,out]tcorresponding time value

◆ cs_medcoupling_remapper_initialize()

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

Parameters
[in]namename of the new remapper
[in]elt_dimelement dimension
[in]select_criteriaselection criteria for the elements
[in]medfile_pathpath to the med file
[in]n_fieldsnumber of fields to load
[in]field_namesnames of the fields to load
[in]iterationtime iteration to load
[in]orderiteration order to load
Returns
id of the new remapper

◆ cs_medcoupling_remapper_rotate()

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.

Parameters
[in]rpointer to the cs_medcoupling_remapper_t struct
[in]invariantcoordinates of the invariant point
[in]axisrotation axis vector
[in]anglerotation angle in radians

◆ cs_medcoupling_remapper_set_iteration()

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

Parameters
[in]rpointer to the cs_medcoupling_remapper_t struct
[in]iterationtime iteration to load
[in]orderiteration order to load

◆ cs_medcoupling_remapper_set_options()

void cs_medcoupling_remapper_set_options ( cs_medcoupling_remapper_t r,
const char  key[],
const char  value[] 
)

set non-default options for a remapper

Parameters
[in]rpointer to the cs_medcoupling_remapper_t struct
[in]keypointer to string representing key currently handled: one of {Precision, IntersectionType}
[in]valuepointer to string representing value:
  • for Precision: floating-point value (default: 1e-12)
  • for IntersectionType: one of {Triangulation, Convex, Geometric2D, PointLocator, Barycentric, BarycentricGeo2D, MappedBarycentric} (see MEDCoupling INTERP_KERNEL documentation)

◆ cs_medcoupling_remapper_setup()

void cs_medcoupling_remapper_setup ( cs_medcoupling_remapper_t r)

update the interpolation matrix of the remapper

Parameters
[in]rpointer to the cs_medcoupling_remapper_t struct

◆ cs_medcoupling_remapper_translate()

void cs_medcoupling_remapper_translate ( cs_medcoupling_remapper_t r,
cs_real_t  translation[3] 
)

translate the mesh using a given vector

Parameters
[in]rpointer to the cs_medcoupling_remapper_t struct
[in]translationtranslation vector

◆ cs_medcoupling_remapper_update_time_value()

void cs_medcoupling_remapper_update_time_value ( cs_medcoupling_remapper_t r,
int  id 
)

Load the time value corresponding to id.

Parameters
[in]rpointer to remapper object
[in]idrequested time index