8.0
general documentation
cs_cdo_toolbox.h File Reference
#include "cs_cdo_connect.h"
#include "cs_flag.h"
#include "cs_xdef.h"
+ Include dependency graph for cs_cdo_toolbox.h:

Go to the source code of this file.

Data Structures

struct  cs_cdo_balance_t
 

Macros

#define CS_CDO_SYNC_ZERO_VALUE   1
 
#define CS_CDO_SYNC_MEAN_VALUE   2
 

Functions

void cs_cdo_toolbox_init (const cs_cdo_connect_t *connect, cs_flag_t eb_flag, cs_flag_t fb_flag, cs_flag_t cb_flag, cs_flag_t vb_flag, cs_flag_t vcb_flag, cs_flag_t hho_flag)
 Allocate a pointer to a buffer of size at least the n_cells for managing temporary usage of memory when dealing with equations The size of the temporary buffer can be bigger according to the numerical settings Set also shared pointers from the main domain members. More...
 
void cs_cdo_toolbox_finalize (void)
 Free buffers shared among the equations solved with CDO schemes. More...
 
cs_real_tcs_cdo_toolbox_get_tmpbuf (void)
 Retrieve a pointer to a buffer of size at least the 2*n_cells The size of the temporary buffer can be bigger according to the numerical settings. More...
 
size_t cs_cdo_toolbox_get_tmpbuf_size (void)
 Get the allocation size of the temporary buffer. More...
 
cs_cdo_balance_tcs_cdo_balance_create (cs_flag_t location, cs_lnum_t size)
 Allocate a cs_cdo_balance_t structure. More...
 
void cs_cdo_balance_reset (cs_cdo_balance_t *b)
 Reset a cs_cdo_balance_t structure. More...
 
void cs_cdo_balance_sync (const cs_cdo_connect_t *connect, cs_cdo_balance_t *b)
 Synchronize balance terms if this is a parallel computation. More...
 
void cs_cdo_balance_destroy (cs_cdo_balance_t **p_balance)
 Free a cs_cdo_balance_t structure. More...
 
void cs_cdo_sync_vol_def_at_vertices (int n_defs, cs_xdef_t **defs, cs_lnum_t def2v_idx[], cs_lnum_t def2v_ids[])
 Synchronize the volumetric definitions to consider at each vertex. More...
 
void cs_cdo_sync_vol_def_at_edges (int n_defs, cs_xdef_t **defs, cs_lnum_t def2e_idx[], cs_lnum_t def2e_ids[])
 Synchronize the volumetric definitions to consider at each edge. More...
 
void cs_cdo_sync_vol_def_at_faces (int n_defs, cs_xdef_t **defs, cs_lnum_t def2f_idx[], cs_lnum_t def2f_ids[])
 Synchronize the volumetric definitions to consider at each face. More...
 
void cs_cdo_sync_vertex_mean_values (int dim, int *counter, cs_real_t *values)
 Compute the mean-value across ranks at each vertex. More...
 

Macro Definition Documentation

◆ CS_CDO_SYNC_MEAN_VALUE

#define CS_CDO_SYNC_MEAN_VALUE   2

◆ CS_CDO_SYNC_ZERO_VALUE

#define CS_CDO_SYNC_ZERO_VALUE   1

Function Documentation

◆ cs_cdo_balance_create()

cs_cdo_balance_t* cs_cdo_balance_create ( cs_flag_t  location,
cs_lnum_t  size 
)

Allocate a cs_cdo_balance_t structure.

Parameters
[in]locationwhere the balance is performed
[in]sizesize of arrays in the structure
Returns
a pointer to the new allocated structure

◆ cs_cdo_balance_destroy()

void cs_cdo_balance_destroy ( cs_cdo_balance_t **  p_balance)

Free a cs_cdo_balance_t structure.

Parameters
[in,out]p_balancepointer to the pointer to free

◆ cs_cdo_balance_reset()

void cs_cdo_balance_reset ( cs_cdo_balance_t b)

Reset a cs_cdo_balance_t structure.

Parameters
[in,out]bpointer to a cs_cdo_balance_t to reset

◆ cs_cdo_balance_sync()

void cs_cdo_balance_sync ( const cs_cdo_connect_t connect,
cs_cdo_balance_t b 
)

Synchronize balance terms if this is a parallel computation.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in,out]bpointer to a cs_cdo_balance_t to sync

◆ cs_cdo_sync_vertex_mean_values()

void cs_cdo_sync_vertex_mean_values ( int  dim,
int *  counter,
cs_real_t values 
)

Compute the mean-value across ranks at each vertex.

Parameters
[in]dimnumber of entries for each vertex
[in]counternumber of occurences on this rank
[in,out]valuesarray to update

◆ cs_cdo_sync_vol_def_at_edges()

void cs_cdo_sync_vol_def_at_edges ( int  n_defs,
cs_xdef_t **  defs,
cs_lnum_t  def2e_idx[],
cs_lnum_t  def2e_ids[] 
)

Synchronize the volumetric definitions to consider at each edge.

Parameters
[in]n_defsnumber of definitions
[in]defsnumber of times the values has been updated
[in,out]def2e_idxindex array to define
[in,out]def2e_idsarray of ids to define

◆ cs_cdo_sync_vol_def_at_faces()

void cs_cdo_sync_vol_def_at_faces ( int  n_defs,
cs_xdef_t **  defs,
cs_lnum_t  def2f_idx[],
cs_lnum_t  def2f_ids[] 
)

Synchronize the volumetric definitions to consider at each face.

Parameters
[in]n_defsnumber of definitions
[in]defsnumber of times the values has been updated
[in,out]def2f_idxindex array to define
[in,out]def2f_idsarray of ids to define

◆ cs_cdo_sync_vol_def_at_vertices()

void cs_cdo_sync_vol_def_at_vertices ( int  n_defs,
cs_xdef_t **  defs,
cs_lnum_t  def2v_idx[],
cs_lnum_t  def2v_ids[] 
)

Synchronize the volumetric definitions to consider at each vertex.

Parameters
[in]n_defsnumber of definitions
[in]defsnumber of times the values has been updated
[in,out]def2v_idxindex array to define
[in,out]def2v_idsarray of ids to define

◆ cs_cdo_toolbox_finalize()

void cs_cdo_toolbox_finalize ( void  )

Free buffers shared among the equations solved with CDO schemes.

◆ cs_cdo_toolbox_get_tmpbuf()

cs_real_t* cs_cdo_toolbox_get_tmpbuf ( void  )

Retrieve a pointer to a buffer of size at least the 2*n_cells The size of the temporary buffer can be bigger according to the numerical settings.

Returns
a pointer to an array of double

◆ cs_cdo_toolbox_get_tmpbuf_size()

size_t cs_cdo_toolbox_get_tmpbuf_size ( void  )

Get the allocation size of the temporary buffer.

Returns
the size of the temporary buffer

◆ cs_cdo_toolbox_init()

void cs_cdo_toolbox_init ( const cs_cdo_connect_t connect,
cs_flag_t  eb_flag,
cs_flag_t  fb_flag,
cs_flag_t  cb_flag,
cs_flag_t  vb_flag,
cs_flag_t  vcb_flag,
cs_flag_t  hho_flag 
)

Allocate a pointer to a buffer of size at least the n_cells for managing temporary usage of memory when dealing with equations The size of the temporary buffer can be bigger according to the numerical settings Set also shared pointers from the main domain members.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]eb_flagmetadata for Edge-based schemes
[in]fb_flagmetadata for Face-based schemes
[in]cb_flagmetadata for Cell-based schemes
[in]vb_flagmetadata for Vertex-based schemes
[in]vcb_flagmetadata for Vertex+Cell-basde schemes
[in]hho_flagmetadata for HHO schemes