#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"
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_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. 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 |
#define CS_EQUATION_SYSTEM_DBG 0 |
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.
[in] | sysname | name of the system of equations |
[in] | n_eqs | number of coupled equations composing the system |
[in] | block_var_dim | dimension of the variable in each block |
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.
[in] | row_id | position in the block matrix |
[in] | eq | pointer to the equation to add |
[in,out] | eqsys | pointer to a cs_equation_system_t to update |
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.
[in] | row_id | row position id |
[in] | col_id | column position id |
[in] | eqp | pointer to the equation parameter to add |
[in,out] | eqsys | pointer to a cs_equation_system_t to update |
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.
void cs_equation_system_destroy_all | ( | void | ) |
Free all structures used to couple equations.
Destroy all cs_equation_system_t structures.
int cs_equation_system_get_n_systems | ( | void | ) |
Get the number of systems of equations.
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.
[in] | mesh | basic mesh structure |
[in] | connect | additional connectivity data |
[in] | quant | additional mesh quantities |
[in] | time_step | pointer to a time step structure |
void cs_equation_system_log_monitoring | ( | void | ) |
Print a synthesis of the monitoring information in the performance file.
void cs_equation_system_log_setup | ( | void | ) |
Log the setup for all structures managing systems of equations.
void cs_equation_system_set_functions | ( | void | ) |
Assign a set of pointer functions for managing all the systems of equations.
void cs_equation_system_set_sles | ( | void | ) |
Set the SLES associated to each system of equations.
void cs_equation_system_solve | ( | bool | cur2prev, |
cs_equation_system_t * | eqsys | ||
) |
Solve of a system of coupled equations. Unsteady case.
[in] | cur2prev | true="current to previous" operation is performed |
[in,out] | eqsys | pointer to the structure to solve |
|
static |
|
static |