7.2
general documentation
cs_equation_system.c File Reference
#include "cs_defs.h"
#include <assert.h>
#include <bft_mem.h>
#include "cs_cdovb_scalsys.h"
#include "cs_equation_system_sles.h"
#include "cs_equation_param.h"
#include "cs_timer_stats.h"
#include "cs_equation_system.h"
+ Include dependency graph for cs_equation_system.c:

Macros

#define CS_EQUATION_SYSTEM_DBG   0
 

Functions

int cs_equation_system_get_n_systems (void)
 Get the number of systems of equations. More...
 
cs_equation_system_tcs_equation_system_add (const char *sysname, int n_eqs, int block_var_dim)
 Add a new structure to handle system of coupled equations. More...
 
void cs_equation_system_destroy_all (void)
 Free all structures used to couple equations. More...
 
void cs_equation_system_log_setup (void)
 Log the setup for all structures managing systems of equations. More...
 
void cs_equation_system_log_monitoring (void)
 Print a synthesis of the monitoring information in the performance file. More...
 
void cs_equation_system_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)
 Assign a set of shared pointer to the main structures. More...
 
void cs_equation_system_set_functions (void)
 Assign a set of pointer functions for managing all the systems of equations. More...
 
void cs_equation_system_set_sles (void)
 Set the SLES associated to each system of equations. More...
 
void cs_equation_system_define (void)
 Define the builder and scheme context structures associated to all the systems of equations which have been added. For the diagonal blocks, one relies on the builder and context of the related equations. For extra-diagonal blocks, one defines new builder and context structures. More...
 
void cs_equation_system_solve (bool cur2prev, cs_equation_system_t *eqsys)
 Solve of a system of coupled equations. Unsteady case. More...
 
void cs_equation_system_assign_equation (int row_id, cs_equation_t *eq, cs_equation_system_t *eqsys)
 Assign the given equation to the diagonal block located at position (row_id, row_id) in the matrix of blocks. More...
 
void cs_equation_system_assign_param (int row_id, int col_id, cs_equation_param_t *eqp, cs_equation_system_t *eqsys)
 Assign the given equation parameters to the block with ids (row_id, col_id) in the block matrix. More...
 

Variables

static int _n_equation_systems = 0
 
static cs_equation_system_t ** _equation_systems = NULL
 

Macro Definition Documentation

◆ CS_EQUATION_SYSTEM_DBG

#define CS_EQUATION_SYSTEM_DBG   0

Function Documentation

◆ cs_equation_system_add()

cs_equation_system_t* cs_equation_system_add ( const char *  sysname,
int  n_eqs,
int  block_var_dim 
)

Add a new structure to handle system of coupled equations.

Parameters
[in]sysnamename of the system of equations
[in]n_eqsnumber of coupled equations composing the system
[in]block_var_dimdimension of the variable in each block
Returns
a pointer to the new allocated cs_equation_system_t structure

◆ cs_equation_system_assign_equation()

void cs_equation_system_assign_equation ( int  row_id,
cs_equation_t eq,
cs_equation_system_t eqsys 
)

Assign the given equation to the diagonal block located at position (row_id, row_id) in the matrix of blocks.

Parameters
[in]row_idposition in the block matrix
[in]eqpointer to the equation to add
[in,out]eqsyspointer to a cs_equation_system_t to update

◆ cs_equation_system_assign_param()

void cs_equation_system_assign_param ( int  row_id,
int  col_id,
cs_equation_param_t eqp,
cs_equation_system_t eqsys 
)

Assign the given equation parameters to the block with ids (row_id, col_id) in the block matrix.

Parameters
[in]row_idrow position id
[in]col_idcolumn position id
[in]eqppointer to the equation parameter to add
[in,out]eqsyspointer to a cs_equation_system_t to update

◆ cs_equation_system_define()

void cs_equation_system_define ( void  )

Define the builder and scheme context structures associated to all the systems of equations which have been added. For the diagonal blocks, one relies on the builder and context of the related equations. For extra-diagonal blocks, one defines new builder and context structures.

◆ cs_equation_system_destroy_all()

void cs_equation_system_destroy_all ( void  )

Free all structures used to couple equations.

Destroy all cs_equation_system_t structures.

◆ cs_equation_system_get_n_systems()

int cs_equation_system_get_n_systems ( void  )

Get the number of systems of equations.

Returns
the number of systems

◆ cs_equation_system_init_sharing()

void cs_equation_system_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 
)

Assign a set of shared pointer to the main structures.

Parameters
[in]meshbasic mesh structure
[in]connectadditional connectivity data
[in]quantadditional mesh quantities
[in]time_steppointer to a time step structure

◆ cs_equation_system_log_monitoring()

void cs_equation_system_log_monitoring ( void  )

Print a synthesis of the monitoring information in the performance file.

◆ cs_equation_system_log_setup()

void cs_equation_system_log_setup ( void  )

Log the setup for all structures managing systems of equations.

◆ cs_equation_system_set_functions()

void cs_equation_system_set_functions ( void  )

Assign a set of pointer functions for managing all the systems of equations.

◆ cs_equation_system_set_sles()

void cs_equation_system_set_sles ( void  )

Set the SLES associated to each system of equations.

◆ cs_equation_system_solve()

void cs_equation_system_solve ( bool  cur2prev,
cs_equation_system_t eqsys 
)

Solve of a system of coupled equations. Unsteady case.

Parameters
[in]cur2prevtrue="current to previous" operation is performed
[in,out]eqsyspointer to the structure to solve

Variable Documentation

◆ _equation_systems

cs_equation_system_t** _equation_systems = NULL
static

◆ _n_equation_systems

int _n_equation_systems = 0
static