1 #ifndef __CS_EQUATION_PARAM_H__
2 #define __CS_EQUATION_PARAM_H__
92 #define CS_EQUATION_LOCKED (1 << 0)
93 #define CS_EQUATION_UNSTEADY (1 << 1)
94 #define CS_EQUATION_CONVECTION (1 << 2)
95 #define CS_EQUATION_DIFFUSION (1 << 3)
96 #define CS_EQUATION_CURLCURL (1 << 4)
97 #define CS_EQUATION_GRADDIV (1 << 5)
98 #define CS_EQUATION_REACTION (1 << 6)
99 #define CS_EQUATION_FORCE_VALUES (1 << 7)
100 #define CS_EQUATION_USER_HOOK (1 << 8)
121 #define CS_EQUATION_POST_BALANCE (1 << 0)
122 #define CS_EQUATION_POST_PECLET (1 << 1)
123 #define CS_EQUATION_POST_UPWIND_COEF (1 << 2)
124 #define CS_EQUATION_POST_NORMAL_FLUX (1 << 3)
143 #define CS_EQUATION_ENFORCE_BY_CELLS (1 << 0)
144 #define CS_EQUATION_ENFORCE_BY_DOFS (1 << 1)
145 #define CS_EQUATION_ENFORCE_BY_REFERENCE_VALUE (1 << 2)
1127 assert(eqp != NULL);
1144 assert(eqp != NULL);
1164 assert(eqp != NULL);
1184 assert(eqp != NULL);
1204 assert(eqp != NULL);
1224 assert(eqp != NULL);
1244 assert(eqp != NULL);
1264 assert(eqp != NULL);
1285 assert(eqp != NULL);
1306 assert(eqp != NULL);
1332 assert(eqp != NULL);
1358 if (eqp->
name == NULL)
1360 if (strcmp(eqp->
name, name) == 0)
1449 const char *keyval);
1698 const char *z_name);
1716 const char *z_name);
1731 const char *z_name);
#define restrict
Definition: cs_defs.h:124
#define BEGIN_C_DECLS
Definition: cs_defs.h:492
double cs_real_t
Floating-point value.
Definition: cs_defs.h:304
#define END_C_DECLS
Definition: cs_defs.h:493
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
unsigned short int cs_flag_t
Definition: cs_defs.h:306
cs_xdef_t * cs_equation_add_ic_by_analytic(cs_equation_param_t *eqp, const char *z_name, cs_analytic_func_t *analytic, void *input)
Define the initial condition for the unknown related to this equation. This definition can be done on...
Definition: cs_equation_param.c:1695
cs_xdef_t * cs_equation_add_volume_mass_injection_by_value(cs_equation_param_t *eqp, const char *z_name, double *val)
Add a new volume mass injection definition source term by initializing a cs_xdef_t structure,...
Definition: cs_equation_param.c:2613
int cs_equation_add_reaction(cs_equation_param_t *eqp, cs_property_t *property)
Associate a new term related to the reaction operator for the equation associated to the given cs_equ...
Definition: cs_equation_param.c:2346
void cs_equation_add_graddiv(cs_equation_param_t *eqp, cs_property_t *property)
Associate a new term related to the grad-div operator for the equation associated to the given cs_equ...
Definition: cs_equation_param.c:2245
cs_xdef_t * cs_equation_add_ic_by_qov(cs_equation_param_t *eqp, const char *z_name, double quantity)
Define the initial condition for the unknown related to this equation This definition can be done on ...
Definition: cs_equation_param.c:1648
cs_xdef_t * cs_equation_add_bc_by_analytic(cs_equation_param_t *eqp, const cs_param_bc_type_t bc_type, const char *z_name, cs_analytic_func_t *analytic, void *input)
Define and initialize a new structure to set a boundary condition related to the given equation param...
Definition: cs_equation_param.c:1909
cs_xdef_t * cs_equation_add_source_term_by_dof_func(cs_equation_param_t *eqp, const char *z_name, cs_flag_t loc_flag, cs_dof_func_t *func, void *input)
Add a new source term by initializing a cs_xdef_t structure. Case of a definition by a DoF function.
Definition: cs_equation_param.c:2490
void cs_equation_enforce_value_on_cell_selection(cs_equation_param_t *eqp, cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const cs_real_t ref_value[], const cs_real_t elt_values[])
Add an enforcement of the value related to the degrees of freedom associated to the list of selected ...
Definition: cs_equation_param.c:2845
cs_xdef_t * cs_equation_add_bc_by_dof_func(cs_equation_param_t *eqp, const cs_param_bc_type_t bc_type, const char *z_name, cs_flag_t loc_flag, cs_dof_func_t *func, void *input)
Define and initialize a new structure to set a boundary condition related to the given cs_equation_pa...
Definition: cs_equation_param.c:1989
#define CS_EQUATION_CURLCURL
The term related to the curl-curl operator is needed.
Definition: cs_equation_param.h:96
bool cs_equation_param_has_robin_bc(const cs_equation_param_t *eqp)
Ask if the parameter settings of the equation has requested the treatment of Robin boundary condition...
Definition: cs_equation_param.c:1569
void cs_equation_remove_bc(cs_equation_param_t *eqp, const char *z_name)
Remove boundary condition from the given equation param structure for a given zone.
Definition: cs_equation_param.c:2103
void cs_equation_add_sliding_condition(cs_equation_param_t *eqp, const char *z_name)
Define and initialize a new structure to set a sliding boundary condition related to the given equati...
Definition: cs_equation_param.c:2147
#define CS_EQUATION_UNSTEADY
Unsteady term is needed.
Definition: cs_equation_param.h:93
void cs_equation_enforce_vertex_dofs(cs_equation_param_t *eqp, cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const cs_real_t ref_value[], const cs_real_t elt_values[])
Add an enforcement of the value of degrees of freedom located at mesh vertices. The spatial discretiz...
Definition: cs_equation_param.c:2766
#define CS_EQUATION_DIFFUSION
Diffusion term is needed. A scalar-/vector-valued Laplacian with div .grad.
Definition: cs_equation_param.h:95
cs_xdef_t * cs_equation_add_ic_by_value(cs_equation_param_t *eqp, const char *z_name, cs_real_t *val)
Define the initial condition for the unknown related to this equation This definition can be done on ...
Definition: cs_equation_param.c:1600
#define CS_EQUATION_USER_HOOK
Activate a user hook to get a fine control of the discretization process during the cellwise building...
Definition: cs_equation_param.h:100
cs_xdef_t * cs_equation_add_bc_by_array(cs_equation_param_t *eqp, const cs_param_bc_type_t bc_type, const char *z_name, cs_flag_t loc, cs_real_t *array, bool is_owner, cs_lnum_t *index)
Define and initialize a new structure to set a boundary condition related to the given equation struc...
Definition: cs_equation_param.c:1830
void cs_equation_param_set_sles(cs_equation_param_t *eqp)
Set parameters for initializing SLES structures used for the resolution of the linear system....
Definition: cs_equation_param.c:1258
void cs_equation_set_param(cs_equation_param_t *eqp, cs_equation_key_t key, const char *keyval)
Set a parameter attached to a keyname in a cs_equation_param_t structure.
Definition: cs_equation_param.c:1222
cs_equation_param_t * cs_equation_create_param(const char *name, cs_equation_type_t type, int dim, cs_param_bc_type_t default_bc)
Create a cs_equation_param_t structure.
Definition: cs_equation_param.c:752
#define CS_EQUATION_REACTION
Reaction term is needed.
Definition: cs_equation_param.h:98
cs_equation_key_t
List of available keys for setting the parameters of an equation.
Definition: cs_equation_param.h:1074
@ CS_EQKEY_SOLVER_FAMILY
Definition: cs_equation_param.h:1100
@ CS_EQKEY_ADV_EXTRAPOL
Definition: cs_equation_param.h:1076
@ CS_EQKEY_VERBOSITY
Definition: cs_equation_param.h:1104
@ CS_EQKEY_HODGE_TIME_ALGO
Definition: cs_equation_param.h:1091
@ CS_EQKEY_ADV_STRATEGY
Definition: cs_equation_param.h:1079
@ CS_EQKEY_ITSOL_MAX_ITER
Definition: cs_equation_param.h:1095
@ CS_EQKEY_ITSOL
Definition: cs_equation_param.h:1093
@ CS_EQKEY_BC_WEAK_PENA_COEFF
Definition: cs_equation_param.h:1085
@ CS_EQKEY_BC_QUADRATURE
Definition: cs_equation_param.h:1083
@ CS_EQKEY_HODGE_DIFF_COEF
Definition: cs_equation_param.h:1090
@ CS_EQKEY_HODGE_DIFF_ALGO
Definition: cs_equation_param.h:1089
@ CS_EQKEY_AMG_TYPE
Definition: cs_equation_param.h:1081
@ CS_EQKEY_ITSOL_RESNORM_TYPE
Definition: cs_equation_param.h:1096
@ CS_EQKEY_ITSOL_EPS
Definition: cs_equation_param.h:1094
@ CS_EQKEY_ADV_UPWIND_PORTION
Definition: cs_equation_param.h:1080
@ CS_EQKEY_TIME_SCHEME
Definition: cs_equation_param.h:1102
@ CS_EQKEY_DO_LUMPING
Definition: cs_equation_param.h:1086
@ CS_EQKEY_PRECOND
Definition: cs_equation_param.h:1098
@ CS_EQKEY_ADV_SCHEME
Definition: cs_equation_param.h:1078
@ CS_EQKEY_BC_STRONG_PENA_COEFF
Definition: cs_equation_param.h:1084
@ CS_EQKEY_TIME_THETA
Definition: cs_equation_param.h:1103
@ CS_EQKEY_ADV_FORMULATION
Definition: cs_equation_param.h:1077
@ CS_EQKEY_EXTRA_OP
Definition: cs_equation_param.h:1088
@ CS_EQKEY_OMP_ASSEMBLY_STRATEGY
Definition: cs_equation_param.h:1097
@ CS_EQKEY_DOF_REDUCTION
Definition: cs_equation_param.h:1087
@ CS_EQKEY_SPACE_SCHEME
Definition: cs_equation_param.h:1101
@ CS_EQKEY_BC_ENFORCEMENT
Definition: cs_equation_param.h:1082
@ CS_EQKEY_HODGE_REAC_ALGO
Definition: cs_equation_param.h:1092
@ CS_EQKEY_SLES_VERBOSITY
Definition: cs_equation_param.h:1099
@ CS_EQKEY_N_KEYS
Definition: cs_equation_param.h:1106
void cs_equation_add_curlcurl(cs_equation_param_t *eqp, cs_property_t *property, int inversion)
Associate a new term related to the curl-curl operator for the equation associated to the given cs_eq...
Definition: cs_equation_param.c:2214
cs_xdef_t * cs_equation_add_volume_mass_injection_by_qov(cs_equation_param_t *eqp, const char *z_name, double *quantity)
Add a new volume mass injection definition source term by initializing a cs_xdef_t structure,...
Definition: cs_equation_param.c:2661
cs_equation_param_t * cs_equation_free_param(cs_equation_param_t *eqp)
Free a cs_equation_param_t.
Definition: cs_equation_param.c:1198
cs_xdef_t * cs_equation_find_bc(cs_equation_param_t *eqp, const char *z_name)
Return pointer to existing boundary condition definition structure for the given equation param struc...
Definition: cs_equation_param.c:2066
#define CS_EQUATION_FORCE_VALUES
Add an algebraic manipulation to set the value of a given set of interior degrees of freedom.
Definition: cs_equation_param.h:99
void cs_equation_add_advection_scaling_property(cs_equation_param_t *eqp, cs_property_t *property)
Associate a scaling property to the advection.
Definition: cs_equation_param.c:2320
void cs_equation_param_last_stage(cs_equation_param_t *eqp)
Last modification of the cs_equation_param_t structure before launching the computation.
Definition: cs_equation_param.c:1281
void cs_equation_add_xdef_bc(cs_equation_param_t *eqp, cs_xdef_t *xdef)
Set a boundary condition from an existing cs_xdef_t structure The lifecycle of the cs_xdef_t structur...
Definition: cs_equation_param.c:1741
void cs_equation_add_advection(cs_equation_param_t *eqp, cs_adv_field_t *adv_field)
Associate a new term related to the advection operator for the equation associated to the given cs_eq...
Definition: cs_equation_param.c:2296
#define CS_EQUATION_CONVECTION
Convection term is needed.
Definition: cs_equation_param.h:94
cs_xdef_t * cs_equation_add_bc_by_value(cs_equation_param_t *eqp, const cs_param_bc_type_t bc_type, const char *z_name, cs_real_t *values)
Define and initialize a new structure to set a boundary condition related to the given equation struc...
Definition: cs_equation_param.c:1769
void cs_equation_copy_param_from(const cs_equation_param_t *ref, cs_equation_param_t *dst, bool copy_fid)
Copy the settings from one cs_equation_param_t structure to another one. The name is not copied.
Definition: cs_equation_param.c:931
cs_xdef_t * cs_equation_add_source_term_by_val(cs_equation_param_t *eqp, const char *z_name, cs_real_t *val)
Add a new source term by initializing a cs_xdef_t structure. Case of a definition by a constant value...
Definition: cs_equation_param.c:2384
cs_xdef_t * cs_equation_add_source_term_by_analytic(cs_equation_param_t *eqp, const char *z_name, cs_analytic_func_t *func, void *input)
Add a new source term by initializing a cs_xdef_t structure. Case of a definition by an analytical fu...
Definition: cs_equation_param.c:2433
void cs_equation_add_time(cs_equation_param_t *eqp, cs_property_t *property)
Associate a new term related to the time derivative operator for the equation associated to the given...
Definition: cs_equation_param.c:2271
#define CS_EQUATION_GRADDIV
The term related to the grad-div operator is needed.
Definition: cs_equation_param.h:97
void cs_equation_clear_param(cs_equation_param_t *eqp)
Free the contents of a cs_equation_param_t.
Definition: cs_equation_param.c:1115
cs_equation_type_t
Type of equations managed by the solver.
Definition: cs_equation_param.h:181
@ CS_EQUATION_TYPE_NAVSTO
Definition: cs_equation_param.h:185
@ CS_EQUATION_TYPE_USER
Definition: cs_equation_param.h:189
@ CS_EQUATION_TYPE_THERMAL
Definition: cs_equation_param.h:187
@ CS_EQUATION_TYPE_GROUNDWATER
Definition: cs_equation_param.h:183
@ CS_EQUATION_TYPE_SOLIDIFICATION
Definition: cs_equation_param.h:188
@ CS_EQUATION_TYPE_PREDEFINED
Definition: cs_equation_param.h:186
@ CS_EQUATION_N_TYPES
Definition: cs_equation_param.h:191
@ CS_EQUATION_TYPE_MAXWELL
Definition: cs_equation_param.h:184
void cs_equation_add_diffusion(cs_equation_param_t *eqp, cs_property_t *property)
Associate a new term related to the Laplacian operator for the equation associated to the given cs_eq...
Definition: cs_equation_param.c:2188
void cs_equation_param_log(const cs_equation_param_t *eqp)
Print the detail of a cs_equation_param_t structure.
Definition: cs_equation_param.c:1313
cs_xdef_t * cs_equation_add_volume_mass_injection_by_analytic(cs_equation_param_t *eqp, const char *z_name, cs_analytic_func_t *func, void *input)
Add a new volume mass injection definition source term by initializing a cs_xdef_t structure,...
Definition: cs_equation_param.c:2709
cs_xdef_t * cs_equation_add_source_term_by_array(cs_equation_param_t *eqp, const char *z_name, cs_flag_t loc, cs_real_t *array, bool is_owner, cs_lnum_t *index)
Add a new source term by initializing a cs_xdef_t structure. Case of a definition by an array.
Definition: cs_equation_param.c:2551
cs_param_assemble_omp_strategy_t
Definition: cs_param_cdo.h:91
Structure and routines handling the SLES settings stored inside a cs_param_sles_t structure.
void() cs_dof_func_t(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, void *input, cs_real_t *retval)
Generic function pointer for computing a quantity at predefined locations such as degrees of freedom ...
Definition: cs_param_types.h:119
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param_types.h:172
cs_param_advection_form_t
Definition: cs_param_types.h:267
void() cs_analytic_func_t(cs_real_t time, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, const cs_real_t *coords, bool dense_output, void *input, cs_real_t *retval)
Generic function pointer for an evaluation relying on an analytic function elt_ids is optional....
Definition: cs_param_types.h:94
cs_param_bc_type_t
Definition: cs_param_types.h:431
cs_param_advection_extrapol_t
Choice of how to extrapolate the advection field in the advection term.
Definition: cs_param_types.h:378
cs_param_bc_enforce_t
Definition: cs_param_types.h:475
cs_param_time_scheme_t
Definition: cs_param_types.h:234
cs_param_advection_scheme_t
Definition: cs_param_types.h:311
cs_param_dof_reduction_t
Definition: cs_param_types.h:199
cs_param_advection_strategy_t
Choice of how to handle the advection term in an equation.
Definition: cs_param_types.h:344
@ CS_PARAM_ADVECTION_IMPLICIT_LINEARIZED
Definition: cs_param_types.h:347
@ CS_PARAM_ADVECTION_IMPLICIT_FULL
Definition: cs_param_types.h:346
Definition: cs_advection_field.h:149
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:202
cs_real_t strong_pena_bc_coeff
Definition: cs_equation_param.h:521
double extrag
Definition: cs_equation_param.h:478
int istat
Definition: cs_equation_param.h:454
cs_real_t upwind_portion
Definition: cs_equation_param.h:663
int imligr
Definition: cs_equation_param.h:467
cs_param_assemble_omp_strategy_t omp_assembly_choice
Definition: cs_equation_param.h:801
int n_reaction_terms
Definition: cs_equation_param.h:687
int ndircl
Definition: cs_equation_param.h:456
int iwarni
Definition: cs_equation_param.h:222
cs_real_t * enforced_cell_values
Definition: cs_equation_param.h:772
cs_real_t weak_pena_bc_coeff
Definition: cs_equation_param.h:522
double blencv
Definition: cs_equation_param.h:472
cs_param_bc_enforce_t default_enforcement
Definition: cs_equation_param.h:520
cs_xdef_t ** volume_mass_injections
Definition: cs_equation_param.h:725
cs_property_t * diffusion_property
Definition: cs_equation_param.h:587
cs_param_sles_t * sles_param
Definition: cs_equation_param.h:790
int isstpc
Definition: cs_equation_param.h:463
int space_poly_degree
Definition: cs_equation_param.h:244
int ibdtso
Definition: cs_equation_param.h:462
int nswrsm
Definition: cs_equation_param.h:465
cs_param_advection_scheme_t adv_scheme
Definition: cs_equation_param.h:660
int idften
Definition: cs_equation_param.h:459
cs_property_t * curlcurl_property
Definition: cs_equation_param.h:603
double epsrsm
Definition: cs_equation_param.h:475
cs_xdef_t ** ic_defs
Definition: cs_equation_param.h:537
int idiff
Definition: cs_equation_param.h:457
cs_real_t * enforcement_ref_value
Definition: cs_equation_param.h:768
double relaxv
Definition: cs_equation_param.h:479
cs_param_time_scheme_t time_scheme
Definition: cs_equation_param.h:571
int idifft
Definition: cs_equation_param.h:458
cs_hodge_param_t reaction_hodgep
Definition: cs_equation_param.h:686
double thetav
Definition: cs_equation_param.h:471
cs_hodge_param_t graddiv_hodgep
Definition: cs_equation_param.h:618
int imrgra
Definition: cs_equation_param.h:466
int iswdyn
Definition: cs_equation_param.h:460
cs_xdef_t ** source_terms
Definition: cs_equation_param.h:705
cs_lnum_t n_enforced_cells
Definition: cs_equation_param.h:770
cs_hodge_param_t time_hodgep
Definition: cs_equation_param.h:569
int idircl
Definition: cs_equation_param.h:455
cs_param_advection_strategy_t adv_strategy
Definition: cs_equation_param.h:661
cs_lnum_t * enforced_dof_ids
Definition: cs_equation_param.h:775
cs_adv_field_t * adv_field
Definition: cs_equation_param.h:664
int n_ic_defs
Definition: cs_equation_param.h:536
cs_real_t * enforced_dof_values
Definition: cs_equation_param.h:776
int dim
Definition: cs_equation_param.h:210
double epsilo
Definition: cs_equation_param.h:474
int nswrgr
Definition: cs_equation_param.h:464
bool do_lumping
Definition: cs_equation_param.h:551
cs_flag_t flag
Definition: cs_equation_param.h:229
cs_hodge_param_t curlcurl_hodgep
Definition: cs_equation_param.h:602
cs_hodge_param_t diffusion_hodgep
Definition: cs_equation_param.h:586
cs_param_dof_reduction_t dof_reduction
Definition: cs_equation_param.h:239
int verbosity
Definition: cs_equation_param.h:221
double epsrgr
Definition: cs_equation_param.h:476
cs_equation_type_t type
Definition: cs_equation_param.h:209
int n_source_terms
Definition: cs_equation_param.h:704
cs_property_t * graddiv_property
Definition: cs_equation_param.h:619
double climgr
Definition: cs_equation_param.h:477
cs_property_t ** reaction_properties
Definition: cs_equation_param.h:688
cs_param_advection_form_t adv_formulation
Definition: cs_equation_param.h:659
cs_property_t * adv_scaling_property
Definition: cs_equation_param.h:665
cs_xdef_t ** bc_defs
Definition: cs_equation_param.h:518
cs_flag_t process_flag
Definition: cs_equation_param.h:235
int icoupl
Definition: cs_equation_param.h:470
int n_volume_mass_injections
Definition: cs_equation_param.h:724
int iwgrec
Definition: cs_equation_param.h:469
int n_bc_defs
Definition: cs_equation_param.h:517
cs_property_t * time_property
Definition: cs_equation_param.h:570
cs_param_advection_extrapol_t adv_extrapol
Definition: cs_equation_param.h:662
int ischcv
Definition: cs_equation_param.h:461
cs_flag_t enforcement_type
Definition: cs_equation_param.h:767
cs_param_bc_type_t default_bc
Definition: cs_equation_param.h:516
char *restrict name
Definition: cs_equation_param.h:208
cs_param_space_scheme_t space_scheme
Definition: cs_equation_param.h:238
int ircflu
Definition: cs_equation_param.h:468
int iconv
Definition: cs_equation_param.h:453
cs_real_t theta
Definition: cs_equation_param.h:572
cs_lnum_t * enforced_cell_ids
Definition: cs_equation_param.h:771
double blend_st
Definition: cs_equation_param.h:473
cs_lnum_t n_enforced_dofs
Definition: cs_equation_param.h:774
Structure storing all metadata/parameters related to the usage of a discrete Hodge operator.
Definition: cs_hodge.h:165
Structure storing all metadata related to the resolution of a linear system with an iterative solver.
Definition: cs_param_sles.h:62
Structure associated to the definition of a property relying on the cs_xdef_t structure.
Structure storing medata for defining a quantity in a very flexible way.
Definition: cs_xdef.h:154