7.0
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-2021 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_param_sles.h"
35 #include "cs_hodge.h"
36 #include "cs_property.h"
37 #include "cs_xdef.h"
38 
39 /*----------------------------------------------------------------------------*/
40 
42 
51 /*============================================================================
52  * Macro definitions
53  *============================================================================*/
54 
92 #define CS_EQUATION_LOCKED (1 << 0) /* 1 */
93 #define CS_EQUATION_UNSTEADY (1 << 1) /* 2 */
94 #define CS_EQUATION_CONVECTION (1 << 2) /* 4 */
95 #define CS_EQUATION_DIFFUSION (1 << 3) /* 8 */
96 #define CS_EQUATION_CURLCURL (1 << 4) /* 16 */
97 #define CS_EQUATION_GRADDIV (1 << 5) /* 32 */
98 #define CS_EQUATION_REACTION (1 << 6) /* 64 */
99 #define CS_EQUATION_FORCE_VALUES (1 << 7) /* 128 */
100 #define CS_EQUATION_USER_HOOK (1 << 8) /* 256 */
101 
121 #define CS_EQUATION_POST_BALANCE (1 << 0) /* 1 */
122 #define CS_EQUATION_POST_PECLET (1 << 1) /* 2 */
123 #define CS_EQUATION_POST_UPWIND_COEF (1 << 2) /* 4 */
124 #define CS_EQUATION_POST_NORMAL_FLUX (1 << 3) /* 8 */
125 
143 #define CS_EQUATION_ENFORCE_BY_CELLS (1 << 0) /* 1 */
144 #define CS_EQUATION_ENFORCE_BY_DOFS (1 << 1) /* 2 */
145 #define CS_EQUATION_ENFORCE_BY_REFERENCE_VALUE (1 << 2) /* 4 */
146 
149 /*============================================================================
150  * Type definitions
151  *============================================================================*/
152 
181 typedef enum {
182 
190 
192 
194 
195 /*----------------------------------------------------------------------------*/
196 
202 typedef struct {
203 
208  char *restrict name;
210  int dim;
220  union {
222  int iwarni;
223  };
224 
230 
236 
237  /* Numerical settings */
245 
453  int iconv;
454  int istat;
455  int idircl;
456  int ndircl;
457  int idiff;
458  int idifft;
459  int idften;
460  int iswdyn;
461  int ischcv;
462  int ibdtso;
463  int isstpc;
464  int nswrgr;
465  int nswrsm;
466  int imrgra;
467  int imligr;
468  int ircflu;
469  int iwgrec;
470  int icoupl;
471  double thetav; /* TODO: merge with theta */
472  double blencv;
473  double blend_st;
474  double epsilo;
475  double epsrsm;
476  double epsrgr;
477  double climgr;
478  double extrag;
479  double relaxv;
480 
519 
523 
538 
552 
573 
588 
604 
620 
666 
689 
706 
726 
769 
773 
777 
791 
802 
806 
807 /*----------------------------------------------------------------------------*/
808 
1074 typedef enum {
1075 
1105 
1107 
1109 
1110 /*============================================================================
1111  * Static inline public function prototypes
1112  *============================================================================*/
1113 
1114 /*----------------------------------------------------------------------------*/
1121 /*----------------------------------------------------------------------------*/
1122 
1123 static inline void
1124 cs_equation_param_set_flag(cs_equation_param_t *eqp,
1125  cs_flag_t flag)
1126 {
1127  assert(eqp != NULL);
1128  eqp->flag |= flag;
1129 }
1130 
1131 /*----------------------------------------------------------------------------*/
1139 /*----------------------------------------------------------------------------*/
1140 
1141 static inline bool
1142 cs_equation_param_has_diffusion(const cs_equation_param_t *eqp)
1143 {
1144  assert(eqp != NULL);
1145  if (eqp->flag & CS_EQUATION_DIFFUSION)
1146  return true;
1147  else
1148  return false;
1149 }
1150 
1151 /*----------------------------------------------------------------------------*/
1159 /*----------------------------------------------------------------------------*/
1160 
1161 static inline bool
1162 cs_equation_param_has_curlcurl(const cs_equation_param_t *eqp)
1163 {
1164  assert(eqp != NULL);
1165  if (eqp->flag & CS_EQUATION_CURLCURL)
1166  return true;
1167  else
1168  return false;
1169 }
1170 
1171 /*----------------------------------------------------------------------------*/
1179 /*----------------------------------------------------------------------------*/
1180 
1181 static inline bool
1182 cs_equation_param_has_graddiv(const cs_equation_param_t *eqp)
1183 {
1184  assert(eqp != NULL);
1185  if (eqp->flag & CS_EQUATION_GRADDIV)
1186  return true;
1187  else
1188  return false;
1189 }
1190 
1191 /*----------------------------------------------------------------------------*/
1199 /*----------------------------------------------------------------------------*/
1200 
1201 static inline bool
1202 cs_equation_param_has_convection(const cs_equation_param_t *eqp)
1203 {
1204  assert(eqp != NULL);
1205  if (eqp->flag & CS_EQUATION_CONVECTION)
1206  return true;
1207  else
1208  return false;
1209 }
1210 
1211 /*----------------------------------------------------------------------------*/
1219 /*----------------------------------------------------------------------------*/
1220 
1221 static inline bool
1222 cs_equation_param_has_reaction(const cs_equation_param_t *eqp)
1223 {
1224  assert(eqp != NULL);
1225  if (eqp->flag & CS_EQUATION_REACTION)
1226  return true;
1227  else
1228  return false;
1229 }
1230 
1231 /*----------------------------------------------------------------------------*/
1239 /*----------------------------------------------------------------------------*/
1240 
1241 static inline bool
1242 cs_equation_param_has_time(const cs_equation_param_t *eqp)
1243 {
1244  assert(eqp != NULL);
1245  if (eqp->flag & CS_EQUATION_UNSTEADY)
1246  return true;
1247  else
1248  return false;
1249 }
1250 
1251 /*----------------------------------------------------------------------------*/
1259 /*----------------------------------------------------------------------------*/
1260 
1261 static inline bool
1262 cs_equation_param_has_sourceterm(const cs_equation_param_t *eqp)
1263 {
1264  assert(eqp != NULL);
1265  if (eqp->n_source_terms > 0)
1266  return true;
1267  else
1268  return false;
1269 }
1270 
1271 /*----------------------------------------------------------------------------*/
1280 /*----------------------------------------------------------------------------*/
1281 
1282 static inline bool
1283 cs_equation_param_has_internal_enforcement(const cs_equation_param_t *eqp)
1284 {
1285  assert(eqp != NULL);
1286  if (eqp->flag & CS_EQUATION_FORCE_VALUES)
1287  return true;
1288  else
1289  return false;
1290 }
1291 
1292 /*----------------------------------------------------------------------------*/
1301 /*----------------------------------------------------------------------------*/
1302 
1303 static inline bool
1304 cs_equation_param_has_implicit_advection(const cs_equation_param_t *eqp)
1305 {
1306  assert(eqp != NULL);
1307  if (eqp->flag & CS_EQUATION_CONVECTION) {
1310  return true;
1311  else
1312  return false;
1313  }
1314  else
1315  return false;
1316 }
1317 
1318 /*----------------------------------------------------------------------------*/
1327 /*----------------------------------------------------------------------------*/
1328 
1329 static inline bool
1330 cs_equation_param_has_user_hook(const cs_equation_param_t *eqp)
1331 {
1332  assert(eqp != NULL);
1333  if (eqp->flag & CS_EQUATION_USER_HOOK)
1334  return true;
1335  else
1336  return false;
1337 }
1338 
1339 /*----------------------------------------------------------------------------*/
1350 /*----------------------------------------------------------------------------*/
1351 
1352 static inline bool
1353 cs_equation_param_has_name(cs_equation_param_t *eqp,
1354  const char *name)
1355 {
1356  if (eqp == NULL)
1357  return false;
1358  if (eqp->name == NULL)
1359  return false;
1360  if (strcmp(eqp->name, name) == 0)
1361  return true;
1362  else
1363  return false;
1364 }
1365 
1366 /*============================================================================
1367  * Public function prototypes
1368  *============================================================================*/
1369 
1370 /*----------------------------------------------------------------------------*/
1381 /*----------------------------------------------------------------------------*/
1382 
1384 cs_equation_create_param(const char *name,
1385  cs_equation_type_t type,
1386  int dim,
1387  cs_param_bc_type_t default_bc);
1388 
1389 /*----------------------------------------------------------------------------*/
1398 /*----------------------------------------------------------------------------*/
1399 
1400 void
1402  cs_equation_param_t *dst,
1403  bool copy_fid);
1404 
1405 /*----------------------------------------------------------------------------*/
1417 /*----------------------------------------------------------------------------*/
1418 
1419 void
1421 
1422 /*----------------------------------------------------------------------------*/
1430 /*----------------------------------------------------------------------------*/
1431 
1434 
1435 /*----------------------------------------------------------------------------*/
1444 /*----------------------------------------------------------------------------*/
1445 
1446 void
1448  cs_equation_key_t key,
1449  const char *keyval);
1450 
1451 /*----------------------------------------------------------------------------*/
1459 /*----------------------------------------------------------------------------*/
1460 
1461 void
1463 
1464 /*----------------------------------------------------------------------------*/
1471 /*----------------------------------------------------------------------------*/
1472 
1473 void
1475 
1476 /*----------------------------------------------------------------------------*/
1482 /*----------------------------------------------------------------------------*/
1483 
1484 void
1486 
1487 /*----------------------------------------------------------------------------*/
1496 /*----------------------------------------------------------------------------*/
1497 
1498 bool
1500 
1501 /*----------------------------------------------------------------------------*/
1516 /*----------------------------------------------------------------------------*/
1517 
1518 cs_xdef_t *
1520  const char *z_name,
1521  cs_real_t *val);
1522 
1523 /*----------------------------------------------------------------------------*/
1539 /*----------------------------------------------------------------------------*/
1540 
1541 cs_xdef_t *
1543  const char *z_name,
1544  double quantity);
1545 
1546 /*----------------------------------------------------------------------------*/
1561 /*----------------------------------------------------------------------------*/
1562 
1563 cs_xdef_t *
1565  const char *z_name,
1566  cs_analytic_func_t *analytic,
1567  void *input);
1568 
1569 /*----------------------------------------------------------------------------*/
1578 /*----------------------------------------------------------------------------*/
1579 
1580 void
1582  cs_xdef_t *xdef);
1583 
1584 /*----------------------------------------------------------------------------*/
1597 /*----------------------------------------------------------------------------*/
1598 
1599 cs_xdef_t *
1601  const cs_param_bc_type_t bc_type,
1602  const char *z_name,
1603  cs_real_t *values);
1604 
1605 /*----------------------------------------------------------------------------*/
1622 /*----------------------------------------------------------------------------*/
1623 
1624 cs_xdef_t *
1626  const cs_param_bc_type_t bc_type,
1627  const char *z_name,
1628  cs_flag_t loc,
1629  cs_real_t *array,
1630  bool is_owner,
1631  cs_lnum_t *index);
1632 
1633 /*----------------------------------------------------------------------------*/
1648 /*----------------------------------------------------------------------------*/
1649 
1650 cs_xdef_t *
1652  const cs_param_bc_type_t bc_type,
1653  const char *z_name,
1654  cs_analytic_func_t *analytic,
1655  void *input);
1656 
1657 /*----------------------------------------------------------------------------*/
1673 /*----------------------------------------------------------------------------*/
1674 
1675 cs_xdef_t *
1677  const cs_param_bc_type_t bc_type,
1678  const char *z_name,
1679  cs_flag_t loc_flag,
1680  cs_dof_func_t *func,
1681  void *input);
1682 
1683 /*----------------------------------------------------------------------------*/
1694 /*----------------------------------------------------------------------------*/
1695 
1696 cs_xdef_t *
1698  const char *z_name);
1699 
1700 /*----------------------------------------------------------------------------*/
1712 /*----------------------------------------------------------------------------*/
1713 
1714 void
1716  const char *z_name);
1717 
1718 /*----------------------------------------------------------------------------*/
1727 /*----------------------------------------------------------------------------*/
1728 
1729 void
1731  const char *z_name);
1732 
1733 /*----------------------------------------------------------------------------*/
1743 /*----------------------------------------------------------------------------*/
1744 
1745 void
1747  cs_property_t *property);
1748 
1749 /*----------------------------------------------------------------------------*/
1758 /*----------------------------------------------------------------------------*/
1759 
1760 void
1762  cs_property_t *property,
1763  int inversion);
1764 
1765 /*----------------------------------------------------------------------------*/
1773 /*----------------------------------------------------------------------------*/
1774 
1775 void
1777  cs_property_t *property);
1778 
1779 /*----------------------------------------------------------------------------*/
1788 /*----------------------------------------------------------------------------*/
1789 
1790 void
1792  cs_property_t *property);
1793 
1794 /*----------------------------------------------------------------------------*/
1802 /*----------------------------------------------------------------------------*/
1803 
1804 void
1806  cs_adv_field_t *adv_field);
1807 
1808 /*----------------------------------------------------------------------------*/
1815 /*----------------------------------------------------------------------------*/
1816 
1817 void
1819  cs_property_t *property);
1820 
1821 /*----------------------------------------------------------------------------*/
1831 /*----------------------------------------------------------------------------*/
1832 
1833 int
1835  cs_property_t *property);
1836 
1837 /*----------------------------------------------------------------------------*/
1849 /*----------------------------------------------------------------------------*/
1850 
1851 cs_xdef_t *
1853  const char *z_name,
1854  cs_real_t *val);
1855 
1856 /*----------------------------------------------------------------------------*/
1869 /*----------------------------------------------------------------------------*/
1870 
1871 cs_xdef_t *
1873  const char *z_name,
1874  cs_analytic_func_t *func,
1875  void *input);
1876 
1877 /*----------------------------------------------------------------------------*/
1891 /*----------------------------------------------------------------------------*/
1892 
1893 cs_xdef_t *
1895  const char *z_name,
1896  cs_flag_t loc_flag,
1897  cs_dof_func_t *func,
1898  void *input);
1899 
1900 /*----------------------------------------------------------------------------*/
1916 /*----------------------------------------------------------------------------*/
1917 
1918 cs_xdef_t *
1920  const char *z_name,
1921  cs_flag_t loc,
1922  cs_real_t *array,
1923  bool is_owner,
1924  cs_lnum_t *index);
1925 
1926 /*----------------------------------------------------------------------------*/
1938 /*----------------------------------------------------------------------------*/
1939 
1940 cs_xdef_t *
1942  const char *z_name,
1943  double *val);
1944 
1945 /*----------------------------------------------------------------------------*/
1958 /*----------------------------------------------------------------------------*/
1959 
1960 cs_xdef_t *
1962  const char *z_name,
1963  double *quantity);
1964 
1965 /*----------------------------------------------------------------------------*/
1978 /*----------------------------------------------------------------------------*/
1979 
1980 cs_xdef_t *
1982  const char *z_name,
1983  cs_analytic_func_t *func,
1984  void *input);
1985 
1986 /*----------------------------------------------------------------------------*/
2003 /*----------------------------------------------------------------------------*/
2004 
2005 void
2007  cs_lnum_t n_elts,
2008  const cs_lnum_t elt_ids[],
2009  const cs_real_t ref_value[],
2010  const cs_real_t elt_values[]);
2011 
2012 /*----------------------------------------------------------------------------*/
2027 /*----------------------------------------------------------------------------*/
2028 
2029 void
2031  cs_lnum_t n_elts,
2032  const cs_lnum_t elt_ids[],
2033  const cs_real_t ref_value[],
2034  const cs_real_t elt_values[]);
2035 
2036 /*----------------------------------------------------------------------------*/
2037 
2039 
2040 #endif /* __CS_EQUATION_PARAM_H__ */
cs_real_t * enforced_dof_values
Definition: cs_equation_param.h:776
cs_param_advection_strategy_t adv_strategy
Definition: cs_equation_param.h:661
Definition: cs_equation_param.h:1090
cs_hodge_param_t graddiv_hodgep
Definition: cs_equation_param.h:618
cs_adv_field_t * adv_field
Definition: cs_equation_param.h:664
#define restrict
Definition: cs_defs.h:127
int imligr
Definition: cs_equation_param.h:467
Definition: cs_equation_param.h:1078
cs_real_t theta
Definition: cs_equation_param.h:572
Definition: cs_equation_param.h:1095
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
int iwgrec
Definition: cs_equation_param.h:469
Definition: cs_advection_field.h:149
cs_flag_t flag
Definition: cs_equation_param.h:229
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
int ndircl
Definition: cs_equation_param.h:456
Definition: cs_equation_param.h:1097
cs_flag_t process_flag
Definition: cs_equation_param.h:235
cs_xdef_t ** ic_defs
Definition: cs_equation_param.h:537
cs_param_advection_form_t adv_formulation
Definition: cs_equation_param.h:659
int verbosity
Definition: cs_equation_param.h:221
cs_param_assemble_omp_strategy_t
Definition: cs_param_cdo.h:92
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources...
Definition: cs_equation_param.h:202
Definition: cs_equation_param.h:1080
Definition: cs_equation_param.h:1076
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
cs_equation_type_t type
Definition: cs_equation_param.h:209
Definition: cs_equation_param.h:1106
#define CS_EQUATION_CURLCURL
The term related to the curl-curl operator is needed.
Definition: cs_equation_param.h:96
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
cs_param_dof_reduction_t dof_reduction
Definition: cs_equation_param.h:239
Definition: cs_equation_param.h:188
cs_param_bc_enforce_t
Definition: cs_param_types.h:475
cs_param_space_scheme_t space_scheme
Definition: cs_equation_param.h:238
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
cs_real_t * enforcement_ref_value
Definition: cs_equation_param.h:768
cs_real_t upwind_portion
Definition: cs_equation_param.h:663
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
double epsilo
Definition: cs_equation_param.h:474
double epsrgr
Definition: cs_equation_param.h:476
int istat
Definition: cs_equation_param.h:454
int space_poly_degree
Definition: cs_equation_param.h:244
cs_property_t ** reaction_properties
Definition: cs_equation_param.h:688
cs_xdef_t ** volume_mass_injections
Definition: cs_equation_param.h:725
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
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_param_advection_extrapol_t adv_extrapol
Definition: cs_equation_param.h:662
Definition: cs_equation_param.h:1087
int imrgra
Definition: cs_equation_param.h:466
cs_real_t strong_pena_bc_coeff
Definition: cs_equation_param.h:521
Definition: cs_equation_param.h:1085
cs_property_t * curlcurl_property
Definition: cs_equation_param.h:603
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
Definition: cs_equation_param.h:1083
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_param_time_scheme_t time_scheme
Definition: cs_equation_param.h:571
cs_param_advection_strategy_t
Choice of how to handle the advection term in an equation.
Definition: cs_param_types.h:344
#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
Definition: cs_equation_param.h:1091
Structure and routines handling the SLES settings stored inside a cs_param_sles_t structure...
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
double cs_real_t
Floating-point value.
Definition: cs_defs.h:307
#define CS_EQUATION_UNSTEADY
Unsteady term is needed.
Definition: cs_equation_param.h:93
Definition: cs_equation_param.h:1101
cs_property_t * time_property
Definition: cs_equation_param.h:570
Definition: cs_equation_param.h:1079
cs_real_t weak_pena_bc_coeff
Definition: cs_equation_param.h:522
cs_flag_t enforcement_type
Definition: cs_equation_param.h:767
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
cs_param_advection_extrapol_t
Choice of how to extrapolate the advection field in the advection term.
Definition: cs_param_types.h:378
Definition: cs_equation_param.h:1103
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
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
Definition: cs_equation_param.h:187
Definition: cs_equation_param.h:1104
Definition: cs_equation_param.h:185
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
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param_types.h:172
cs_lnum_t * enforced_cell_ids
Definition: cs_equation_param.h:771
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
cs_xdef_t ** source_terms
Definition: cs_equation_param.h:705
int icoupl
Definition: cs_equation_param.h:470
int n_volume_mass_injections
Definition: cs_equation_param.h:724
#define CS_EQUATION_CONVECTION
Convection term is needed.
Definition: cs_equation_param.h:94
Definition: cs_equation_param.h:1102
cs_real_t * enforced_cell_values
Definition: cs_equation_param.h:772
int iconv
Definition: cs_equation_param.h:453
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
Definition: cs_equation_param.h:1082
double climgr
Definition: cs_equation_param.h:477
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
double thetav
Definition: cs_equation_param.h:471
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
cs_lnum_t * enforced_dof_ids
Definition: cs_equation_param.h:775
Definition: cs_equation_param.h:1088
double blend_st
Definition: cs_equation_param.h:473
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
cs_param_assemble_omp_strategy_t omp_assembly_choice
Definition: cs_equation_param.h:801
Definition: cs_equation_param.h:1093
int dim
Definition: cs_equation_param.h:210
Definition: cs_equation_param.h:1099
Definition: cs_equation_param.h:1077
Definition: cs_equation_param.h:1084
int ircflu
Definition: cs_equation_param.h:468
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_property_t * diffusion_property
Definition: cs_equation_param.h:587
Definition: cs_equation_param.h:1094
double blencv
Definition: cs_equation_param.h:472
int idften
Definition: cs_equation_param.h:459
Definition: cs_equation_param.h:1081
char *restrict name
Definition: cs_equation_param.h:208
cs_property_t * adv_scaling_property
Definition: cs_equation_param.h:665
Definition: cs_equation_param.h:1089
Definition: cs_equation_param.h:1096
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
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
int n_ic_defs
Definition: cs_equation_param.h:536
Definition: cs_equation_param.h:184
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
Structure storing medata for defining a quantity in a very flexible way.
Definition: cs_xdef.h:154
int ischcv
Definition: cs_equation_param.h:461
#define CS_EQUATION_GRADDIV
The term related to the grad-div operator is needed.
Definition: cs_equation_param.h:97
int n_source_terms
Definition: cs_equation_param.h:704
#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
int nswrgr
Definition: cs_equation_param.h:464
cs_property_t * graddiv_property
Definition: cs_equation_param.h:619
cs_hodge_param_t curlcurl_hodgep
Definition: cs_equation_param.h:602
int iwarni
Definition: cs_equation_param.h:222
cs_equation_key_t
List of available keys for setting the parameters of an equation.
Definition: cs_equation_param.h:1074
Definition: cs_equation_param.h:183
int idircl
Definition: cs_equation_param.h:455
cs_equation_type_t
Type of equations managed by the solver.
Definition: cs_equation_param.h:181
cs_param_sles_t * sles_param
Definition: cs_equation_param.h:790
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
int isstpc
Definition: cs_equation_param.h:463
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
int nswrsm
Definition: cs_equation_param.h:465
Definition: cs_equation_param.h:189
cs_param_bc_enforce_t default_enforcement
Definition: cs_equation_param.h:520
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:301
int n_reaction_terms
Definition: cs_equation_param.h:687
cs_param_advection_scheme_t adv_scheme
Definition: cs_equation_param.h:660
cs_lnum_t n_enforced_dofs
Definition: cs_equation_param.h:774
int iswdyn
Definition: cs_equation_param.h:460
int n_bc_defs
Definition: cs_equation_param.h:517
int ibdtso
Definition: cs_equation_param.h:462
cs_lnum_t n_enforced_cells
Definition: cs_equation_param.h:770
Definition: cs_equation_param.h:191
#define END_C_DECLS
Definition: cs_defs.h:496
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
unsigned short int cs_flag_t
Definition: cs_defs.h:309
cs_param_dof_reduction_t
Definition: cs_param_types.h:199
cs_param_bc_type_t
Definition: cs_param_types.h:431
double relaxv
Definition: cs_equation_param.h:479
int idifft
Definition: cs_equation_param.h:458
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
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
Definition: cs_param_types.h:346
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
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
bool do_lumping
Definition: cs_equation_param.h:551
cs_param_bc_type_t default_bc
Definition: cs_equation_param.h:516
cs_hodge_param_t reaction_hodgep
Definition: cs_equation_param.h:686
cs_xdef_t ** bc_defs
Definition: cs_equation_param.h:518
cs_param_advection_scheme_t
Definition: cs_param_types.h:311
Definition: cs_equation_param.h:1092
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
Definition: cs_equation_param.h:1100
Definition: cs_equation_param.h:1086
#define CS_EQUATION_REACTION
Reaction term is needed.
Definition: cs_equation_param.h:98
cs_hodge_param_t diffusion_hodgep
Definition: cs_equation_param.h:586
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
#define CS_EQUATION_DIFFUSION
Diffusion term is needed. A scalar-/vector-valued Laplacian with div .grad.
Definition: cs_equation_param.h:95
Definition: cs_param_types.h:347
int idiff
Definition: cs_equation_param.h:457
double extrag
Definition: cs_equation_param.h:478
cs_param_time_scheme_t
Definition: cs_param_types.h:234
Definition: cs_equation_param.h:1098
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
cs_param_advection_form_t
Definition: cs_param_types.h:267
Structure associated to the definition of a property relying on the cs_xdef_t structure.
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
cs_hodge_param_t time_hodgep
Definition: cs_equation_param.h:569
Structure storing all metadata/parameters related to the usage of a discrete Hodge operator...
Definition: cs_hodge.h:165
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
Structure storing all metadata related to the resolution of a linear system with an iterative solver...
Definition: cs_param_sles.h:62
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
double epsrsm
Definition: cs_equation_param.h:475
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
Definition: cs_equation_param.h:186