6.3
general 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-2020 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_cdo.h"
34 #include "cs_hodge.h"
35 #include "cs_property.h"
36 #include "cs_xdef.h"
37 
38 /*----------------------------------------------------------------------------*/
39 
41 
50 /*============================================================================
51  * Macro definitions
52  *============================================================================*/
53 
91 #define CS_EQUATION_LOCKED (1 << 0) /* 1 */
92 #define CS_EQUATION_UNSTEADY (1 << 1) /* 2 */
93 #define CS_EQUATION_CONVECTION (1 << 2) /* 4 */
94 #define CS_EQUATION_DIFFUSION (1 << 3) /* 8 */
95 #define CS_EQUATION_CURLCURL (1 << 4) /* 16 */
96 #define CS_EQUATION_GRADDIV (1 << 5) /* 32 */
97 #define CS_EQUATION_REACTION (1 << 6) /* 64 */
98 #define CS_EQUATION_FORCE_VALUES (1 << 7) /* 128 */
99 #define CS_EQUATION_USER_HOOK (1 << 8) /* 256 */
100 
120 #define CS_EQUATION_POST_BALANCE (1 << 0) /* 1 */
121 #define CS_EQUATION_POST_PECLET (1 << 1) /* 2 */
122 #define CS_EQUATION_POST_UPWIND_COEF (1 << 2) /* 4 */
123 #define CS_EQUATION_POST_NORMAL_FLUX (1 << 3) /* 8 */
124 
142 #define CS_EQUATION_ENFORCE_BY_CELLS (1 << 0) /* 1 */
143 #define CS_EQUATION_ENFORCE_BY_DOFS (1 << 1) /* 2 */
144 #define CS_EQUATION_ENFORCE_BY_REFERENCE_VALUE (1 << 2) /* 4 */
145 
148 /*============================================================================
149  * Type definitions
150  *============================================================================*/
151 
180 typedef enum {
181 
189 
191 
193 
194 /*----------------------------------------------------------------------------*/
195 
201 typedef struct {
202 
207  char *restrict name;
209  int dim;
219  union {
221  int iwarni;
222  };
223 
229 
235 
236  /* Numerical settings */
244 
452  int iconv;
453  int istat;
454  int idircl;
455  int ndircl;
456  int idiff;
457  int idifft;
458  int idften;
459  int iswdyn;
460  int ischcv;
461  int ibdtso;
462  int isstpc;
463  int nswrgr;
464  int nswrsm;
465  int imrgra;
466  int imligr;
467  int ircflu;
468  int iwgrec;
469  int icoupl;
470  double thetav; /* TODO: merge with theta */
471  double blencv;
472  double blend_st;
473  double epsilo;
474  double epsrsm;
475  double epsrgr;
476  double climgr;
477  double extrag;
478  double relaxv;
479 
518 
522 
537 
551 
572 
587 
603 
619 
665 
688 
705 
725 
768 
772 
776 
790 
801 
805 
806 /*----------------------------------------------------------------------------*/
807 
1073 typedef enum {
1074 
1104 
1106 
1108 
1109 /*============================================================================
1110  * Static inline public function prototypes
1111  *============================================================================*/
1112 
1113 /*----------------------------------------------------------------------------*/
1120 /*----------------------------------------------------------------------------*/
1121 
1122 static inline void
1123 cs_equation_param_set_flag(cs_equation_param_t *eqp,
1124  cs_flag_t flag)
1125 {
1126  assert(eqp != NULL);
1127  eqp->flag |= flag;
1128 }
1129 
1130 /*----------------------------------------------------------------------------*/
1138 /*----------------------------------------------------------------------------*/
1139 
1140 static inline bool
1141 cs_equation_param_has_diffusion(const cs_equation_param_t *eqp)
1142 {
1143  assert(eqp != NULL);
1144  if (eqp->flag & CS_EQUATION_DIFFUSION)
1145  return true;
1146  else
1147  return false;
1148 }
1149 
1150 /*----------------------------------------------------------------------------*/
1158 /*----------------------------------------------------------------------------*/
1159 
1160 static inline bool
1161 cs_equation_param_has_curlcurl(const cs_equation_param_t *eqp)
1162 {
1163  assert(eqp != NULL);
1164  if (eqp->flag & CS_EQUATION_CURLCURL)
1165  return true;
1166  else
1167  return false;
1168 }
1169 
1170 /*----------------------------------------------------------------------------*/
1178 /*----------------------------------------------------------------------------*/
1179 
1180 static inline bool
1181 cs_equation_param_has_graddiv(const cs_equation_param_t *eqp)
1182 {
1183  assert(eqp != NULL);
1184  if (eqp->flag & CS_EQUATION_GRADDIV)
1185  return true;
1186  else
1187  return false;
1188 }
1189 
1190 /*----------------------------------------------------------------------------*/
1198 /*----------------------------------------------------------------------------*/
1199 
1200 static inline bool
1201 cs_equation_param_has_convection(const cs_equation_param_t *eqp)
1202 {
1203  assert(eqp != NULL);
1204  if (eqp->flag & CS_EQUATION_CONVECTION)
1205  return true;
1206  else
1207  return false;
1208 }
1209 
1210 /*----------------------------------------------------------------------------*/
1218 /*----------------------------------------------------------------------------*/
1219 
1220 static inline bool
1221 cs_equation_param_has_reaction(const cs_equation_param_t *eqp)
1222 {
1223  assert(eqp != NULL);
1224  if (eqp->flag & CS_EQUATION_REACTION)
1225  return true;
1226  else
1227  return false;
1228 }
1229 
1230 /*----------------------------------------------------------------------------*/
1238 /*----------------------------------------------------------------------------*/
1239 
1240 static inline bool
1241 cs_equation_param_has_time(const cs_equation_param_t *eqp)
1242 {
1243  assert(eqp != NULL);
1244  if (eqp->flag & CS_EQUATION_UNSTEADY)
1245  return true;
1246  else
1247  return false;
1248 }
1249 
1250 /*----------------------------------------------------------------------------*/
1258 /*----------------------------------------------------------------------------*/
1259 
1260 static inline bool
1261 cs_equation_param_has_sourceterm(const cs_equation_param_t *eqp)
1262 {
1263  assert(eqp != NULL);
1264  if (eqp->n_source_terms > 0)
1265  return true;
1266  else
1267  return false;
1268 }
1269 
1270 /*----------------------------------------------------------------------------*/
1279 /*----------------------------------------------------------------------------*/
1280 
1281 static inline bool
1282 cs_equation_param_has_internal_enforcement(const cs_equation_param_t *eqp)
1283 {
1284  assert(eqp != NULL);
1285  if (eqp->flag & CS_EQUATION_FORCE_VALUES)
1286  return true;
1287  else
1288  return false;
1289 }
1290 
1291 /*----------------------------------------------------------------------------*/
1300 /*----------------------------------------------------------------------------*/
1301 
1302 static inline bool
1303 cs_equation_param_has_implicit_advection(const cs_equation_param_t *eqp)
1304 {
1305  assert(eqp != NULL);
1306  if (eqp->flag & CS_EQUATION_CONVECTION) {
1309  return true;
1310  else
1311  return false;
1312  }
1313  else
1314  return false;
1315 }
1316 
1317 /*----------------------------------------------------------------------------*/
1326 /*----------------------------------------------------------------------------*/
1327 
1328 static inline bool
1329 cs_equation_param_has_user_hook(const cs_equation_param_t *eqp)
1330 {
1331  assert(eqp != NULL);
1332  if (eqp->flag & CS_EQUATION_USER_HOOK)
1333  return true;
1334  else
1335  return false;
1336 }
1337 
1338 /*----------------------------------------------------------------------------*/
1349 /*----------------------------------------------------------------------------*/
1350 
1351 static inline bool
1352 cs_equation_param_has_name(cs_equation_param_t *eqp,
1353  const char *name)
1354 {
1355  if (eqp == NULL)
1356  return false;
1357  if (eqp->name == NULL)
1358  return false;
1359  if (strcmp(eqp->name, name) == 0)
1360  return true;
1361  else
1362  return false;
1363 }
1364 
1365 /*============================================================================
1366  * Public function prototypes
1367  *============================================================================*/
1368 
1369 /*----------------------------------------------------------------------------*/
1380 /*----------------------------------------------------------------------------*/
1381 
1383 cs_equation_create_param(const char *name,
1384  cs_equation_type_t type,
1385  int dim,
1386  cs_param_bc_type_t default_bc);
1387 
1388 /*----------------------------------------------------------------------------*/
1397 /*----------------------------------------------------------------------------*/
1398 
1399 void
1401  cs_equation_param_t *dst,
1402  bool copy_fid);
1403 
1404 /*----------------------------------------------------------------------------*/
1416 /*----------------------------------------------------------------------------*/
1417 
1418 void
1420 
1421 /*----------------------------------------------------------------------------*/
1429 /*----------------------------------------------------------------------------*/
1430 
1433 
1434 /*----------------------------------------------------------------------------*/
1443 /*----------------------------------------------------------------------------*/
1444 
1445 void
1447  cs_equation_key_t key,
1448  const char *keyval);
1449 
1450 /*----------------------------------------------------------------------------*/
1458 /*----------------------------------------------------------------------------*/
1459 
1460 void
1462 
1463 /*----------------------------------------------------------------------------*/
1470 /*----------------------------------------------------------------------------*/
1471 
1472 void
1474 
1475 /*----------------------------------------------------------------------------*/
1481 /*----------------------------------------------------------------------------*/
1482 
1483 void
1485 
1486 /*----------------------------------------------------------------------------*/
1495 /*----------------------------------------------------------------------------*/
1496 
1497 bool
1499 
1500 /*----------------------------------------------------------------------------*/
1515 /*----------------------------------------------------------------------------*/
1516 
1517 cs_xdef_t *
1519  const char *z_name,
1520  cs_real_t *val);
1521 
1522 /*----------------------------------------------------------------------------*/
1538 /*----------------------------------------------------------------------------*/
1539 
1540 cs_xdef_t *
1542  const char *z_name,
1543  double quantity);
1544 
1545 /*----------------------------------------------------------------------------*/
1560 /*----------------------------------------------------------------------------*/
1561 
1562 cs_xdef_t *
1564  const char *z_name,
1565  cs_analytic_func_t *analytic,
1566  void *input);
1567 
1568 /*----------------------------------------------------------------------------*/
1577 /*----------------------------------------------------------------------------*/
1578 
1579 void
1581  cs_xdef_t *xdef);
1582 
1583 /*----------------------------------------------------------------------------*/
1596 /*----------------------------------------------------------------------------*/
1597 
1598 cs_xdef_t *
1600  const cs_param_bc_type_t bc_type,
1601  const char *z_name,
1602  cs_real_t *values);
1603 
1604 /*----------------------------------------------------------------------------*/
1621 /*----------------------------------------------------------------------------*/
1622 
1623 cs_xdef_t *
1625  const cs_param_bc_type_t bc_type,
1626  const char *z_name,
1627  cs_flag_t loc,
1628  cs_real_t *array,
1629  bool is_owner,
1630  cs_lnum_t *index);
1631 
1632 /*----------------------------------------------------------------------------*/
1647 /*----------------------------------------------------------------------------*/
1648 
1649 cs_xdef_t *
1651  const cs_param_bc_type_t bc_type,
1652  const char *z_name,
1653  cs_analytic_func_t *analytic,
1654  void *input);
1655 
1656 /*----------------------------------------------------------------------------*/
1672 /*----------------------------------------------------------------------------*/
1673 
1674 cs_xdef_t *
1676  const cs_param_bc_type_t bc_type,
1677  const char *z_name,
1678  cs_flag_t loc_flag,
1679  cs_dof_func_t *func,
1680  void *input);
1681 
1682 /*----------------------------------------------------------------------------*/
1693 /*----------------------------------------------------------------------------*/
1694 
1695 cs_xdef_t *
1697  const char *z_name);
1698 
1699 /*----------------------------------------------------------------------------*/
1711 /*----------------------------------------------------------------------------*/
1712 
1713 void
1715  const char *z_name);
1716 
1717 /*----------------------------------------------------------------------------*/
1726 /*----------------------------------------------------------------------------*/
1727 
1728 void
1730  const char *z_name);
1731 
1732 /*----------------------------------------------------------------------------*/
1742 /*----------------------------------------------------------------------------*/
1743 
1744 void
1746  cs_property_t *property);
1747 
1748 /*----------------------------------------------------------------------------*/
1757 /*----------------------------------------------------------------------------*/
1758 
1759 void
1761  cs_property_t *property,
1762  int inversion);
1763 
1764 /*----------------------------------------------------------------------------*/
1772 /*----------------------------------------------------------------------------*/
1773 
1774 void
1776  cs_property_t *property);
1777 
1778 /*----------------------------------------------------------------------------*/
1787 /*----------------------------------------------------------------------------*/
1788 
1789 void
1791  cs_property_t *property);
1792 
1793 /*----------------------------------------------------------------------------*/
1801 /*----------------------------------------------------------------------------*/
1802 
1803 void
1805  cs_adv_field_t *adv_field);
1806 
1807 /*----------------------------------------------------------------------------*/
1814 /*----------------------------------------------------------------------------*/
1815 
1816 void
1818  cs_property_t *property);
1819 
1820 /*----------------------------------------------------------------------------*/
1830 /*----------------------------------------------------------------------------*/
1831 
1832 int
1834  cs_property_t *property);
1835 
1836 /*----------------------------------------------------------------------------*/
1848 /*----------------------------------------------------------------------------*/
1849 
1850 cs_xdef_t *
1852  const char *z_name,
1853  cs_real_t *val);
1854 
1855 /*----------------------------------------------------------------------------*/
1868 /*----------------------------------------------------------------------------*/
1869 
1870 cs_xdef_t *
1872  const char *z_name,
1873  cs_analytic_func_t *func,
1874  void *input);
1875 
1876 /*----------------------------------------------------------------------------*/
1890 /*----------------------------------------------------------------------------*/
1891 
1892 cs_xdef_t *
1894  const char *z_name,
1895  cs_flag_t loc_flag,
1896  cs_dof_func_t *func,
1897  void *input);
1898 
1899 /*----------------------------------------------------------------------------*/
1915 /*----------------------------------------------------------------------------*/
1916 
1917 cs_xdef_t *
1919  const char *z_name,
1920  cs_flag_t loc,
1921  cs_real_t *array,
1922  bool is_owner,
1923  cs_lnum_t *index);
1924 
1925 /*----------------------------------------------------------------------------*/
1937 /*----------------------------------------------------------------------------*/
1938 
1939 cs_xdef_t *
1941  const char *z_name,
1942  double *val);
1943 
1944 /*----------------------------------------------------------------------------*/
1957 /*----------------------------------------------------------------------------*/
1958 
1959 cs_xdef_t *
1961  const char *z_name,
1962  double *quantity);
1963 
1964 /*----------------------------------------------------------------------------*/
1977 /*----------------------------------------------------------------------------*/
1978 
1979 cs_xdef_t *
1981  const char *z_name,
1982  cs_analytic_func_t *func,
1983  void *input);
1984 
1985 /*----------------------------------------------------------------------------*/
2002 /*----------------------------------------------------------------------------*/
2003 
2004 void
2006  cs_lnum_t n_elts,
2007  const cs_lnum_t elt_ids[],
2008  const cs_real_t ref_value[],
2009  const cs_real_t elt_values[]);
2010 
2011 /*----------------------------------------------------------------------------*/
2026 /*----------------------------------------------------------------------------*/
2027 
2028 void
2030  cs_lnum_t n_elts,
2031  const cs_lnum_t elt_ids[],
2032  const cs_real_t ref_value[],
2033  const cs_real_t elt_values[]);
2034 
2035 /*----------------------------------------------------------------------------*/
2036 
2038 
2039 #endif /* __CS_EQUATION_PARAM_H__ */
CS_EQKEY_HODGE_REAC_ALGO
@ CS_EQKEY_HODGE_REAC_ALGO
Definition: cs_equation_param.h:1091
cs_equation_param_t::time_hodgep
cs_hodge_param_t time_hodgep
Definition: cs_equation_param.h:568
CS_EQKEY_SPACE_SCHEME
@ CS_EQKEY_SPACE_SCHEME
Definition: cs_equation_param.h:1100
CS_EQKEY_BC_WEAK_PENA_COEFF
@ CS_EQKEY_BC_WEAK_PENA_COEFF
Definition: cs_equation_param.h:1084
CS_EQKEY_ADV_FORMULATION
@ CS_EQKEY_ADV_FORMULATION
Definition: cs_equation_param.h:1076
cs_equation_add_time
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:3526
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 *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:3688
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:2308
cs_equation_param_t::imligr
int imligr
Definition: cs_equation_param.h:466
cs_equation_param_t::ic_defs
cs_xdef_t ** ic_defs
Definition: cs_equation_param.h:536
cs_equation_find_bc
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:3321
cs_equation_add_curlcurl
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:3469
CS_EQKEY_PRECOND
@ CS_EQKEY_PRECOND
Definition: cs_equation_param.h:1097
cs_equation_param_t::iwgrec
int iwgrec
Definition: cs_equation_param.h:468
CS_EQUATION_TYPE_USER
@ CS_EQUATION_TYPE_USER
Definition: cs_equation_param.h:188
cs_xdef_t
Structure storing medata for defining a quantity in a very flexible way.
Definition: cs_xdef.h:154
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 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_equation_param_t::adv_strategy
cs_param_advection_strategy_t adv_strategy
Definition: cs_equation_param.h:660
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:2996
cs_param_bc_enforce_t
cs_param_bc_enforce_t
Definition: cs_param_types.h:469
cs_equation_param_t::adv_formulation
cs_param_advection_form_t adv_formulation
Definition: cs_equation_param.h:658
cs_equation_param_t::theta
cs_real_t theta
Definition: cs_equation_param.h:571
cs_equation_param_t::process_flag
cs_flag_t process_flag
Definition: cs_equation_param.h:234
cs_equation_param_t::ndircl
int ndircl
Definition: cs_equation_param.h:455
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:1853
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:98
restrict
#define restrict
Definition: cs_defs.h:124
cs_equation_add_diffusion
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:3443
cs_equation_param_t::flag
cs_flag_t flag
Definition: cs_equation_param.h:228
cs_equation_param_t::space_scheme
cs_param_space_scheme_t space_scheme
Definition: cs_equation_param.h:237
cs_equation_param_t::epsilo
double epsilo
Definition: cs_equation_param.h:473
cs_equation_add_advection
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:3551
cs_equation_param_t::space_poly_degree
int space_poly_degree
Definition: cs_equation_param.h:243
CS_EQKEY_ADV_EXTRAPOL
@ CS_EQKEY_ADV_EXTRAPOL
Definition: cs_equation_param.h:1075
cs_equation_param_t::type
cs_equation_type_t type
Definition: cs_equation_param.h:208
cs_equation_param_t::epsrgr
double epsrgr
Definition: cs_equation_param.h:475
cs_equation_param_t::verbosity
int verbosity
Definition: cs_equation_param.h:220
CS_EQUATION_USER_HOOK
#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:99
CS_EQUATION_TYPE_MAXWELL
@ CS_EQUATION_TYPE_MAXWELL
Definition: cs_equation_param.h:183
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:493
CS_EQKEY_N_KEYS
@ CS_EQKEY_N_KEYS
Definition: cs_equation_param.h:1105
cs_equation_param_t::time_scheme
cs_param_time_scheme_t time_scheme
Definition: cs_equation_param.h:570
CS_EQUATION_TYPE_NAVSTO
@ CS_EQUATION_TYPE_NAVSTO
Definition: cs_equation_param.h:184
cs_equation_param_t::dof_reduction
cs_param_dof_reduction_t dof_reduction
Definition: cs_equation_param.h:238
CS_EQKEY_BC_ENFORCEMENT
@ CS_EQKEY_BC_ENFORCEMENT
Definition: cs_equation_param.h:1081
cs_equation_param_t::upwind_portion
cs_real_t upwind_portion
Definition: cs_equation_param.h:662
cs_equation_param_t::enforcement_ref_value
cs_real_t * enforcement_ref_value
Definition: cs_equation_param.h:767
CS_EQKEY_ADV_UPWIND_PORTION
@ CS_EQKEY_ADV_UPWIND_PORTION
Definition: cs_equation_param.h:1079
cs_equation_param_t::reaction_properties
cs_property_t ** reaction_properties
Definition: cs_equation_param.h:687
cs_param_advection_strategy_t
cs_param_advection_strategy_t
Choice of how to handle the advection term in an equation.
Definition: cs_param_types.h:344
cs_equation_param_t::istat
int istat
Definition: cs_equation_param.h:453
cs_equation_param_t::volume_mass_injections
cs_xdef_t ** volume_mass_injections
Definition: cs_equation_param.h:724
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:304
CS_EQKEY_SOLVER_FAMILY
@ CS_EQKEY_SOLVER_FAMILY
Definition: cs_equation_param.h:1099
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 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:4021
CS_EQKEY_BC_QUADRATURE
@ CS_EQKEY_BC_QUADRATURE
Definition: cs_equation_param.h:1082
cs_equation_param_t::weak_pena_bc_coeff
cs_real_t weak_pena_bc_coeff
Definition: cs_equation_param.h:521
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:492
CS_EQUATION_TYPE_GROUNDWATER
@ CS_EQUATION_TYPE_GROUNDWATER
Definition: cs_equation_param.h:182
cs_equation_param_t::adv_extrapol
cs_param_advection_extrapol_t adv_extrapol
Definition: cs_equation_param.h:661
cs_equation_param_t::curlcurl_property
cs_property_t * curlcurl_property
Definition: cs_equation_param.h:602
CS_EQKEY_OMP_ASSEMBLY_STRATEGY
@ CS_EQKEY_OMP_ASSEMBLY_STRATEGY
Definition: cs_equation_param.h:1096
CS_EQKEY_HODGE_DIFF_COEF
@ CS_EQKEY_HODGE_DIFF_COEF
Definition: cs_equation_param.h:1089
cs_equation_param_t::enforced_cell_ids
cs_lnum_t * enforced_cell_ids
Definition: cs_equation_param.h:770
cs_hodge_param_t
Structure storing all metadata/parameters related to the usage of a discrete Hodge operator.
Definition: cs_hodge.h:165
cs_equation_param_t::imrgra
int imrgra
Definition: cs_equation_param.h:465
cs_equation_param_t::strong_pena_bc_coeff
cs_real_t strong_pena_bc_coeff
Definition: cs_equation_param.h:520
CS_EQKEY_BC_STRONG_PENA_COEFF
@ CS_EQKEY_BC_STRONG_PENA_COEFF
Definition: cs_equation_param.h:1083
cs_equation_enforce_value_on_cell_selection
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:4100
CS_EQKEY_VERBOSITY
@ CS_EQKEY_VERBOSITY
Definition: cs_equation_param.h:1103
cs_param_dof_reduction_t
cs_param_dof_reduction_t
Definition: cs_param_types.h:199
CS_EQUATION_GRADDIV
#define CS_EQUATION_GRADDIV
The term related to the grad-div operator is needed.
Definition: cs_equation_param.h:96
cs_equation_param_t::source_terms
cs_xdef_t ** source_terms
Definition: cs_equation_param.h:704
cs_equation_param_t::n_volume_mass_injections
int n_volume_mass_injections
Definition: cs_equation_param.h:723
cs_equation_param_copy_from
void cs_equation_param_copy_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:2044
cs_equation_param_t::time_property
cs_property_t * time_property
Definition: cs_equation_param.h:569
cs_dof_func_t
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_equation_param_t::climgr
double climgr
Definition: cs_equation_param.h:476
CS_EQUATION_UNSTEADY
#define CS_EQUATION_UNSTEADY
Unsteady term is needed.
Definition: cs_equation_param.h:92
cs_equation_add_graddiv
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:3500
CS_EQUATION_CONVECTION
#define CS_EQUATION_CONVECTION
Convection term is needed.
Definition: cs_equation_param.h:93
cs_param_time_scheme_t
cs_param_time_scheme_t
Definition: cs_param_types.h:234
CS_EQKEY_ADV_SCHEME
@ CS_EQKEY_ADV_SCHEME
Definition: cs_equation_param.h:1077
cs_equation_param_t
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:201
cs_equation_param_t::enforcement_type
cs_flag_t enforcement_type
Definition: cs_equation_param.h:766
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)
Associate a new term related to the reaction operator for the equation associated to the given cs_equ...
Definition: cs_equation_param.c:3601
cs_hodge.h
cs_equation_param_t::thetav
double thetav
Definition: cs_equation_param.h:470
cs_equation_param_t::adv_scaling_property
cs_property_t * adv_scaling_property
Definition: cs_equation_param.h:664
CS_EQKEY_ITSOL_EPS
@ CS_EQKEY_ITSOL_EPS
Definition: cs_equation_param.h:1093
cs_equation_param_t::enforced_cell_values
cs_real_t * enforced_cell_values
Definition: cs_equation_param.h:771
cs_equation_param_clear
void cs_equation_param_clear(cs_equation_param_t *eqp)
Free the contents of a cs_equation_param_t.
Definition: cs_equation_param.c:2228
cs_equation_param_t::icoupl
int icoupl
Definition: cs_equation_param.h:469
cs_equation_param_t::iconv
int iconv
Definition: cs_equation_param.h:452
cs_equation_add_source_term_by_dof_func
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:3745
cs_equation_param_t::n_ic_defs
int n_ic_defs
Definition: cs_equation_param.h:535
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:207
CS_EQUATION_TYPE_THERMAL
@ CS_EQUATION_TYPE_THERMAL
Definition: cs_equation_param.h:186
cs_equation_param_t::diffusion_property
cs_property_t * diffusion_property
Definition: cs_equation_param.h:586
cs_equation_param_t::ischcv
int ischcv
Definition: cs_equation_param.h:460
CS_EQKEY_DO_LUMPING
@ CS_EQKEY_DO_LUMPING
Definition: cs_equation_param.h:1085
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:2950
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)
Add a new source term by initializing a cs_xdef_t structure. Case of a definition by an array.
Definition: cs_equation_param.c:3806
cs_equation_param_t::idircl
int idircl
Definition: cs_equation_param.h:454
cs_equation_param_t::blend_st
double blend_st
Definition: cs_equation_param.h:472
cs_property.h
CS_EQKEY_DOF_REDUCTION
@ CS_EQKEY_DOF_REDUCTION
Definition: cs_equation_param.h:1086
cs_equation_param_t::enforced_dof_ids
cs_lnum_t * enforced_dof_ids
Definition: cs_equation_param.h:774
cs_equation_param_t::dim
int dim
Definition: cs_equation_param.h:209
CS_EQKEY_ITSOL_RESNORM_TYPE
@ CS_EQKEY_ITSOL_RESNORM_TYPE
Definition: cs_equation_param.h:1095
cs_equation_param_t::isstpc
int isstpc
Definition: cs_equation_param.h:462
cs_equation_param_t::ircflu
int ircflu
Definition: cs_equation_param.h:467
cs_equation_param_t::nswrgr
int nswrgr
Definition: cs_equation_param.h:463
cs_equation_param_t::omp_assembly_choice
cs_param_assemble_omp_strategy_t omp_assembly_choice
Definition: cs_equation_param.h:800
cs_param_advection_extrapol_t
cs_param_advection_extrapol_t
Choice of how to extrapolate the advection field in the advection term.
Definition: cs_param_types.h:378
cs_advection_field.h
cs_property_t
Structure associated to the definition of a property relying on the cs_xdef_t structure.
cs_equation_param_t::default_enforcement
cs_param_bc_enforce_t default_enforcement
Definition: cs_equation_param.h:519
CS_PARAM_ADVECTION_IMPLICIT_LINEARIZED
@ CS_PARAM_ADVECTION_IMPLICIT_LINEARIZED
Definition: cs_param_types.h:347
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_equation_param_t::blencv
double blencv
Definition: cs_equation_param.h:471
cs_equation_remove_bc
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:3358
CS_EQUATION_TYPE_SOLIDIFICATION
@ CS_EQUATION_TYPE_SOLIDIFICATION
Definition: cs_equation_param.h:187
cs_equation_param_t::idften
int idften
Definition: cs_equation_param.h:458
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:3164
cs_equation_param_t::graddiv_property
cs_property_t * graddiv_property
Definition: cs_equation_param.h:618
cs_equation_param_t::iwarni
int iwarni
Definition: cs_equation_param.h:221
cs_equation_param_t::n_source_terms
int n_source_terms
Definition: cs_equation_param.h:703
CS_EQKEY_AMG_TYPE
@ CS_EQKEY_AMG_TYPE
Definition: cs_equation_param.h:1080
cs_param_advection_scheme_t
cs_param_advection_scheme_t
Definition: cs_param_types.h:311
CS_EQKEY_ITSOL_MAX_ITER
@ CS_EQKEY_ITSOL_MAX_ITER
Definition: cs_equation_param.h:1094
cs_equation_param_t::ibdtso
int ibdtso
Definition: cs_equation_param.h:461
cs_equation_param_t::sles_param
cs_param_sles_t sles_param
Definition: cs_equation_param.h:789
cs_equation_add_volume_mass_injection_by_qov
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:3916
cs_equation_param_t::iswdyn
int iswdyn
Definition: cs_equation_param.h:459
cs_param_space_scheme_t
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param_types.h:172
cs_equation_param_t::n_bc_defs
int n_bc_defs
Definition: cs_equation_param.h:516
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:2518
cs_equation_param_t::n_enforced_dofs
cs_lnum_t n_enforced_dofs
Definition: cs_equation_param.h:773
cs_equation_param_t::do_lumping
bool do_lumping
Definition: cs_equation_param.h:550
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:2486
cs_equation_param_t::curlcurl_hodgep
cs_hodge_param_t curlcurl_hodgep
Definition: cs_equation_param.h:601
cs_equation_add_volume_mass_injection_by_value
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:3868
cs_equation_param_t::n_enforced_cells
cs_lnum_t n_enforced_cells
Definition: cs_equation_param.h:769
cs_equation_param_t::nswrsm
int nswrsm
Definition: cs_equation_param.h:464
cs_equation_param_t::relaxv
double relaxv
Definition: cs_equation_param.h:478
cs_param_bc_type_t
cs_param_bc_type_t
Definition: cs_param_types.h:426
CS_EQKEY_ADV_STRATEGY
@ CS_EQKEY_ADV_STRATEGY
Definition: cs_equation_param.h:1078
cs_equation_param_t::n_reaction_terms
int n_reaction_terms
Definition: cs_equation_param.h:686
CS_EQUATION_REACTION
#define CS_EQUATION_REACTION
Reaction term is needed.
Definition: cs_equation_param.h:97
cs_equation_param_t::idifft
int idifft
Definition: cs_equation_param.h:457
CS_EQUATION_DIFFUSION
#define CS_EQUATION_DIFFUSION
Diffusion term is needed. A scalar-/vector-valued Laplacian with div .grad.
Definition: cs_equation_param.h:94
cs_equation_param_t::adv_scheme
cs_param_advection_scheme_t adv_scheme
Definition: cs_equation_param.h:659
cs_equation_param_t::bc_defs
cs_xdef_t ** bc_defs
Definition: cs_equation_param.h:517
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:2332
cs_equation_param_t::idiff
int idiff
Definition: cs_equation_param.h:456
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:3402
cs_flag_t
unsigned short int cs_flag_t
Definition: cs_defs.h:306
CS_EQKEY_HODGE_DIFF_ALGO
@ CS_EQKEY_HODGE_DIFF_ALGO
Definition: cs_equation_param.h:1088
cs_equation_add_bc_by_dof_func
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:3244
cs_equation_param_t::default_bc
cs_param_bc_type_t default_bc
Definition: cs_equation_param.h:515
cs_equation_key_t
cs_equation_key_t
List of available keys for setting the parameters of an equation.
Definition: cs_equation_param.h:1073
cs_equation_type_t
cs_equation_type_t
Type of equations managed by the solver.
Definition: cs_equation_param.h:180
cs_equation_add_volume_mass_injection_by_analytic
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:3964
CS_EQUATION_TYPE_PREDEFINED
@ CS_EQUATION_TYPE_PREDEFINED
Definition: cs_equation_param.h:185
cs_equation_param_t::diffusion_hodgep
cs_hodge_param_t diffusion_hodgep
Definition: cs_equation_param.h:585
CS_EQKEY_HODGE_TIME_ALGO
@ CS_EQKEY_HODGE_TIME_ALGO
Definition: cs_equation_param.h:1090
cs_equation_param_set_sles
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:2368
cs_equation_param_t::extrag
double extrag
Definition: cs_equation_param.h:477
cs_equation_param_t::reaction_hodgep
cs_hodge_param_t reaction_hodgep
Definition: cs_equation_param.h:685
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_types.h:736
cs_equation_param_t::epsrsm
double epsrsm
Definition: cs_equation_param.h:474
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:2903
CS_EQKEY_ITSOL
@ CS_EQKEY_ITSOL
Definition: cs_equation_param.h:1092
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)
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:3639
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:3024
cs_equation_param_t::adv_field
cs_adv_field_t * adv_field
Definition: cs_equation_param.h:663
CS_EQKEY_TIME_THETA
@ CS_EQKEY_TIME_THETA
Definition: cs_equation_param.h:1102
CS_PARAM_ADVECTION_IMPLICIT_FULL
@ CS_PARAM_ADVECTION_IMPLICIT_FULL
Definition: cs_param_types.h:346
CS_EQUATION_N_TYPES
@ CS_EQUATION_N_TYPES
Definition: cs_equation_param.h:190
CS_EQKEY_SLES_VERBOSITY
@ CS_EQKEY_SLES_VERBOSITY
Definition: cs_equation_param.h:1098
CS_EQUATION_CURLCURL
#define CS_EQUATION_CURLCURL
The term related to the curl-curl operator is needed.
Definition: cs_equation_param.h:95
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:2855
cs_param_advection_form_t
cs_param_advection_form_t
Definition: cs_param_types.h:267
CS_EQKEY_EXTRA_OP
@ CS_EQKEY_EXTRA_OP
Definition: cs_equation_param.h:1087
cs_equation_param_has_robin_bc
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:2824
CS_EQKEY_TIME_SCHEME
@ CS_EQKEY_TIME_SCHEME
Definition: cs_equation_param.h:1101
cs_equation_add_advection_scaling_property
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:3575
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:3085
cs_equation_param_t::graddiv_hodgep
cs_hodge_param_t graddiv_hodgep
Definition: cs_equation_param.h:617
cs_equation_param_t::enforced_dof_values
cs_real_t * enforced_dof_values
Definition: cs_equation_param.h:775