8.0
general documentation
cs_cdovb_scalsys.h File Reference
#include "cs_base.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_quantities.h"
#include "cs_equation.h"
#include "cs_equation_param.h"
#include "cs_equation_system_param.h"
#include "cs_mesh.h"
#include "cs_time_step.h"
+ Include dependency graph for cs_cdovb_scalsys.h:

Go to the source code of this file.

Functions

void cs_cdovb_scalsys_init_sharing (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step)
 Set pointers to the main shared structures. More...
 
void * cs_cdovb_scalsys_define (int n_eqs, const cs_equation_system_param_t *sysp, cs_equation_core_t **block_factories, cs_cdo_system_helper_t **p_sh)
 Create and initialize factories for extra-diagonal blocks Build equation builders and scheme context structures for each equation which are in the extra-diagonal blocks related to a system of equations. Structures associated to diagonal blocks should be already initialized during the treatment of the classical full equations. More...
 
void * cs_cdovb_scalsys_free (int n_eqs, cs_equation_core_t **blocks, void *sys_context)
 Free an array of structures (equation parameters, equation builders or scheme context) for each equation which are in the extra-diagonal blocks related to a system of equations. Structures associated to diagonal blocks are freed during the treatment of the classical full equations. More...
 
void cs_cdovb_scalsys_solve_implicit (bool cur2prev, int n_equations, cs_equation_system_param_t *sysp, cs_equation_core_t **blocks, void *sys_context, cs_cdo_system_helper_t *sh)
 Build and solve the linear system of equations. The number of rows in the system is equal to the number of equations. Thus there are n_eqs*n_eqs blocks in the system. Each block corresponds potentially to a scalar-valued unsteady convection/diffusion/reaction equation with a CDO-Vb scheme using an implicit time scheme. More...
 

Function Documentation

◆ cs_cdovb_scalsys_define()

void* cs_cdovb_scalsys_define ( int  n_eqs,
const cs_equation_system_param_t sysp,
cs_equation_core_t **  block_factories,
cs_cdo_system_helper_t **  p_sh 
)

Create and initialize factories for extra-diagonal blocks Build equation builders and scheme context structures for each equation which are in the extra-diagonal blocks related to a system of equations. Structures associated to diagonal blocks should be already initialized during the treatment of the classical full equations.

Case of scalar-valued CDO-Vb scheme in each block

Parameters
[in]n_eqsnumber of equations
[in]syspset of parameters to specify a system of eqs
[in,out]block_factoriesarray of the core members for an equation
[out]p_shsystem helper structure to initialize
Returns
a pointer to a new allocated system context structure

◆ cs_cdovb_scalsys_free()

void* cs_cdovb_scalsys_free ( int  n_eqs,
cs_equation_core_t **  blocks,
void *  sys_context 
)

Free an array of structures (equation parameters, equation builders or scheme context) for each equation which are in the extra-diagonal blocks related to a system of equations. Structures associated to diagonal blocks are freed during the treatment of the classical full equations.

Case of scalar-valued CDO-Vb scheme in each block

Parameters
[in]n_eqsnumber of equations
[in,out]blocksarray of the core structures for an equation
[in,out]sys_contextpointer to a structure cast on-the-fly

◆ cs_cdovb_scalsys_init_sharing()

void cs_cdovb_scalsys_init_sharing ( const cs_mesh_t mesh,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step 
)

Set pointers to the main shared structures.

Parameters
[in]meshbasic mesh structure
[in]connectpointer to a cs_cdo_connect_t struct.
[in]quantadditional mesh quantities struct.
[in]time_steppointer to a time step structure

◆ cs_cdovb_scalsys_solve_implicit()

void cs_cdovb_scalsys_solve_implicit ( bool  cur2prev,
int  n_equations,
cs_equation_system_param_t sysp,
cs_equation_core_t **  blocks,
void *  sys_context,
cs_cdo_system_helper_t sh 
)

Build and solve the linear system of equations. The number of rows in the system is equal to the number of equations. Thus there are n_eqs*n_eqs blocks in the system. Each block corresponds potentially to a scalar-valued unsteady convection/diffusion/reaction equation with a CDO-Vb scheme using an implicit time scheme.

Parameters
[in]cur2prevdo a "current to previous" operation ?
[in]n_equationsnumber of equations
[in]syspset of paremeters for the system of equations
[in,out]blocksarray of the core members for an equation
[in,out]sys_contextpointer to a structure cast on-the-fly
[in,out]shpointer to a system helper structure