![]() |
programmer's documentation
|
Go to the source code of this file.
Data Structures | |
struct | cs_param_eq_algo_t |
struct | cs_param_eq_t |
struct | cs_param_navsto_t |
Macros | |
#define | CS_PARAM_EQ_UNSTEADY (1 << 0) /* 1: unsteady term */ |
#define | CS_PARAM_EQ_CONVECTION (1 << 1) /* 2: convection term */ |
#define | CS_PARAM_EQ_DIFFUSION (1 << 2) /* 4: diffusion term */ |
#define | CS_PARAM_EQ_SOURCETERM (1 << 3) /* 8: source term */ |
Functions | |
int | cs_param_eq_get_id_by_name (const char *ref_name) |
Find the id related to an equation definition from its name. More... | |
const cs_param_eq_t * | cs_param_eq_get_by_id (int eq_id) |
Retrieve a pointer to a cs_param_eq_t structure. More... | |
int | cs_param_eq_add (const char *name, const char *varname, cs_param_eq_type_t type, bool is_steady, bool do_convection, bool do_diffusion, cs_param_bc_type_t default_bc_type) |
Define and initialize a new structure to store parameters related to an equation. More... | |
void | cs_param_eq_set_diffusion_pty (const char *eq_name, const char *pty_name) |
Associate a material property to the diffusion term of an equation By default, a material property equal to the unity is set. More... | |
void | cs_param_eq_set_algo_type (const char *eqname, cs_param_eq_algo_type_t algo) |
Set the type of algorithm for solving the linear system related to the equation named eqname. More... | |
void | cs_param_eq_set_itsol_type (const char *name, cs_param_itsol_type_t itsol, cs_param_precond_type_t precond) |
Set the type of iterative solver and the type of preconditionner for solving the linear system related to the equation named eqname. More... | |
void | cs_param_eq_set_itsol_precision (const char *name, double accuracy) |
Set the solver precision. More... | |
void | cs_param_eq_set_itsol_max_iter (const char *name, int n_max_iter) |
Set the maximum number of iterations to do in an iterative solver. More... | |
void | cs_param_eq_set_itsol_normalization (const char *name, bool resid_normalized) |
Set if the residual is normalized or not. More... | |
void | cs_param_eq_set_verbosity_level (const char *name, int verbosity) |
Modify the level of verbosity (user function) More... | |
const char * | cs_param_eq_get_name (int eq_id) |
Retrieve the name associated to an equation from its id. More... | |
void | cs_param_eq_set_space_scheme (const char *name, cs_space_scheme_t scheme) |
Modify the scheme used to discretized in space an equation. More... | |
cs_space_scheme_t | cs_param_eq_get_space_scheme (int eq_id) |
Retrieve the numerical scheme used to discretize in space this equation from its id. More... | |
cs_param_eq_type_t | cs_param_eq_get_type (int eq_id) |
Retrieve the type of equation associated to this equation from its id. More... | |
void | cs_param_eq_hodge_diffusion_set_algo (const char *name, cs_param_hodge_algo_t algo) |
Modify the algorithm used to build the discrete Hodge operator related to the diffusion term. More... | |
void | cs_param_eq_hodge_diffusion_set_coef (const char *name, double coef) |
Modify the coefficient related to an algorithm used to build the discrete Hodge operator associated to the diffusion term. More... | |
void | cs_param_eq_add_scalbc_by_val (const char *eq_name, const char *location_name, cs_param_bc_type_t bc_type, double bc_val) |
Define a new boundary condition for a scalar. More... | |
void | cs_param_eq_add_scalbc_by_analytic (const char *eq_name, const char *location_name, cs_param_bc_type_t bc_type, cs_analytic_func_t *func) |
Define a new boundary condition for a scalar using an analytic function. More... | |
void | cs_param_eq_add_source_term_by_val (const char *eq_name, const char *st_name, const char *ml_name, cs_param_source_term_type_t type, cs_get_t get_imp, cs_get_t get_exp) |
Define a source term by value(s). This source term is added to the list of source terms associated to an equation. More... | |
void | cs_param_eq_add_source_term_by_user (const char *eq_name, const char *st_name, const char *ml_name, cs_param_source_term_type_t type, cs_quadra_type_t quad_type, cs_user_func_t *imp_func, cs_user_func_t *exp_func) |
Define a source term by a user-defined function. This source term is added to the list of source terms associated to an equation. More... | |
void | cs_param_eq_add_source_term_by_analytic (const char *eq_name, const char *st_name, const char *ml_name, cs_param_source_term_type_t type, cs_quadra_type_t quad_type, cs_analytic_func_t *imp_func, cs_analytic_func_t *exp_func) |
Define a source term by an analytic function. This source term is added to the list of source terms associated to an equation. More... | |
void | cs_param_eq_add_fields (void) |
Create a field related to a variable solved in an equation. More... | |
void | cs_param_eq_free_all (void) |
Free all definitions of equations initialized during the simulation. More... | |
void | cs_param_eq_get_info (int *n_cdo_eqs) |
Retrieve high-level information on the setting. More... | |
void | cs_param_eq_resume_all (void) |
Resume parameters of all conv./diff./source terms equations. More... | |
#define CS_PARAM_EQ_CONVECTION (1 << 1) /* 2: convection term */ |
#define CS_PARAM_EQ_DIFFUSION (1 << 2) /* 4: diffusion term */ |
#define CS_PARAM_EQ_SOURCETERM (1 << 3) /* 8: source term */ |
#define CS_PARAM_EQ_UNSTEADY (1 << 0) /* 1: unsteady term */ |
enum cs_param_eq_type_t |
int cs_param_eq_add | ( | const char * | name, |
const char * | varname, | ||
cs_param_eq_type_t | type, | ||
bool | is_steady, | ||
bool | do_convection, | ||
bool | do_diffusion, | ||
cs_param_bc_type_t | default_bc_type | ||
) |
Define and initialize a new structure to store parameters related to an equation.
[in] | name | name of the material property |
[in] | varname | name of the variable associated to this equation |
[in] | type | type of equation (scalar, vector, tensor...) |
[in] | is_steady | add an unsteady term or not |
[in] | do_convection | add a convection term |
[in] | do_diffusion | add a diffusion term |
[in] | default_bc_type | type of boundary condition set by default |
void cs_param_eq_add_fields | ( | void | ) |
Create a field related to a variable solved in an equation.
void cs_param_eq_add_scalbc_by_analytic | ( | const char * | eq_name, |
const char * | ml_name, | ||
cs_param_bc_type_t | bc_type, | ||
cs_analytic_func_t * | analytic | ||
) |
Define a new boundary condition for a scalar using an analytic function.
[in] | eq_name | name of the equation |
[in] | location_name | name of the location |
[in] | bc_type | type of boundary condition |
[in] | analytic | pointer to an analytic function |
Define a new boundary condition for a scalar using an analytic function.
[in] | eq_name | name of the equation |
[in] | location_name | name of the mesh location |
[in] | bc_type | type of boundary condition |
[in] | analytic | pointer to an analytic function |
void cs_param_eq_add_scalbc_by_val | ( | const char * | eq_name, |
const char * | ml_name, | ||
cs_param_bc_type_t | bc_type, | ||
double | bc_val | ||
) |
Define a new boundary condition for a scalar.
[in] | eq_name | name of the equation |
[in] | location_name | name of the location |
[in] | bc_type | type of boundary condition |
[in] | bc_val | value of the boundary condition |
Define a new boundary condition for a scalar.
[in] | eq_name | name of the equation |
[in] | ml_name | name of the mesh location |
[in] | bc_type | type of boundary condition |
[in] | bc_val | value of the boundary condition |
void cs_param_eq_add_source_term_by_analytic | ( | const char * | eq_name, |
const char * | st_name, | ||
const char * | ml_name, | ||
cs_param_source_term_type_t | type, | ||
cs_quadra_type_t | quad_type, | ||
cs_analytic_func_t * | imp_func, | ||
cs_analytic_func_t * | exp_func | ||
) |
Define a source term by an analytic function. This source term is added to the list of source terms associated to an equation.
[in] | eq_name | name of the equation |
[in] | st_name | name of the source term (for log/post-processing) |
[in] | ml_name | name of the mesh location |
[in] | do_post | true or false |
[in] | type | type of source term |
[in] | quad_type | quadrature rule |
[in] | imp_func | pointer to the function related to the implicit part |
[in] | exp_func | pointer to the function related to the explicit part |
void cs_param_eq_add_source_term_by_user | ( | const char * | eq_name, |
const char * | st_name, | ||
const char * | ml_name, | ||
cs_param_source_term_type_t | type, | ||
cs_quadra_type_t | quad_type, | ||
cs_user_func_t * | imp_func, | ||
cs_user_func_t * | exp_func | ||
) |
Define a source term by a user-defined function. This source term is added to the list of source terms associated to an equation.
[in] | eq_name | name of the equation |
[in] | st_name | name of the source term (for log/post-processing) |
[in] | ml_name | name of the mesh location |
[in] | type | type of source term |
[in] | quad_type | quadrature rule |
[in] | imp_func | pointer to a function related to the implicit part |
[in] | exp_func | pointer to a function related to the explicit part |
void cs_param_eq_add_source_term_by_val | ( | const char * | eq_name, |
const char * | st_name, | ||
const char * | ml_name, | ||
cs_param_source_term_type_t | type, | ||
cs_get_t | get_imp, | ||
cs_get_t | get_exp | ||
) |
Define a source term by value(s). This source term is added to the list of source terms associated to an equation.
[in] | eq_name | name of the equation |
[in] | st_name | name of the source term (for log/post-processing) |
[in] | ml_name | name of the mesh location |
[in] | type | type of source term |
[in] | get_imp | value(s) of the implicit part |
[in] | get_exp | value(s) of the explicit part |
void cs_param_eq_free_all | ( | void | ) |
Free all definitions of equations initialized during the simulation.
const cs_param_eq_t* cs_param_eq_get_by_id | ( | int | eq_id | ) |
Retrieve a pointer to a cs_param_eq_t structure.
[in] | eq_id | id of the selected equation |
int cs_param_eq_get_id_by_name | ( | const char * | ref_name | ) |
Find the id related to an equation definition from its name.
[in] | ref_name | name of the property to find |
void cs_param_eq_get_info | ( | int * | n_cdo_eqs | ) |
Retrieve high-level information on the setting.
[in,out] | n_cdo_eqs | number of additional equations using the CDO kernel |
const char* cs_param_eq_get_name | ( | int | eq_id | ) |
Retrieve the name associated to an equation from its id.
[in] | eq_id | id associated to a cs_param_eq_t structure |
cs_space_scheme_t cs_param_eq_get_space_scheme | ( | int | eq_id | ) |
Retrieve the numerical scheme used to discretize in space this equation from its id.
[in] | eq_id | id associated to a cs_param_eq_t structure |
cs_param_eq_type_t cs_param_eq_get_type | ( | int | eq_id | ) |
Retrieve the type of equation associated to this equation from its id.
[in] | eq_id | id associated to a cs_param_eq_t structure |
void cs_param_eq_hodge_diffusion_set_algo | ( | const char * | name, |
cs_param_hodge_algo_t | algo | ||
) |
Modify the algorithm used to build the discrete Hodge operator related to the diffusion term.
[in] | name | name of the equation to deal with |
[in] | scheme | type of space scheme to use |
void cs_param_eq_hodge_diffusion_set_coef | ( | const char * | name, |
double | coef | ||
) |
Modify the coefficient related to an algorithm used to build the discrete Hodge operator associated to the diffusion term.
[in] | name | name of the equation to deal with |
[in] | coef | value of the coefficient |
void cs_param_eq_resume_all | ( | void | ) |
Resume parameters of all conv./diff./source terms equations.
void cs_param_eq_set_algo_type | ( | const char * | eqname, |
cs_param_eq_algo_type_t | algo | ||
) |
Set the type of algorithm for solving the linear system related to the equation named eqname.
[in] | eqname | name of the equation to deal with |
[in] | algo | algorithm used for solving linear systems |
void cs_param_eq_set_diffusion_pty | ( | const char * | eq_name, |
const char * | pty_name | ||
) |
Associate a material property to the diffusion term of an equation By default, a material property equal to the unity is set.
[in] | eq_name | name of the equation to deal with |
[in] | pty_name | name of the material property to associate |
void cs_param_eq_set_itsol_max_iter | ( | const char * | name, |
int | n_max_iter | ||
) |
Set the maximum number of iterations to do in an iterative solver.
[in] | name | name of the equation to deal with |
[in] | n_max_iter | max num. of iterations |
void cs_param_eq_set_itsol_normalization | ( | const char * | name, |
bool | resid_normalized | ||
) |
Set if the residual is normalized or not.
[in] | name | name of the equation to deal with |
[in] | resid_normalized | true/false |
void cs_param_eq_set_itsol_precision | ( | const char * | name, |
double | accuracy | ||
) |
Set the solver precision.
[in] | name | name of the equation to deal with |
[in] | accuracy | value of the stopping criterion |
void cs_param_eq_set_itsol_type | ( | const char * | name, |
cs_param_itsol_type_t | itsol, | ||
cs_param_precond_type_t | precond | ||
) |
Set the type of iterative solver and the type of preconditionner for solving the linear system related to the equation named eqname.
[in] | name | name of the equation to deal with |
[in] | itsol | iterative solver used for solving linear systems |
[in] | precond | preconditionner used for solving linear systems |
void cs_param_eq_set_space_scheme | ( | const char * | name, |
cs_space_scheme_t | scheme | ||
) |
Modify the scheme used to discretized in space an equation.
[in] | name | name of the equation to deal with |
[in] | scheme | type of space scheme to use |
Modify the scheme used to discretized in space an equation.
[in] | name | name of the equation to deal with |
[in] | scheme | type of space scheme to use |
void cs_param_eq_set_verbosity_level | ( | const char * | name, |
int | verbosity | ||
) |
Modify the level of verbosity (user function)
[in] | name | name of the equation to deal with |
[in] | verbosity | level of verbosity |