programmer's documentation
Typedefs | Functions | Variables
cs_grid.h File Reference
#include "cs_base.h"
#include "cs_halo.h"
#include "cs_matrix.h"
Include dependency graph for cs_grid.h:

Go to the source code of this file.

Typedefs

typedef struct _cs_grid_t cs_grid_t
 

Functions

cs_grid_tcs_grid_create_from_shared (cs_lnum_t n_cells, cs_lnum_t n_cells_ext, cs_lnum_t n_faces, bool symmetric, const int *diag_block_size, const int *extra_diag_block_size, const cs_lnum_2_t *face_cell, const cs_halo_t *halo, const cs_numbering_t *numbering, const cs_real_t *cell_cen, const cs_real_t *cell_vol, const cs_real_t *face_normal, const cs_matrix_t *a)
 
void cs_grid_destroy (cs_grid_t **grid)
 
void cs_grid_get_info (const cs_grid_t *g, int *level, bool *symmetric, int *db_size, int *eb_size, int *n_ranks, cs_lnum_t *n_cells, cs_lnum_t *n_cells_ext, cs_lnum_t *n_faces, cs_gnum_t *n_g_cells)
 
cs_lnum_t cs_grid_get_n_cells (const cs_grid_t *g)
 
cs_lnum_t cs_grid_get_n_cells_ext (const cs_grid_t *g)
 
cs_lnum_t cs_grid_get_n_cells_max (const cs_grid_t *g)
 
cs_gnum_t cs_grid_get_n_g_cells (const cs_grid_t *g)
 
const cs_matrix_tcs_grid_get_matrix (const cs_grid_t *g)
 
cs_grid_tcs_grid_coarsen (const cs_grid_t *f, int verbosity, int coarsening_type, int aggregation_limit, double relaxation_parameter)
 
void cs_grid_restrict_cell_var (const cs_grid_t *f, const cs_grid_t *c, const cs_real_t *f_var, cs_real_t *c_var)
 
void cs_grid_prolong_cell_num (const cs_grid_t *c, const cs_grid_t *f, int *c_num, int *f_num)
 
void cs_grid_prolong_cell_var (const cs_grid_t *c, const cs_grid_t *f, cs_real_t *c_var, cs_real_t *f_var)
 
void cs_grid_project_cell_num (const cs_grid_t *g, cs_lnum_t n_base_cells, int max_num, int c_cell_num[])
 
void cs_grid_project_cell_rank (const cs_grid_t *g, cs_lnum_t n_base_cells, int f_cell_rank[])
 
void cs_grid_project_var (const cs_grid_t *g, cs_lnum_t n_base_cells, const cs_real_t c_var[], cs_real_t f_var[])
 
void cs_grid_project_diag_dom (const cs_grid_t *g, cs_lnum_t n_base_cells, cs_real_t diag_dom[])
 
int cs_grid_get_merge_stride (void)
 
void cs_grid_finalize (void)
 
void cs_grid_dump (const cs_grid_t *g)
 
void cs_grid_get_merge_options (int *rank_stride, int *cells_mean_threshold, cs_gnum_t *cells_glob_threshold, int *min_ranks)
 Query the global multigrid parameters for parallel grid merging. More...
 
void cs_grid_set_merge_options (int rank_stride, int cells_mean_threshold, cs_gnum_t cells_glob_threshold, int min_ranks)
 Set global multigrid parameters for parallel grid merging behavior. More...
 
void cs_grid_set_matrix_tuning (cs_matrix_fill_type_t fill_type, int max_level)
 Set matrix tuning behavior for multigrid coarse meshes. More...
 
void cs_grid_set_matrix_variant (cs_matrix_fill_type_t fill_type, int level, const cs_matrix_variant_t *mv)
 Force matrix variant selection for multigrid coarse meshes. More...
 
void cs_grid_log_merge_options (void)
 Log the current settings for multigrid parallel merging. More...
 

Variables

const char * cs_grid_coarsening_type_name []
 

Typedef Documentation

typedef struct _cs_grid_t cs_grid_t

Function Documentation

cs_grid_t* cs_grid_coarsen ( const cs_grid_t f,
int  verbosity,
int  coarsening_type,
int  aggregation_limit,
double  relaxation_parameter 
)
cs_grid_t* cs_grid_create_from_shared ( cs_lnum_t  n_cells,
cs_lnum_t  n_cells_ext,
cs_lnum_t  n_faces,
bool  symmetric,
const int *  diag_block_size,
const int *  extra_diag_block_size,
const cs_lnum_2_t face_cell,
const cs_halo_t halo,
const cs_numbering_t numbering,
const cs_real_t cell_cen,
const cs_real_t cell_vol,
const cs_real_t face_normal,
const cs_matrix_t a 
)
void cs_grid_destroy ( cs_grid_t **  grid)
void cs_grid_dump ( const cs_grid_t g)
void cs_grid_finalize ( void  )
void cs_grid_get_info ( const cs_grid_t g,
int *  level,
bool *  symmetric,
int *  db_size,
int *  eb_size,
int *  n_ranks,
cs_lnum_t n_cells,
cs_lnum_t n_cells_ext,
cs_lnum_t n_faces,
cs_gnum_t n_g_cells 
)
const cs_matrix_t* cs_grid_get_matrix ( const cs_grid_t g)
void cs_grid_get_merge_options ( int *  rank_stride,
int *  cells_mean_threshold,
cs_gnum_t cells_glob_threshold,
int *  min_ranks 
)

Query the global multigrid parameters for parallel grid merging.

Parameters
[out]rank_stridenumber of ranks over which merging takes place, or NULL
[out]cells_mean_thresholdmean number of cells under which merging should be applied, or NULL
[out]cells_glob_thresholdglobal number of cells under which merging should be applied, or NULL
[out]min_ranksnumber of active ranks under which no merging takes place, or NULL
int cs_grid_get_merge_stride ( void  )
cs_lnum_t cs_grid_get_n_cells ( const cs_grid_t g)
cs_lnum_t cs_grid_get_n_cells_ext ( const cs_grid_t g)
cs_lnum_t cs_grid_get_n_cells_max ( const cs_grid_t g)
cs_gnum_t cs_grid_get_n_g_cells ( const cs_grid_t g)
void cs_grid_log_merge_options ( void  )

Log the current settings for multigrid parallel merging.

void cs_grid_project_cell_num ( const cs_grid_t g,
cs_lnum_t  n_base_cells,
int  max_num,
int  c_cell_num[] 
)
void cs_grid_project_cell_rank ( const cs_grid_t g,
cs_lnum_t  n_base_cells,
int  f_cell_rank[] 
)
void cs_grid_project_diag_dom ( const cs_grid_t g,
cs_lnum_t  n_base_cells,
cs_real_t  diag_dom[] 
)
void cs_grid_project_var ( const cs_grid_t g,
cs_lnum_t  n_base_cells,
const cs_real_t  c_var[],
cs_real_t  f_var[] 
)
void cs_grid_prolong_cell_num ( const cs_grid_t c,
const cs_grid_t f,
int *  c_num,
int *  f_num 
)
void cs_grid_prolong_cell_var ( const cs_grid_t c,
const cs_grid_t f,
cs_real_t c_var,
cs_real_t f_var 
)
void cs_grid_restrict_cell_var ( const cs_grid_t f,
const cs_grid_t c,
const cs_real_t f_var,
cs_real_t c_var 
)
void cs_grid_set_matrix_tuning ( cs_matrix_fill_type_t  fill_type,
int  max_level 
)

Set matrix tuning behavior for multigrid coarse meshes.

The finest mesh (level 0) is handled by the default tuning options, so only coarser meshes are considered here.

Parameters
[in]fill_typeassociated matrix fill type
[in]max_levelmaximum level for which tuning is active
void cs_grid_set_matrix_variant ( cs_matrix_fill_type_t  fill_type,
int  level,
const cs_matrix_variant_t mv 
)

Force matrix variant selection for multigrid coarse meshes.

The finest mesh (level 0) is handled by the default tuning options, so only coarser meshes are considered here.

Parameters
[in]fill_typeassociated matrix fill type
[in]levellevel for which variant is assiged
[in]mvmatrix variant to assign (NULL to unassign)
void cs_grid_set_merge_options ( int  rank_stride,
int  cells_mean_threshold,
cs_gnum_t  cells_glob_threshold,
int  min_ranks 
)

Set global multigrid parameters for parallel grid merging behavior.

Parameters
[in]rank_stridenumber of ranks over which merging takes place
[in]cells_mean_thresholdmean number of cells under which merging should be applied
[in]cells_glob_thresholdglobal number of cells under which merging should be applied
[in]min_ranksnumber of active ranks under which no merging takes place

Variable Documentation

const char* cs_grid_coarsening_type_name[]