6.2
general documentation
cs_equation.h
Go to the documentation of this file.
1 #ifndef __CS_EQUATION_H__
2 #define __CS_EQUATION_H__
3 
4 /*============================================================================
5  * Routines to handle cs_equation_t structure and its related structures
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_cdo_connect.h"
33 #include "cs_cdo_quantities.h"
34 #include "cs_equation_param.h"
35 #include "cs_equation_common.h"
36 #include "cs_field.h"
37 #include "cs_mesh.h"
38 #include "cs_restart.h"
39 #include "cs_time_step.h"
40 
41 /*----------------------------------------------------------------------------*/
42 
44 
45 /*============================================================================
46  * Macro definitions
47  *============================================================================*/
48 
49 /*============================================================================
50  * Type definitions
51  *============================================================================*/
52 
53 typedef struct _cs_equation_t cs_equation_t;
54 
55 /*============================================================================
56  * Public function prototypes
57  *============================================================================*/
58 
59 /*----------------------------------------------------------------------------*/
65 /*----------------------------------------------------------------------------*/
66 
67 int
69 
70 /*----------------------------------------------------------------------------*/
79 /*----------------------------------------------------------------------------*/
80 
82 cs_equation_by_name(const char *eqname);
83 
84 /*----------------------------------------------------------------------------*/
95 /*----------------------------------------------------------------------------*/
96 
97 bool
99  const char *fld_name);
100 
101 /*----------------------------------------------------------------------------*/
110 /*----------------------------------------------------------------------------*/
111 
113 cs_equation_param_by_name(const char *eqname);
114 
115 /*----------------------------------------------------------------------------*/
124 /*----------------------------------------------------------------------------*/
125 
128 
129 /*----------------------------------------------------------------------------*/
138 /*----------------------------------------------------------------------------*/
139 
141 cs_equation_by_id(int eq_id);
142 
143 /*----------------------------------------------------------------------------*/
151 /*----------------------------------------------------------------------------*/
152 
153 const char *
155 
156 /*----------------------------------------------------------------------------*/
164 /*----------------------------------------------------------------------------*/
165 
166 int
168 
169 /*----------------------------------------------------------------------------*/
177 /*----------------------------------------------------------------------------*/
178 
179 cs_field_t *
181 
182 /*----------------------------------------------------------------------------*/
191 /*----------------------------------------------------------------------------*/
192 
193 int
195 
196 /*----------------------------------------------------------------------------*/
205 /*----------------------------------------------------------------------------*/
206 
207 const cs_range_set_t *
209 
210 /*----------------------------------------------------------------------------*/
220 /*----------------------------------------------------------------------------*/
221 
222 cs_gnum_t
224  const cs_cdo_quantities_t *cdoq);
225 
226 /*----------------------------------------------------------------------------*/
235 /*----------------------------------------------------------------------------*/
236 
237 cs_field_t *
239 
240 /*----------------------------------------------------------------------------*/
248 /*----------------------------------------------------------------------------*/
249 
250 cs_flag_t
252 
253 /*----------------------------------------------------------------------------*/
260 /*----------------------------------------------------------------------------*/
261 
262 void
264  cs_flag_t flag);
265 
266 /*----------------------------------------------------------------------------*/
277 /*----------------------------------------------------------------------------*/
278 
279 void
281  void *context,
283 
284 /*----------------------------------------------------------------------------*/
293 /*----------------------------------------------------------------------------*/
294 
297 
298 /*----------------------------------------------------------------------------*/
307 /*----------------------------------------------------------------------------*/
308 
309 void *
311 
312 /*----------------------------------------------------------------------------*/
320 /*----------------------------------------------------------------------------*/
321 
322 bool
324 
325 /*----------------------------------------------------------------------------*/
333 /*----------------------------------------------------------------------------*/
334 
335 bool
337 
338 /*----------------------------------------------------------------------------*/
350 /*----------------------------------------------------------------------------*/
351 
353 cs_equation_add(const char *eqname,
354  const char *varname,
355  cs_equation_type_t eqtype,
356  int dim,
357  cs_param_bc_type_t default_bc);
358 
359 /*----------------------------------------------------------------------------*/
370 /*----------------------------------------------------------------------------*/
371 
373 cs_equation_add_user(const char *eqname,
374  const char *varname,
375  int dim,
376  cs_param_bc_type_t default_bc);
377 
378 /*----------------------------------------------------------------------------*/
382 /*----------------------------------------------------------------------------*/
383 
384 void
386 
387 /*----------------------------------------------------------------------------*/
394 /*----------------------------------------------------------------------------*/
395 
396 bool
398 
399 /*----------------------------------------------------------------------------*/
404 /*----------------------------------------------------------------------------*/
405 
406 void
408 
409 /*----------------------------------------------------------------------------*/
417 /*----------------------------------------------------------------------------*/
418 
419 void
420 cs_equation_get_count(int *n_equations,
421  int *n_predef_equations,
422  int *n_user_equations);
423 
424 /*----------------------------------------------------------------------------*/
428 /*----------------------------------------------------------------------------*/
429 
430 void
432 
433 /*----------------------------------------------------------------------------*/
440 /*----------------------------------------------------------------------------*/
441 
442 void
444  const char *keyval);
445 
446 /*----------------------------------------------------------------------------*/
450 /*----------------------------------------------------------------------------*/
451 
452 void
454 
455 /*----------------------------------------------------------------------------*/
469 /*----------------------------------------------------------------------------*/
470 
471 void
473  const cs_cdo_quantities_t *quant,
474  const cs_time_step_t *time_step,
475  cs_flag_t eb_scheme_flag,
476  cs_flag_t fb_scheme_flag,
477  cs_flag_t vb_scheme_flag,
478  cs_flag_t vcb_scheme_flag,
479  cs_flag_t hho_scheme_flag);
480 
481 /*----------------------------------------------------------------------------*/
492 /*----------------------------------------------------------------------------*/
493 
494 void
496  cs_flag_t vcb_scheme_flag,
497  cs_flag_t eb_scheme_flag,
498  cs_flag_t fb_scheme_flag,
499  cs_flag_t hho_scheme_flag);
500 
501 /*----------------------------------------------------------------------------*/
508 /*----------------------------------------------------------------------------*/
509 
510 void
512 
513 /*----------------------------------------------------------------------------*/
522 /*----------------------------------------------------------------------------*/
523 
524 bool
526 
527 /*----------------------------------------------------------------------------*/
531 /*----------------------------------------------------------------------------*/
532 
533 void
535 
536 /*----------------------------------------------------------------------------*/
547 /*----------------------------------------------------------------------------*/
548 
549 void
551  const cs_time_step_t *ts,
552  const cs_cdo_quantities_t *quant,
553  cs_cdo_connect_t *connect);
554 
555 /*----------------------------------------------------------------------------*/
563 /*----------------------------------------------------------------------------*/
564 
565 void
567  cs_equation_t *eq);
568 
569 /*----------------------------------------------------------------------------*/
578 /*----------------------------------------------------------------------------*/
579 
580 void
581 cs_equation_solve(bool cur2prev,
582  const cs_mesh_t *mesh,
583  cs_equation_t *eq);
584 
585 /*----------------------------------------------------------------------------*/
592 /*----------------------------------------------------------------------------*/
593 
594 void
596  cs_equation_t *eq);
597 
598 /*----------------------------------------------------------------------------*/
604 /*----------------------------------------------------------------------------*/
605 
606 void
608 
609 /*----------------------------------------------------------------------------*/
618 /*----------------------------------------------------------------------------*/
619 
622 
623 /*----------------------------------------------------------------------------*/
632 /*----------------------------------------------------------------------------*/
633 
636 
637 /*----------------------------------------------------------------------------*/
649 /*----------------------------------------------------------------------------*/
650 
653  const int reaction_id);
654 
655 /*----------------------------------------------------------------------------*/
664 /*----------------------------------------------------------------------------*/
665 
668 
669 /*----------------------------------------------------------------------------*/
679 /*----------------------------------------------------------------------------*/
680 
681 cs_real_t
683 
684 /*----------------------------------------------------------------------------*/
693 /*----------------------------------------------------------------------------*/
694 
697 
698 /*----------------------------------------------------------------------------*/
707 /*----------------------------------------------------------------------------*/
708 
709 int
711 
712 /*----------------------------------------------------------------------------*/
720 /*----------------------------------------------------------------------------*/
721 
722 int
724 
725 /*----------------------------------------------------------------------------*/
733 /*----------------------------------------------------------------------------*/
734 
737 
738 /*----------------------------------------------------------------------------*/
746 /*----------------------------------------------------------------------------*/
747 
748 void
750 
751 /*----------------------------------------------------------------------------*/
760 /*----------------------------------------------------------------------------*/
761 
762 void
764  cs_cell_sys_t **csys,
765  cs_cell_builder_t **cb);
766 
767 /*----------------------------------------------------------------------------*/
777 /*----------------------------------------------------------------------------*/
778 
779 cs_real_t *
781  bool previous);
782 
783 /*----------------------------------------------------------------------------*/
793 /*----------------------------------------------------------------------------*/
794 
795 cs_real_t *
797  bool previous);
798 
799 /*----------------------------------------------------------------------------*/
809 /*----------------------------------------------------------------------------*/
810 
811 cs_real_t *
813  bool previous);
814 
815 /*----------------------------------------------------------------------------*/
825 /*----------------------------------------------------------------------------*/
826 
827 cs_real_t *
829  bool previous);
830 
831 /*----------------------------------------------------------------------------*/
841 /*----------------------------------------------------------------------------*/
842 
843 void
845  const cs_cdo_quantities_t *cdoq,
846  const cs_equation_t *eq,
847  cs_real_t *result);
848 
849 /*----------------------------------------------------------------------------*/
860 /*----------------------------------------------------------------------------*/
861 
862 void
864  const cs_equation_t *eq,
865  cs_real_t *diff_flux);
866 
867 /*----------------------------------------------------------------------------*/
878 /*----------------------------------------------------------------------------*/
879 
880 void
882  const char *ml_name,
883  const cs_real_3_t direction,
884  cs_real_t *diff_flux,
885  cs_real_t *conv_flux);
886 
887 /*----------------------------------------------------------------------------*/
897 /*----------------------------------------------------------------------------*/
898 
899 void
901  cs_flag_t location,
902  cs_real_t t_eval,
903  cs_real_t *diff_flux);
904 
905 /*----------------------------------------------------------------------------*/
912 /*----------------------------------------------------------------------------*/
913 
914 void
916  cs_real_t *v_gradient);
917 
918 /*----------------------------------------------------------------------------*/
927 /*----------------------------------------------------------------------------*/
928 
929 void
931  const cs_time_step_t *ts,
932  cs_real_t peclet[]);
933 
934 /*----------------------------------------------------------------------------*/
941 /*----------------------------------------------------------------------------*/
942 
943 void
945 
946 /*----------------------------------------------------------------------------*/
953 /*----------------------------------------------------------------------------*/
954 
955 void
957 
958 /*----------------------------------------------------------------------------*/
967 /*----------------------------------------------------------------------------*/
968 
969 void
971  const cs_cdo_connect_t *connect,
972  const cs_cdo_quantities_t *cdoq,
973  const cs_time_step_t *ts);
974 
975 /*----------------------------------------------------------------------------*/
980 /*----------------------------------------------------------------------------*/
981 
982 void
984 
985 /*----------------------------------------------------------------------------*/
986 
988 
989 #endif /* __CS_EQUATION_H__ */
Store common elements used when building an algebraic system related to an equation.
void cs_equation_post_balance(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_time_step_t *ts)
Predefined extra-operations related to all equations.
Definition: cs_equation.c:3285
time step descriptor
Definition: cs_time_step.h:64
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:286
cs_property_t * cs_equation_get_time_property(const cs_equation_t *eq)
Return a pointer to the cs_property_t structure associated to the unsteady term for this equation (NU...
Definition: cs_equation.c:830
void cs_equation_read_extra_restart(cs_restart_t *restart)
Write into the restart file additionnal arrays (not defined as fields) but useful for the checkpoint/...
Definition: cs_equation.c:3237
void cs_equation_set_flag(cs_equation_t *eq, cs_flag_t flag)
Redefine the flag associated to an equation.
Definition: cs_equation.c:703
Field descriptor.
Definition: cs_field.h:125
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources...
Definition: cs_equation_param.h:201
bool cs_equation_set_functions(void)
Assign a set of pointer functions for managing the cs_equation_t structure during the computation Aft...
Definition: cs_equation.c:1858
void cs_equation_compute_flux_across_plane(const cs_equation_t *eq, const char *ml_name, const cs_real_3_t direction, cs_real_t *diff_flux, cs_real_t *conv_flux)
Compute the diffusive and convective flux across a plane defined by a mesh location structure attache...
Definition: cs_equation.c:2993
cs_equation_builder_t * cs_equation_get_builder(const cs_equation_t *eq)
Return the cs_equation_builder_t structure associated to a cs_equation_t structure. Only for an advanced usage.
Definition: cs_equation.c:768
cs_real_t * cs_equation_get_edge_values(const cs_equation_t *eq, bool previous)
For a given equation, retrieve an array of values related to each edge of the mesh for the unknowns...
Definition: cs_equation.c:2746
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
void cs_equation_set_sles(void)
Setup the linear algebra requirements.
Definition: cs_equation.c:1438
void cs_equation_compute_boundary_diff_flux(cs_real_t t_eval, const cs_equation_t *eq, cs_real_t *diff_flux)
Compute the diffusive flux across all boundary faces According to the space discretization scheme...
Definition: cs_equation.c:2908
bool cs_equation_uses_new_mechanism(const cs_equation_t *eq)
Return true is the given equation is steady otherwise false.
Definition: cs_equation.c:1059
void cs_equation_current_to_previous(const cs_equation_t *eq)
Apply the current to previous to all fields (and potentially arrays) related to an equation...
Definition: cs_equation.c:2638
void cs_equation_get_cellwise_builders(const cs_equation_t *eq, cs_cell_sys_t **csys, cs_cell_builder_t **cb)
For a given equation, retrieve the related cellwise builder structures: cs_cell_builder_t and cs_cell...
Definition: cs_equation.c:2667
void cs_equation_set_default_param(cs_equation_key_t key, const char *keyval)
Set a parameter attached to a keyname for the default settigns.
Definition: cs_equation.c:1408
Definition: cs_cdo_connect.h:76
void cs_equation_compute_diff_flux_cellwise(const cs_equation_t *eq, cs_flag_t location, cs_real_t t_eval, cs_real_t *diff_flux)
Cellwise computation of the diffusive flux across all cell faces. Primal or dual faces are considered...
Definition: cs_equation.c:3066
void cs_equation_build_system(const cs_mesh_t *mesh, cs_equation_t *eq)
Build the linear system for this equation.
Definition: cs_equation.c:2416
double cs_real_t
Floating-point value.
Definition: cs_defs.h:307
void cs_equation_integrate_variable(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_equation_t *eq, cs_real_t *result)
Compute the integral over the domain of the variable field associated to the given equation...
Definition: cs_equation.c:2798
Definition: cs_cdo_quantities.h:124
Set of arrays and local (small) dense matrices related to a mesh cell This is a key structure for bui...
Definition: cs_cdo_local.h:107
cs_property_t * cs_equation_get_reaction_property(const cs_equation_t *eq, const int reaction_id)
Return a pointer to the cs_property_t structure associated to the reaction term with id equal to reac...
Definition: cs_equation.c:855
Definition: cs_mesh.h:74
cs_real_t * cs_equation_get_vertex_values(const cs_equation_t *eq, bool previous)
For a given equation, retrieve an array of values related to each vertex of the mesh for the unknowns...
Definition: cs_equation.c:2772
cs_equation_t * cs_equation_by_id(int eq_id)
Find the cs_equation_t structure with id eq_id Return NULL if not find.
Definition: cs_equation.c:466
void cs_equation_log_setup(void)
Summarize all cs_equation_t structures.
Definition: cs_equation.c:1371
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param_types.h:178
cs_equation_param_t * cs_equation_get_param(const cs_equation_t *eq)
Return the cs_equation_param_t structure associated to a cs_equation_t structure. ...
Definition: cs_equation.c:446
cs_param_space_scheme_t cs_equation_get_space_scheme(const cs_equation_t *eq)
Return the type of numerical scheme used for the discretization in space.
Definition: cs_equation.c:950
void cs_equation_initialize(const cs_mesh_t *mesh, const cs_time_step_t *ts, const cs_cdo_quantities_t *quant, cs_cdo_connect_t *connect)
Allocate and initialize the builder of the algebraic system. Set the initialize condition to all vari...
Definition: cs_equation.c:2361
void cs_equation_unset_shared_structures(cs_flag_t vb_scheme_flag, cs_flag_t vcb_scheme_flag, cs_flag_t eb_scheme_flag, cs_flag_t fb_scheme_flag, cs_flag_t hho_scheme_flag)
Release shared structures among the activated class of discretization schemes.
Definition: cs_equation.c:1603
cs_param_time_scheme_t cs_equation_get_time_scheme(const cs_equation_t *eq)
Return the type of numerical scheme used for the discretization in time.
Definition: cs_equation.c:880
cs_real_t * cs_equation_get_face_values(const cs_equation_t *eq, bool previous)
For a given equation, retrieve an array of values related to each face of the mesh for the unknowns...
Definition: cs_equation.c:2720
void * cs_equation_get_scheme_context(const cs_equation_t *eq)
Return a pointer to a structure useful to handle low-level operations for the given equation...
Definition: cs_equation.c:788
struct _cs_restart_t cs_restart_t
Definition: cs_restart.h:87
Definition: cs_range_set.h:57
void cs_equation_extra_post(void)
Predefined extra-operations related to equations according to the type of numerical scheme (for the s...
Definition: cs_equation.c:3398
cs_field_t * cs_equation_get_boundary_flux(const cs_equation_t *eq)
Return the field structure for the (normal) boundary flux associated to a cs_equation_t structure...
Definition: cs_equation.c:660
void cs_equation_compute_vtx_field_gradient(const cs_equation_t *eq, cs_real_t *v_gradient)
Cellwise computation of the discrete gradient at vertices.
Definition: cs_equation.c:3147
cs_property_t * cs_equation_get_diffusion_property(const cs_equation_t *eq)
Return a pointer to the cs_property_t structure associated to the diffusion term for this equation (N...
Definition: cs_equation.c:808
void cs_equation_solve_deprecated(cs_equation_t *eq)
Solve the linear system for this equation.
Definition: cs_equation.c:2457
Set of local and temporary buffers useful for building the algebraic system with a cellwise process...
Definition: cs_cdo_local.h:69
int cs_equation_get_id(const cs_equation_t *eq)
Return the id number related to the given cs_equation_t structure.
Definition: cs_equation.c:506
cs_equation_t * cs_equation_add_user(const char *eqname, const char *varname, int dim, cs_param_bc_type_t default_bc)
Add a new user equation structure and set a first set of parameters.
Definition: cs_equation.c:1224
cs_equation_key_t
List of available keys for setting the parameters of an equation.
Definition: cs_equation_param.h:1052
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:320
cs_equation_type_t
Type of equations managed by the solver.
Definition: cs_equation_param.h:180
char *restrict varname
Definition: cs_equation_priv.h:330
int cs_equation_get_field_id(const cs_equation_t *eq)
Return the id related to the variable field structure associated to the cs_equation_t structure...
Definition: cs_equation.c:546
void cs_equation_create_fields(void)
Create a field structure related to all cs_equation_t structures.
Definition: cs_equation.c:2256
bool cs_equation_has_field_name(const cs_equation_t *eq, const char *fld_name)
Check if the asociated field to a cs_equation_t structure has name equal to fld_name.
Definition: cs_equation.c:389
cs_equation_type_t cs_equation_get_type(const cs_equation_t *eq)
Return the type of equation for the given equation structure.
Definition: cs_equation.c:1014
void cs_equation_add_user_hook(cs_equation_t *eq, void *context, cs_equation_user_hook_t *func)
Add a user hook to enable an advanced user to get a fine control of the cellwise system building...
Definition: cs_equation.c:727
#define END_C_DECLS
Definition: cs_defs.h:496
unsigned short int cs_flag_t
Definition: cs_defs.h:309
void cs_equation_solve(bool cur2prev, const cs_mesh_t *mesh, cs_equation_t *eq)
Build and then solve the linear system for an equation with an unsteady term.
Definition: cs_equation.c:2603
cs_param_bc_type_t
Definition: cs_param_types.h:365
cs_flag_t cs_equation_get_flag(const cs_equation_t *eq)
Return the flag associated to an equation.
Definition: cs_equation.c:681
cs_gnum_t cs_equation_get_global_n_dofs(const cs_equation_t *eq, const cs_cdo_quantities_t *cdoq)
Return the global number of degrees of freedom associated to this cs_equation_t structure.
Definition: cs_equation.c:587
bool cs_equation_needs_steady_state_solve(void)
Check if a steady-state computation is requested according to the setting.
Definition: cs_equation.c:1306
cs_field_t * cs_equation_get_field(const cs_equation_t *eq)
Return the field structure associated to a cs_equation_t structure.
Definition: cs_equation.c:526
const cs_range_set_t * cs_equation_get_range_set(const cs_equation_t *eq)
Return the range set structure associated to a cs_equation_t structure.
Definition: cs_equation.c:566
cs_equation_t * cs_equation_add(const char *eqname, const char *varname, cs_equation_type_t eqtype, int dim, cs_param_bc_type_t default_bc)
Add a new equation structure and set a first set of parameters.
Definition: cs_equation.c:1096
void cs_equation_compute_peclet(const cs_equation_t *eq, const cs_time_step_t *ts, cs_real_t peclet[])
Compute and post-process Peclet number if requested.
Definition: cs_equation.c:3189
cs_equation_param_t * cs_equation_param_by_name(const char *eqname)
Return the cs_equation_param_t structure associated to a cs_equation_t structure thanks to the equati...
Definition: cs_equation.c:417
void cs_equation_set_shared_structures(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, cs_flag_t eb_scheme_flag, cs_flag_t fb_scheme_flag, cs_flag_t vb_scheme_flag, cs_flag_t vcb_scheme_flag, cs_flag_t hho_scheme_flag)
Set shared structures among the activated class of discretization schemes.
Definition: cs_equation.c:1478
void() cs_equation_user_hook_t(const cs_equation_param_t *eqp, const cs_equation_builder_t *eqb, const void *eq_context, const cs_cell_mesh_t *cm, cs_hodge_t *mass_hodge, cs_hodge_t *diff_hodge, cs_cell_sys_t *csys, cs_cell_builder_t *cb)
Generic function prototype for a hook during the cellwise building of the linear system Enable an adv...
Definition: cs_equation_common.h:92
int cs_equation_get_var_dim(const cs_equation_t *eq)
Return the dimension of the variable solved by this equation.
Definition: cs_equation.c:993
void cs_equation_set_range_set(const cs_cdo_connect_t *connect)
Assign a cs_range_set_t structures for synchronization when computing in parallel mode...
Definition: cs_equation.c:1645
void cs_equation_destroy_all(void)
Destroy all cs_equation_t structures.
Definition: cs_equation.c:1259
void cs_equation_get_count(int *n_equations, int *n_predef_equations, int *n_user_equations)
Get the count of equations of each macro type.
Definition: cs_equation.c:1355
Main structure to handle the discretization and the resolution of an equation.
void cs_equation_solve_steady_state(const cs_mesh_t *mesh, cs_equation_t *eq)
Build and then solve the linear system for this equation when the goal is to find the steady state...
Definition: cs_equation.c:2568
cs_real_t * cs_equation_get_cell_values(const cs_equation_t *eq, bool previous)
For a given equation, retrieve an array of values related to each cell of the mesh for the unknowns...
Definition: cs_equation.c:2694
cs_param_time_scheme_t
Definition: cs_param_types.h:237
Structure and routines handling the specific settings related to a cs_equation_t structure.
const char * cs_equation_get_name(const cs_equation_t *eq)
Return the name related to the given cs_equation_t structure.
Definition: cs_equation.c:486
cs_equation_t * cs_equation_by_name(const char *eqname)
Find the cs_equation_t structure with name eqname Return NULL if not find.
Definition: cs_equation.c:353
int cs_equation_get_space_poly_degree(const cs_equation_t *eq)
Return the max. degree used in the polynomial basis for the space discretization. ...
Definition: cs_equation.c:972
Structure associated to the definition of a property relying on the cs_xdef_t structure.
void cs_equation_write_extra_restart(cs_restart_t *restart)
Write into the restart file additionnal arrays (not defined as fields) but useful for the checkpoint/...
Definition: cs_equation.c:3260
Definition: cs_equation_priv.h:323
int cs_equation_get_n_equations(void)
Retrieve the number of equations.
Definition: cs_equation.c:336
Definition: mesh.f90:26
cs_real_t cs_equation_get_theta_time_val(const cs_equation_t *eq)
Return the value of the theta parameter in theta time scheme discretization.
Definition: cs_equation.c:903
void cs_equation_log_monitoring(void)
Print a synthesis of the monitoring information in the performance file.
Definition: cs_equation.c:1328
bool cs_equation_is_steady(const cs_equation_t *eq)
Return true is the given equation is steady otherwise false.
Definition: cs_equation.c:1035