YAC 3.21.0
Yet Another Coupler
Loading...
Searching...
No Matches
couple_config_grid.h File Reference
#include <stddef.h>
#include "yac_mpi_common.h"
Include dependency graph for couple_config_grid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  yac_couple_config_grid
 

Functions

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)
 
void yac_couple_config_grid_free (struct yac_couple_config_grid *grid)
 
void yac_couple_config_grids_free (struct yac_couple_config_grid **grids, size_t *num_grids)
 
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)
 

Function Documentation

◆ 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 32 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_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 148 of file couple_config_grid.c.

Here is the caller 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 190 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 166 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_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 71 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 51 of file couple_config_grid.c.

Here is the caller graph for this function: