#include "cs_equation.h"
#include "cs_equation_priv.h"
#include "cs_equation_system_param.h"
#include "cs_param_types.h"
Go to the source code of this file.
Data Structures | |
struct | cs_equation_system_t |
Main structure to handle a set of coupled equations. More... | |
Typedefs | |
typedef void *() | cs_equation_system_define_t(int n_eqs, const cs_equation_system_param_t *sysp, cs_equation_core_t **core_array, cs_cdo_system_helper_t **p_sh) |
Create and initialize equation builders and scheme context 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 equations. More... | |
typedef void *() | cs_equation_system_free_t(int n_eqs, cs_equation_core_t **core_array, 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... | |
typedef void() | cs_equation_system_solve_t(bool c2p, const cs_time_step_t *time_step, int n_eqs, cs_equation_system_param_t *sysp, cs_equation_core_t **blocks, void *sys_context, cs_cdo_system_helper_t *sh) |
Build and solve a linear system within the CDO framework. More... | |
Functions | |
int | cs_equation_system_get_n_systems (void) |
Get the number of systems of equations. More... | |
cs_equation_system_t * | cs_equation_system_by_id (int sys_id) |
Retrieve the pointer to the equation system related to the given id. More... | |
cs_equation_system_param_t * | cs_equation_system_param_by_id (int sys_id) |
Retrieve the pointer to the set of parameters of a system of equations related to the given id. 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) |
Destroy all cs_equation_system_t structures. 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 (const cs_time_step_t *time_step, 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... | |
typedef void *() cs_equation_system_define_t(int n_eqs, const cs_equation_system_param_t *sysp, cs_equation_core_t **core_array, cs_cdo_system_helper_t **p_sh) |
Create and initialize equation builders and scheme context 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 equations.
Generic prototype to define the function pointer.
[in] | n_eqs | number of equations |
[in] | sysp | set of parameters to specify a system of eqs |
[in,out] | core_array | array of the core structures for an equation |
[out] | p_sh | double pointer to a system helper to define |
typedef void *() cs_equation_system_free_t(int n_eqs, cs_equation_core_t **core_array, 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.
Generic prototype to define the function pointer.
[in] | n_eqs | number of equations |
[in,out] | core_array | array of the core structures for an equation |
[in,out] | sys_context | pointer to a context structure cast on-the-fly |
typedef void() cs_equation_system_solve_t(bool c2p, const cs_time_step_t *time_step, int n_eqs, cs_equation_system_param_t *sysp, cs_equation_core_t **blocks, void *sys_context, cs_cdo_system_helper_t *sh) |
Build and solve a linear system within the CDO framework.
[in] | c2p | do a "current to previous" operation performed ? |
[in] | time_step | pointer to a time step structure |
[in] | n_eqs | number of equations in the system to solve |
[in] | sysp | set of paremeters for the system of equations |
[in,out] | blocks | array of the core members for an equation |
[in,out] | sys_context | pointer to a sructure cast on-the-fly ? |
[in,out] | sh | pointer to a system helper structure |
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 |
cs_equation_system_t * cs_equation_system_by_id | ( | int | sys_id | ) |
Retrieve the pointer to the equation system related to the given id.
[in] | sys_id | id the system of equations |
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 | ) |
Destroy all cs_equation_system_t structures.
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.
cs_equation_system_param_t * cs_equation_system_param_by_id | ( | int | sys_id | ) |
Retrieve the pointer to the set of parameters of a system of equations related to the given id.
[in] | sys_id | id the system 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 | ( | const cs_time_step_t * | time_step, |
bool | cur2prev, | ||
cs_equation_system_t * | eqsys | ||
) |
Solve of a system of coupled equations. Unsteady case.
[in] | time_step | pointer to a time step structure |
[in] | cur2prev | true="current to previous" operation is performed |
[in,out] | eqsys | pointer to the structure to solve |