My Project
programmer's documentation
cs_equation_param.h
Go to the documentation of this file.
1 #ifndef __CS_EQUATION_PARAM_H__
2 #define __CS_EQUATION_PARAM_H__
3 
4 /*============================================================================
5  * Header to handle specific settings related to a cs_equation_t structure
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2019 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------
29  * Local headers
30  *----------------------------------------------------------------------------*/
31 
32 #include "cs_advection_field.h"
33 #include "cs_param.h"
34 #include "cs_param_cdo.h"
35 #include "cs_property.h"
36 #include "cs_xdef.h"
37 
38 /*----------------------------------------------------------------------------*/
39 
41 
50 /*============================================================================
51  * Macro definitions
52  *============================================================================*/
53 
78 #define CS_EQUATION_LOCKED (1 << 0) /* 1 */
79 #define CS_EQUATION_UNSTEADY (1 << 1) /* 2 */
80 #define CS_EQUATION_CONVECTION (1 << 2) /* 4 */
81 #define CS_EQUATION_DIFFUSION (1 << 3) /* 8 */
82 #define CS_EQUATION_REACTION (1 << 4) /* 16 */
83 #define CS_EQUATION_FORCE_VALUES (1 << 5) /* 32 */
84 
104 #define CS_EQUATION_POST_BALANCE (1 << 0) /* 1 */
105 #define CS_EQUATION_POST_PECLET (1 << 1) /* 2 */
106 #define CS_EQUATION_POST_UPWIND_COEF (1 << 2) /* 4 */
107 #define CS_EQUATION_POST_NORMAL_FLUX (1 << 3) /* 8 */
108 
111 /*============================================================================
112  * Type definitions
113  *============================================================================*/
114 
133 typedef enum {
134 
140 
142 
148 typedef struct {
149 
154  char *restrict name;
156  int dim;
157  int verbosity;
164 
170 
171  /* Numerical settings */
179 
218 
222 
237 
251 
272 
287 
314 
337 
354 
376 
390 
401 
405 
643 typedef enum {
644 
672 
674 
676 
677 /*============================================================================
678  * Static inline public function prototypes
679  *============================================================================*/
680 
681 /*----------------------------------------------------------------------------*/
688 /*----------------------------------------------------------------------------*/
689 
690 static inline void
692  cs_flag_t flag)
693 {
694  assert(eqp != NULL);
695  eqp->flag |= flag;
696 }
697 
698 /*----------------------------------------------------------------------------*/
706 /*----------------------------------------------------------------------------*/
707 
708 static inline bool
710 {
711  assert(eqp != NULL);
712  if (eqp->flag & CS_EQUATION_DIFFUSION)
713  return true;
714  else
715  return false;
716 }
717 
718 /*----------------------------------------------------------------------------*/
726 /*----------------------------------------------------------------------------*/
727 
728 static inline bool
730 {
731  assert(eqp != NULL);
732  if (eqp->flag & CS_EQUATION_CONVECTION)
733  return true;
734  else
735  return false;
736 }
737 
738 /*----------------------------------------------------------------------------*/
746 /*----------------------------------------------------------------------------*/
747 
748 static inline bool
750 {
751  assert(eqp != NULL);
752  if (eqp->flag & CS_EQUATION_REACTION)
753  return true;
754  else
755  return false;
756 }
757 
758 /*----------------------------------------------------------------------------*/
766 /*----------------------------------------------------------------------------*/
767 
768 static inline bool
770 {
771  assert(eqp != NULL);
772  if (eqp->flag & CS_EQUATION_UNSTEADY)
773  return true;
774  else
775  return false;
776 }
777 
778 /*----------------------------------------------------------------------------*/
786 /*----------------------------------------------------------------------------*/
787 
788 static inline bool
790 {
791  assert(eqp != NULL);
792  if (eqp->n_source_terms > 0)
793  return true;
794  else
795  return false;
796 }
797 
798 /*----------------------------------------------------------------------------*/
807 /*----------------------------------------------------------------------------*/
808 
809 static inline bool
811 {
812  assert(eqp != NULL);
813  if (eqp->flag & CS_EQUATION_FORCE_VALUES)
814  return true;
815  else
816  return false;
817 }
818 
819 /*----------------------------------------------------------------------------*/
830 /*----------------------------------------------------------------------------*/
831 
832 static inline bool
834  const char *name)
835 {
836  if (eqp == NULL)
837  return false;
838  if (eqp->name == NULL)
839  return false;
840  if (strcmp(eqp->name, name) == 0)
841  return true;
842  else
843  return false;
844 }
845 
846 /*============================================================================
847  * Public function prototypes
848  *============================================================================*/
849 
850 /*----------------------------------------------------------------------------*/
861 /*----------------------------------------------------------------------------*/
862 
864 cs_equation_create_param(const char *name,
866  int dim,
867  cs_param_bc_type_t default_bc);
868 
869 /*----------------------------------------------------------------------------*/
877 /*----------------------------------------------------------------------------*/
878 
879 void
881  cs_equation_param_t *dst);
882 
883 /*----------------------------------------------------------------------------*/
891 /*----------------------------------------------------------------------------*/
892 
895 
896 /*----------------------------------------------------------------------------*/
905 /*----------------------------------------------------------------------------*/
906 
907 void
909  cs_equation_key_t key,
910  const char *keyval);
911 
912 /*----------------------------------------------------------------------------*/
921 /*----------------------------------------------------------------------------*/
922 
923 void
925  int field_id);
926 
927 /*----------------------------------------------------------------------------*/
934 /*----------------------------------------------------------------------------*/
935 
936 void
938 
939 /*----------------------------------------------------------------------------*/
945 /*----------------------------------------------------------------------------*/
946 
947 void
949 
950 /*----------------------------------------------------------------------------*/
965 /*----------------------------------------------------------------------------*/
966 
967 cs_xdef_t *
969  const char *z_name,
970  cs_real_t *val);
971 
972 /*----------------------------------------------------------------------------*/
988 /*----------------------------------------------------------------------------*/
989 
990 cs_xdef_t *
992  const char *z_name,
993  double quantity);
994 
995 /*----------------------------------------------------------------------------*/
1010 /*----------------------------------------------------------------------------*/
1011 
1012 cs_xdef_t *
1014  const char *z_name,
1015  cs_analytic_func_t *analytic,
1016  void *input);
1017 
1018 /*----------------------------------------------------------------------------*/
1027 /*----------------------------------------------------------------------------*/
1028 
1029 void
1031  cs_xdef_t *xdef);
1032 
1033 /*----------------------------------------------------------------------------*/
1046 /*----------------------------------------------------------------------------*/
1047 
1048 cs_xdef_t *
1050  const cs_param_bc_type_t bc_type,
1051  const char *z_name,
1052  cs_real_t *values);
1053 
1054 /*----------------------------------------------------------------------------*/
1071 /*----------------------------------------------------------------------------*/
1072 
1073 cs_xdef_t *
1075  const cs_param_bc_type_t bc_type,
1076  const char *z_name,
1077  cs_flag_t loc,
1078  cs_real_t *array,
1079  bool is_owner,
1080  cs_lnum_t *index);
1081 
1082 /*----------------------------------------------------------------------------*/
1097 /*----------------------------------------------------------------------------*/
1098 
1099 cs_xdef_t *
1101  const cs_param_bc_type_t bc_type,
1102  const char *z_name,
1103  cs_analytic_func_t *analytic,
1104  void *input);
1105 
1106 /*----------------------------------------------------------------------------*/
1115 /*----------------------------------------------------------------------------*/
1116 
1117 void
1119  const char *z_name);
1120 
1121 /*----------------------------------------------------------------------------*/
1129 /*----------------------------------------------------------------------------*/
1130 
1131 void
1133  cs_property_t *property);
1134 
1135 /*----------------------------------------------------------------------------*/
1143 /*----------------------------------------------------------------------------*/
1144 
1145 void
1147  cs_property_t *property);
1148 
1149 /*----------------------------------------------------------------------------*/
1157 /*----------------------------------------------------------------------------*/
1158 
1159 void
1161  cs_adv_field_t *adv_field);
1162 
1163 /*----------------------------------------------------------------------------*/
1173 /*----------------------------------------------------------------------------*/
1174 
1175 int
1177  cs_property_t *property);
1178 
1179 /*----------------------------------------------------------------------------*/
1190 /*----------------------------------------------------------------------------*/
1191 
1192 cs_xdef_t *
1194  const char *z_name,
1195  cs_real_t *val);
1196 
1197 /*----------------------------------------------------------------------------*/
1210 /*----------------------------------------------------------------------------*/
1211 
1212 cs_xdef_t *
1214  const char *z_name,
1215  cs_analytic_func_t *ana,
1216  void *input);
1217 
1218 /*----------------------------------------------------------------------------*/
1233 /*----------------------------------------------------------------------------*/
1234 
1235 cs_xdef_t *
1237  const char *z_name,
1238  cs_flag_t loc,
1239  cs_real_t *array,
1240  bool is_owner,
1241  cs_lnum_t *index);
1242 
1243 /*----------------------------------------------------------------------------*/
1256 /*----------------------------------------------------------------------------*/
1257 
1258 void
1260  cs_lnum_t n_elts,
1261  const cs_lnum_t elt_ids[],
1262  const cs_real_t elt_values[]);
1263 
1264 /*----------------------------------------------------------------------------*/
1265 
1267 
1268 #endif /* __CS_EQUATION_PARAM_H__ */
CS_EQKEY_HODGE_REAC_ALGO
Definition: cs_equation_param.h:659
cs_equation_param_set_sles
void cs_equation_param_set_sles(cs_equation_param_t *eqp, int field_id)
Set parameters for initializing SLES structures used for the resolution of the linear system....
Definition: cs_equation_param.c:1300
input
static int input(void)
cs_equation_param_has_diffusion
static bool cs_equation_param_has_diffusion(const cs_equation_param_t *eqp)
Ask if the parameters of the equation needs a diffusion term.
Definition: cs_equation_param.h:709
cs_param_dof_reduction_t
cs_param_dof_reduction_t
Definition: cs_param.h:151
CS_EQKEY_SPACE_SCHEME
Definition: cs_equation_param.h:668
CS_EQKEY_BC_WEAK_PENA_COEFF
Definition: cs_equation_param.h:652
CS_EQKEY_ADV_FORMULATION
Definition: cs_equation_param.h:645
cs_equation_add_time
void cs_equation_add_time(cs_equation_param_t *eqp, cs_property_t *property)
Define and initialize a new structure to store parameters related to an unsteady term.
Definition: cs_equation_param.c:2371
cs_equation_param_update_from
void cs_equation_param_update_from(const cs_equation_param_t *ref, cs_equation_param_t *dst)
Copy the settings from one cs_equation_param_t structure to another one.
Definition: cs_equation_param.c:1088
cs_equation_free_param
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_equation_param_t::ic_defs
cs_xdef_t ** ic_defs
Definition: cs_equation_param.h:236
cs_param_hodge_t
Definition: cs_param_cdo.h:129
cs_equation_param_has_time
static bool cs_equation_param_has_time(const cs_equation_param_t *eqp)
Ask if the parameters of the equation needs an unsteady term.
Definition: cs_equation_param.h:769
CS_EQKEY_PRECOND
Definition: cs_equation_param.h:665
CS_EQUATION_TYPE_USER
Definition: cs_equation_param.h:135
cs_xdef_t
Structure storing medata for defining a quantity in a very flexible way.
Definition: cs_xdef.h:126
cs_equation_add_xdef_bc
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:2090
cs_equation_param_has_reaction
static bool cs_equation_param_has_reaction(const cs_equation_param_t *eqp)
Ask if the parameters of the equation needs a reaction term.
Definition: cs_equation_param.h:749
cs_equation_param_t::time_hodge
cs_param_hodge_t time_hodge
Definition: cs_equation_param.h:268
cs_equation_param_has_sourceterm
static bool cs_equation_param_has_sourceterm(const cs_equation_param_t *eqp)
Ask if the parameters of the equation needs a source term.
Definition: cs_equation_param.h:789
cs_equation_param_t::adv_formulation
cs_param_advection_form_t adv_formulation
Definition: cs_equation_param.h:310
cs_equation_param_t::theta
cs_real_t theta
Definition: cs_equation_param.h:271
cs_equation_param_t::process_flag
cs_flag_t process_flag
Definition: cs_equation_param.h:169
cs_equation_create_param
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:960
CS_EQUATION_FORCE_VALUES
#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:83
restrict
#define restrict
Definition: cs_defs.h:127
cs_equation_add_diffusion
void cs_equation_add_diffusion(cs_equation_param_t *eqp, cs_property_t *property)
Define and initialize a new structure to store parameters related to a diffusion term.
Definition: cs_equation_param.c:2344
cs_equation_param_t::flag
cs_flag_t flag
Definition: cs_equation_param.h:163
cs_equation_param_t::space_scheme
cs_param_space_scheme_t space_scheme
Definition: cs_equation_param.h:172
cs_equation_add_advection
void cs_equation_add_advection(cs_equation_param_t *eqp, cs_adv_field_t *adv_field)
Define and initialize a new structure to store parameters related to an advection term.
Definition: cs_equation_param.c:2393
cs_equation_param_t::space_poly_degree
int space_poly_degree
Definition: cs_equation_param.h:178
cs_equation_param_t::type
cs_equation_type_t type
Definition: cs_equation_param.h:155
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
CS_EQKEY_N_KEYS
Definition: cs_equation_param.h:673
cs_equation_param_t::diffusion_hodge
cs_param_hodge_t diffusion_hodge
Definition: cs_equation_param.h:285
cs_equation_param_t::time_scheme
cs_param_time_scheme_t time_scheme
Definition: cs_equation_param.h:270
CS_EQUATION_TYPE_NAVSTO
Definition: cs_equation_param.h:137
cs_equation_param_t::dof_reduction
cs_param_dof_reduction_t dof_reduction
Definition: cs_equation_param.h:173
CS_EQKEY_BC_ENFORCEMENT
Definition: cs_equation_param.h:649
cs_equation_param_t::upwind_portion
cs_real_t upwind_portion
Definition: cs_equation_param.h:312
CS_EQKEY_ADV_UPWIND_PORTION
Definition: cs_equation_param.h:647
cs_equation_param_t::reaction_properties
cs_property_t ** reaction_properties
Definition: cs_equation_param.h:336
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
CS_EQKEY_SOLVER_FAMILY
Definition: cs_equation_param.h:667
CS_EQKEY_BC_QUADRATURE
Definition: cs_equation_param.h:650
cs_equation_param_t::weak_pena_bc_coeff
cs_real_t weak_pena_bc_coeff
Definition: cs_equation_param.h:221
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
CS_EQUATION_TYPE_GROUNDWATER
Definition: cs_equation_param.h:136
CS_EQKEY_OMP_ASSEMBLY_STRATEGY
Definition: cs_equation_param.h:664
CS_EQKEY_HODGE_DIFF_COEF
Definition: cs_equation_param.h:657
cs_equation_param_t::strong_pena_bc_coeff
cs_real_t strong_pena_bc_coeff
Definition: cs_equation_param.h:220
CS_EQKEY_BC_STRONG_PENA_COEFF
Definition: cs_equation_param.h:651
cs_equation_param_has_name
static bool cs_equation_param_has_name(cs_equation_param_t *eqp, const char *name)
Check if a cs_equation_param_t structure has its name member equal to the given name.
Definition: cs_equation_param.h:833
cs_param_advection_scheme_t
cs_param_advection_scheme_t
Definition: cs_param.h:255
CS_EQKEY_VERBOSITY
Definition: cs_equation_param.h:671
cs_equation_param_t::source_terms
cs_xdef_t ** source_terms
Definition: cs_equation_param.h:353
cs_equation_param_t::time_property
cs_property_t * time_property
Definition: cs_equation_param.h:269
CS_EQUATION_UNSTEADY
#define CS_EQUATION_UNSTEADY
Unsteady term is needed.
Definition: cs_equation_param.h:79
CS_EQUATION_CONVECTION
#define CS_EQUATION_CONVECTION
Convection term is needed.
Definition: cs_equation_param.h:80
CS_EQKEY_ADV_SCHEME
Definition: cs_equation_param.h:646
cs_equation_param_t
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:148
cs_equation_param_has_convection
static bool cs_equation_param_has_convection(const cs_equation_param_t *eqp)
Ask if the parameters of the equation needs a convection term.
Definition: cs_equation_param.h:729
cs_xdef.h
cs_param_cdo.h
cs_equation_add_reaction
int cs_equation_add_reaction(cs_equation_param_t *eqp, cs_property_t *property)
Define and initialize a new structure to store parameters related to a reaction term.
Definition: cs_equation_param.c:2417
cs_equation_add_source_term_by_analytic
cs_xdef_t * cs_equation_add_source_term_by_analytic(cs_equation_param_t *eqp, const char *z_name, cs_analytic_func_t *ana, void *input)
Define a new source term structure and initialize it by an analytical function.
Definition: cs_equation_param.c:2498
CS_EQKEY_ITSOL_EPS
Definition: cs_equation_param.h:661
cs_equation_param_t::n_ic_defs
int n_ic_defs
Definition: cs_equation_param.h:235
cs_param_assemble_omp_strategy_t
cs_param_assemble_omp_strategy_t
Definition: cs_param_cdo.h:91
cs_equation_param_t::name
char *restrict name
Definition: cs_equation_param.h:154
cs_equation_param_t::diffusion_property
cs_property_t * diffusion_property
Definition: cs_equation_param.h:286
CS_EQKEY_DO_LUMPING
Definition: cs_equation_param.h:653
cs_equation_add_ic_by_analytic
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:2046
cs_equation_add_source_term_by_array
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)
Define a new source term defined by an array.
Definition: cs_equation_param.c:2555
cs_property.h
CS_EQKEY_DOF_REDUCTION
Definition: cs_equation_param.h:654
cs_equation_param_t::enforced_dof_ids
cs_lnum_t * enforced_dof_ids
Definition: cs_equation_param.h:374
cs_equation_param_t::dim
int dim
Definition: cs_equation_param.h:156
CS_EQKEY_ITSOL_RESNORM_TYPE
Definition: cs_equation_param.h:663
cs_equation_param_t::omp_assembly_choice
cs_param_assemble_omp_strategy_t omp_assembly_choice
Definition: cs_equation_param.h:400
cs_advection_field.h
cs_property_t
Definition: cs_property.h:104
cs_equation_param_t::default_enforcement
cs_param_bc_enforce_t default_enforcement
Definition: cs_equation_param.h:219
cs_equation_param_t::verbosity
int verbosity
Definition: cs_equation_param.h:157
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_param_space_scheme_t
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param.h:125
cs_param_advection_form_t
cs_param_advection_form_t
Definition: cs_param.h:212
cs_equation_add_bc_by_analytic
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:2251
cs_analytic_func_t
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 compact, void *input, cs_real_t *retval)
Generic function pointer for an analytic function elt_ids is optional. If not NULL,...
Definition: cs_param.h:66
cs_equation_param_t::n_source_terms
int n_source_terms
Definition: cs_equation_param.h:352
CS_EQKEY_AMG_TYPE
Definition: cs_equation_param.h:648
CS_EQKEY_ITSOL_MAX_ITER
Definition: cs_equation_param.h:662
cs_equation_param_t::sles_param
cs_param_sles_t sles_param
Definition: cs_equation_param.h:389
cs_equation_param_t::n_bc_defs
int n_bc_defs
Definition: cs_equation_param.h:216
cs_equation_summary_param
void cs_equation_summary_param(const cs_equation_param_t *eqp)
Summary of a cs_equation_param_t structure.
Definition: cs_equation_param.c:1651
cs_equation_param_t::n_enforced_dofs
cs_lnum_t n_enforced_dofs
Definition: cs_equation_param.h:373
cs_equation_param_t::do_lumping
bool do_lumping
Definition: cs_equation_param.h:250
cs_equation_param_last_stage
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:1619
cs_equation_param_set_flag
static void cs_equation_param_set_flag(cs_equation_param_t *eqp, cs_flag_t flag)
Update the flag related to a cs_equation_param_t structure.
Definition: cs_equation_param.h:691
cs_equation_param_t::n_reaction_terms
int n_reaction_terms
Definition: cs_equation_param.h:335
CS_EQUATION_REACTION
#define CS_EQUATION_REACTION
Reaction term is needed.
Definition: cs_equation_param.h:82
CS_EQUATION_DIFFUSION
#define CS_EQUATION_DIFFUSION
Diffusion term is needed.
Definition: cs_equation_param.h:81
cs_param_bc_enforce_t
cs_param_bc_enforce_t
Definition: cs_param.h:343
cs_equation_param_t::adv_scheme
cs_param_advection_scheme_t adv_scheme
Definition: cs_equation_param.h:311
cs_equation_param_t::bc_defs
cs_xdef_t ** bc_defs
Definition: cs_equation_param.h:217
cs_equation_set_param
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:1266
cs_equation_add_sliding_condition
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:2305
cs_flag_t
unsigned short int cs_flag_t
Definition: cs_defs.h:304
CS_EQKEY_HODGE_DIFF_ALGO
Definition: cs_equation_param.h:656
cs_equation_param_t::default_bc
cs_param_bc_type_t default_bc
Definition: cs_equation_param.h:215
cs_equation_key_t
cs_equation_key_t
List of available keys for setting the parameters of an equation.
Definition: cs_equation_param.h:643
cs_equation_type_t
cs_equation_type_t
Type of equations managed by the solver.
Definition: cs_equation_param.h:133
CS_EQUATION_TYPE_PREDEFINED
Definition: cs_equation_param.h:138
CS_EQKEY_HODGE_TIME_ALGO
Definition: cs_equation_param.h:658
cs_equation_param_has_internal_enforcement
static bool cs_equation_param_has_internal_enforcement(const cs_equation_param_t *eqp)
Ask if the parameters of the equation has an internal enforcement of the degrees of freedom.
Definition: cs_equation_param.h:810
cs_param_time_scheme_t
cs_param_time_scheme_t
Definition: cs_param.h:183
cs_adv_field_t
Definition: cs_advection_field.h:149
cs_param_sles_t
Structure storing all metadata related to the resolution of a linear system with an iterative solver.
Definition: cs_param.h:469
cs_equation_enforce_vertex_dofs
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 elt_values[])
Add an enforcement of the value of degrees of freedom located at mesh vertices. The spatial discretiz...
Definition: cs_equation_param.c:2615
cs_equation_add_ic_by_qov
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:1999
cs_equation_param_t::reaction_hodge
cs_param_hodge_t reaction_hodge
Definition: cs_equation_param.h:334
CS_EQKEY_ITSOL
Definition: cs_equation_param.h:660
cs_equation_add_source_term_by_val
cs_xdef_t * cs_equation_add_source_term_by_val(cs_equation_param_t *eqp, const char *z_name, cs_real_t *val)
Define a new source term structure and initialize it by value.
Definition: cs_equation_param.c:2450
cs_equation_add_bc_by_value
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:2118
cs_equation_param_t::adv_field
cs_adv_field_t * adv_field
Definition: cs_equation_param.h:313
CS_EQKEY_TIME_THETA
Definition: cs_equation_param.h:670
type
void const cs_int_t * type
Definition: cs_measures_util.h:425
CS_EQUATION_N_TYPES
Definition: cs_equation_param.h:139
CS_EQKEY_SLES_VERBOSITY
Definition: cs_equation_param.h:666
cs_param_bc_type_t
cs_param_bc_type_t
Definition: cs_param.h:302
cs_param.h
cs_equation_add_ic_by_value
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:1951
CS_EQKEY_EXTRA_OP
Definition: cs_equation_param.h:655
CS_EQKEY_TIME_SCHEME
Definition: cs_equation_param.h:669
cs_equation_add_bc_by_array
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:2178
cs_equation_param_t::enforced_dof_values
cs_real_t * enforced_dof_values
Definition: cs_equation_param.h:375