9.2
general documentation
cs_paramedmem_coupling_t Struct Reference

#include <cs_paramedmem_coupling_utils.h>

+ Collaboration diagram for cs_paramedmem_coupling_t:

Public Member Functions

void add_mesh_from_criteria (const char *sel_crit, int elt_dim)
 Define coupled mesh based on a selection criteria. More...
 
void add_mesh_from_zone (const cs_zone_t *zone)
 Define coupled mesh based on a cs_zone_t pointer. More...
 
void add_mesh_from_ids (cs_lnum_t n_elts, const cs_lnum_t elt_ids[], int elt_dim)
 Define coupled mesh based on a cs_zone_t pointer. More...
 
std::string getName () const
 Get name of the coupling. More...
 
cs_lnum_t get_n_elts () const
 Get number of elements of coupled mesh. More...
 
const cs_lnum_tget_elt_list () const
 Get indirection list for elements in coupled mesh. More...
 
cs_lnum_t get_n_vertices () const
 Get number of vertices of coupled mesh. More...
 
const cs_lnum_tget_vertex_list () const
 Get indirection list for vertices in coupled mesh. More...
 
int add_field (const char *name, int dim, cs_medcpl_field_nature_t field_nature, cs_medcpl_space_discr_t space_discr, cs_medcpl_time_discr_t time_discr)
 Add a coupled field. More...
 
int add_field (const cs_field_t *f, cs_medcpl_field_nature_t fn, cs_medcpl_time_discr_t td)
 Add a coupled field based on a cs_field_t pointer. More...
 
void set_values (const char *name, const double values[], const bool use_list_elt=true)
 Assign values based on parent mesh location to associated ParaFIELD objects. More...
 
void get_values (const char *name, double values[], const bool use_list_elt=true) const
 Copy values from associated ParaFIELD object to array defined parent mesh location. More...
 
void send_data () const
 Send values of field attached to DEC. More...
 
void send_data (const char *name, const double *vals, const bool use_list_elt=true)
 Send values of a field. If vals pointer is non-null, values are updated before send. More...
 
void recv_data ()
 Recieve values of field attached to DEC. More...
 
void recv_data (const char *name, double *vals, const bool use_list_elt=true)
 Recieve values of a field. More...
 
void sync_dec ()
 Sync the coupling's the DEC. More...
 
void attach_field_by_id (int field_id)
 Attach a field to the DEC for send operation using its index. More...
 
void attach_field_by_name (const char *name)
 Attach a field to the DEC for send operation using its name. More...
 
void log () const
 Log ParaMEDMEM coupling setup information. More...
 

Public Attributes

std::string _name
 
ple_coupling_mpi_set_info_t apps [2]
 
void * para_mesh
 
void * dec
 
void * fields
 
MPI_Comm comm
 
bool dec_synced
 

Member Function Documentation

◆ add_field() [1/2]

int add_field ( const char *  name,
int  dim,
cs_medcpl_field_nature_t  field_nature,
cs_medcpl_space_discr_t  space_discr,
cs_medcpl_time_discr_t  time_discr 
)

Add a coupled field.

Parameters
[in]namename of field
[in]dimfield dimension
[in]field_naturefield nature flag
[in]space_discrfield space discretisation (nodes or cells)
[in]time_discrfield coupling time discretisation
Returns
index of field within the storing vector

◆ add_field() [2/2]

int add_field ( const cs_field_t f,
cs_medcpl_field_nature_t  fn,
cs_medcpl_time_discr_t  td 
)

Add a coupled field based on a cs_field_t pointer.

Parameters
[in]fpointer to cs_field_t struct
[in]fnfield nature flag
[in]time_discrfield coupling time discretisation
Returns
index of field within the storing vector

◆ add_mesh_from_criteria()

void add_mesh_from_criteria ( const char *  sel_crit,
int  elt_dim 
)

Define coupled mesh based on a selection criteria.

Parameters
[in]sel_critgeometrical selection criteria (string)
[in]elt_dimdimension of coupled elements

◆ add_mesh_from_ids()

void add_mesh_from_ids ( cs_lnum_t  n_elts,
const cs_lnum_t  elt_ids[],
int  elt_dim 
)

Define coupled mesh based on a cs_zone_t pointer.

Parameters
[in]n_eltslocal number of elements
[in]elt_idslist of local elements
[in]elt_dimdimension of elements (2: faces, 3: cells)

◆ add_mesh_from_zone()

void add_mesh_from_zone ( const cs_zone_t zone)

Define coupled mesh based on a cs_zone_t pointer.

Parameters
[in]zonepointer to cs_zone_t struct

◆ attach_field_by_id()

void attach_field_by_id ( int  field_id)

Attach a field to the DEC for send operation using its index.

Parameters
[in]field_idindex of field in storing vector

◆ attach_field_by_name()

void attach_field_by_name ( const char *  name)

Attach a field to the DEC for send operation using its name.

Parameters
[in]namename of field (string)

◆ get_elt_list()

const cs_lnum_t * get_elt_list ( ) const
inline

Get indirection list for elements in coupled mesh.

Returns
cs_lnum_t pointer to indirection list

◆ get_n_elts()

cs_lnum_t get_n_elts ( ) const
inline

Get number of elements of coupled mesh.

Returns
number of elements in mesh associated to coupling

◆ get_n_vertices()

cs_lnum_t get_n_vertices ( ) const
inline

Get number of vertices of coupled mesh.

Returns
number of elements in mesh associated to coupling

◆ get_values()

void get_values ( const char *  name,
double  values[],
const bool  use_list_elt = true 
) const

Copy values from associated ParaFIELD object to array defined parent mesh location.

Parameters
[in]namename of field
[in]valuesarray in which values will be stored
[in]use_list_eltCopy values from associated ParaFIELD structure to array defined on mesh location corresponding to coupled elements (and associated ParaMESH).

◆ get_vertex_list()

const cs_lnum_t * get_vertex_list ( ) const
inline

Get indirection list for vertices in coupled mesh.

Returns
pointer to indirection list; null if locally contiguous or empty

◆ getName()

std::string getName ( ) const
inline

Get name of the coupling.

Returns
name of the coupling

◆ log()

void log ( ) const

Log ParaMEDMEM coupling setup information.

◆ recv_data() [1/2]

void recv_data ( )

Recieve values of field attached to DEC.

◆ recv_data() [2/2]

void recv_data ( const char *  name,
double *  vals,
const bool  use_list_elt = true 
)

Recieve values of a field.

Parameters
[in]namename of field
[in]valsarray of values to read
[in]use_list_eltCopy values from associated ParaFIELD structure to array defined on mesh location corresponding to coupled elements (and associated ParaMESH).

◆ send_data() [1/2]

void send_data ( ) const

Send values of field attached to DEC.

◆ send_data() [2/2]

void send_data ( const char *  name,
const double *  vals,
const bool  use_list_elt = true 
)

Send values of a field. If vals pointer is non-null, values are updated before send.

Parameters
[in]namename of field
[in]valsarray of values to write
[in]use_list_eltCopy values from associated ParaFIELD structure to array defined on mesh location corresponding to coupled elements (and associated ParaMESH).

◆ set_values()

void set_values ( const char *  name,
const double  values[],
const bool  use_list_elt = true 
)

Assign values based on parent mesh location to associated ParaFIELD objects.

Parameters
[in]namename of field
[in]valuesarray of values to write (defined on parent mesh location)
[in]use_list_eltCopy values from associated ParaFIELD structure to array defined on mesh location corresponding to coupled elements (and associated ParaMESH).

◆ sync_dec()

void sync_dec ( )

Sync the coupling's the DEC.

Sync the coupling's DEC.

Member Data Documentation

◆ _name

std::string _name

◆ apps

◆ comm

MPI_Comm comm

◆ dec

void* dec

◆ dec_synced

bool dec_synced

◆ fields

void* fields

◆ para_mesh

void* para_mesh

The documentation for this struct was generated from the following files: