Include dependency graph for cs_redistribute.h:Go to the source code of this file.
Classes | |
| struct | cs_distributor_t |
Functions | |
| template<typename T > | |
| void | cs_distribute_buffer (const cs_distributor_t *db, const int stride, T *buffer[]) |
| Distribute a buffer using the distributor structure. More... | |
| template<typename T > | |
| void | cs_distribute_buffer_allocated (const cs_distributor_t *db, const int stride, const T send_buf[], T recv_buf[]) |
| Distribute a buffer using the distributor structure. More... | |
| template<typename T > | |
| void | cs_distribute_buffer_indexed (const cs_distributor_t *db, cs_lnum_t *idx[], T *buffer[]) |
| Distribute an indexed array and its corresponding index array using the distributor structure. More... | |
| void | cs_distributor_destroy (cs_distributor_t **db) |
| Destroy a distributor structure. More... | |
| void | cs_redistribute (const int cell_dest_rank[], cs_distributor_t **cd, cs_distributor_t **ifd, cs_distributor_t **bfd, cs_distributor_t **vd) |
| Redistribute mesh and field data based on a cell destination rank map. More... | |
| void cs_distribute_buffer | ( | const cs_distributor_t * | db, |
| const int | stride, | ||
| T * | buffer[] | ||
| ) |
Distribute a buffer using the distributor structure.
This function guarantees the uniqueness of the elements post-redistribution.
| [in] | db | pointer to the distributor |
| [in] | stride | stride of the array to distribute |
| [in,out] | buffer | pointer to the array to redistribute |
| void cs_distribute_buffer_allocated | ( | const cs_distributor_t * | db, |
| const int | stride, | ||
| const T | send_buf[], | ||
| T | recv_buf[] | ||
| ) |
Distribute a buffer using the distributor structure.
Unlike cs_distribute_buffer, the distribution is not in-place, and the recv_buf array must be allocated to the correct size by the caller.
This function guarantees the uniqueness of the elements post-redistribution.
| [in] | db | pointer to the distributor |
| [in] | stride | stride of the array to distribute |
| [in] | send_buf | pointer to the array to redistribute |
| [out] | recv_buf | pointer to the redistributed array |
| void cs_distribute_buffer_indexed | ( | const cs_distributor_t * | db, |
| cs_lnum_t * | idx[], | ||
| T * | buffer[] | ||
| ) |
Distribute an indexed array and its corresponding index array using the distributor structure.
This function guarantees the uniqueness of the elements post-redistribution.
| [in] | db | pointer to the distributor |
| [in,out] | idx | pointer to the index array to redistribute |
| [in,out] | buffer | pointer to the indexed array to redistribute |
| void cs_distributor_destroy | ( | cs_distributor_t ** | db | ) |
Destroy a distributor structure.
| [in,out] | db | pointer of pointer to a cs_distributor_structure |
| void cs_redistribute | ( | const int | cell_dest_rank[], |
| cs_distributor_t ** | cell_db, | ||
| cs_distributor_t ** | i_face_db, | ||
| cs_distributor_t ** | b_face_db, | ||
| cs_distributor_t ** | vertex_db | ||
| ) |
Redistribute mesh and field data based on a cell destination rank map.
If no cell map is given, a random one is created internally.
The different distributors are returned if any of the pointers are not null. In this case, it is up to the caller to free them whenever they are no longer needed.
| [in] | cell_dest_rank | destination rank for each cell |
| [out] | cell_db | pointer of pointer to cell redistributor |
| [out] | i_face_db | pointer of pointer to interior face redistributor |
| [out] | b_face_db | pointer of pointer to boundary face redistributor |
| [out] | vertex_db | pointer of pointer to vertex redistributor |