YAC 3.18.0
Yet Another Coupler
Loading...
Searching...
No Matches
couple_config_grid.c File Reference
Include dependency graph for couple_config_grid.c:

Go to the source code of this file.

Functions

static void yac_couple_config_grid_init (struct yac_couple_config_grid *grid, char const *name)
 
size_t yac_couple_config_grid_append (struct yac_couple_config_grid **grids, size_t *num_grids, char const *name)
 
void yac_couple_config_set_grid_output_filename_value (struct yac_couple_config_grid *grid, char const *output_filename)
 
void yac_couple_config_set_grid_metadata_value (struct yac_couple_config_grid *grid, char const *metadata)
 
static size_t yac_couple_config_get_grid_pack_size (void *grid_, MPI_Comm comm)
 
static void yac_couple_config_pack_grid (void *grid_, void *buffer, int buffer_size, int *position, MPI_Comm comm)
 
static void yac_couple_config_unpack_grid (void *buffer, int buffer_size, int *position, void *grid_, MPI_Comm comm)
 
static int yac_couple_config_grid_compare (void const *a, void const *b)
 
static void yac_couple_config_grid_merge (void *a_, void *b_, MPI_Comm comm)
 
void yac_couple_config_grid_free (struct yac_couple_config_grid *grid)
 
void yac_couple_config_grids_merge (struct yac_couple_config_grid **grids, size_t *num_grids, struct yac_couple_config_component *components, size_t num_components, MPI_Comm comm)
 
void yac_couple_config_grids_free (struct yac_couple_config_grid **grids, size_t *num_grids)
 

Variables

static struct yac_dist_merge_vtable dist_merge_vtable_grid
 

Function Documentation

◆ yac_couple_config_get_grid_pack_size()

static size_t yac_couple_config_get_grid_pack_size ( void * grid_,
MPI_Comm comm )
static

Definition at line 97 of file couple_config_grid.c.

Here is the call graph for this function:

◆ yac_couple_config_grid_append()

size_t yac_couple_config_grid_append ( struct yac_couple_config_grid ** grids,
size_t * num_grids,
char const * name )

Append a grid by name if missing and return its index.

If a grid with the same name already exists, its existing index is returned and no new grid is allocated.

Parameters
[in,out]gridsGrid array pointer.
[in,out]num_gridsNumber of grids.
[in]nameGrid name.
Returns
Grid index.

Definition at line 33 of file couple_config_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_couple_config_grid_compare()

static int yac_couple_config_grid_compare ( void const * a,
void const * b )
static

Definition at line 128 of file couple_config_grid.c.

◆ yac_couple_config_grid_free()

void yac_couple_config_grid_free ( struct yac_couple_config_grid * grid)

Free a grid and its dynamic data.

Parameters
[in,out]gridGrid.

Definition at line 155 of file couple_config_grid.c.

Here is the caller graph for this function:

◆ yac_couple_config_grid_init()

static void yac_couple_config_grid_init ( struct yac_couple_config_grid * grid,
char const * name )
static

Initialize a yac_couple_config_grid.

Parameters
[in,out]gridGrid.
[in]nameGrid name.

Definition at line 20 of file couple_config_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_couple_config_grid_merge()

static void yac_couple_config_grid_merge ( void * a_,
void * b_,
MPI_Comm comm )
static

Definition at line 137 of file couple_config_grid.c.

Here is the call graph for this function:

◆ yac_couple_config_grids_free()

void yac_couple_config_grids_free ( struct yac_couple_config_grid ** grids,
size_t * num_grids )

Free all grids and their dynamic data.

Parameters
[in,out]gridsGrid array pointer.
[in,out]num_gridsNumber of grids.

Definition at line 199 of file couple_config_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_couple_config_grids_merge()

void yac_couple_config_grids_merge ( struct yac_couple_config_grid ** grids,
size_t * num_grids,
struct yac_couple_config_component * components,
size_t num_components,
MPI_Comm comm )

Synchronize and merge all grids across ranks and updates grid indices in components accordingly.

Parameters
[in,out]gridsGrid array pointer.
[in,out]num_gridsNumber of grids.
[in,out]componentsComponent array.
[in]num_componentsNumber of components.
[in]commMPI communicator.

Definition at line 173 of file couple_config_grid.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_couple_config_pack_grid()

static void yac_couple_config_pack_grid ( void * grid_,
void * buffer,
int buffer_size,
int * position,
MPI_Comm comm )
static

Definition at line 107 of file couple_config_grid.c.

Here is the call graph for this function:

◆ yac_couple_config_set_grid_metadata_value()

void yac_couple_config_set_grid_metadata_value ( struct yac_couple_config_grid * grid,
char const * metadata )

Set the metadata of a grid.

Metadata must not be NULL. If metadata is already set, it must match the provided value.

Parameters
[in,out]gridGrid.
[in]metadataMetadata.

Definition at line 77 of file couple_config_grid.c.

Here is the caller graph for this function:

◆ yac_couple_config_set_grid_output_filename_value()

void yac_couple_config_set_grid_output_filename_value ( struct yac_couple_config_grid * grid,
char const * output_filename )

Set the output filename of a grid.

The filename must not be NULL. If a filename is already set, it must match the provided value.

Parameters
[in,out]gridGrid.
[in]output_filenameOutput filename.

Definition at line 56 of file couple_config_grid.c.

Here is the caller graph for this function:

◆ yac_couple_config_unpack_grid()

static void yac_couple_config_unpack_grid ( void * buffer,
int buffer_size,
int * position,
void * grid_,
MPI_Comm comm )
static

Definition at line 117 of file couple_config_grid.c.

Here is the call graph for this function:

Variable Documentation

◆ dist_merge_vtable_grid

struct yac_dist_merge_vtable dist_merge_vtable_grid
static
Initial value:
=
.free_data = (void (*)(void *))yac_couple_config_grid_free}
static void yac_couple_config_grid_merge(void *a_, void *b_, MPI_Comm comm)
static int yac_couple_config_grid_compare(void const *a, void const *b)
static size_t yac_couple_config_get_grid_pack_size(void *grid_, MPI_Comm comm)
void yac_couple_config_grid_free(struct yac_couple_config_grid *grid)
static void yac_couple_config_unpack_grid(void *buffer, int buffer_size, int *position, void *grid_, MPI_Comm comm)
static void yac_couple_config_pack_grid(void *grid_, void *buffer, int buffer_size, int *position, MPI_Comm comm)

Definition at line 165 of file couple_config_grid.c.