programmer's documentation
cs_cdo_time.h
Go to the documentation of this file.
1 #ifndef __CS_CDO_TIME_H__
2 #define __CS_CDO_TIME_H__
3 
4 /*============================================================================
5  * Routines to handle common features related to the time scheme when using
6  * CDO schemes
7  *============================================================================*/
8 
9 /*
10  This file is part of Code_Saturne, a general-purpose CFD tool.
11 
12  Copyright (C) 1998-2018 EDF S.A.
13 
14  This program is free software; you can redistribute it and/or modify it under
15  the terms of the GNU General Public License as published by the Free Software
16  Foundation; either version 2 of the License, or (at your option) any later
17  version.
18 
19  This program is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22  details.
23 
24  You should have received a copy of the GNU General Public License along with
25  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
26  Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 */
28 
29 /*----------------------------------------------------------------------------*/
30 
31 /*----------------------------------------------------------------------------
32  * Local headers
33  *----------------------------------------------------------------------------*/
34 
35 #include "cs_base.h"
36 #include "cs_cdo_local.h"
37 #include "cs_equation_param.h"
38 
39 /*----------------------------------------------------------------------------*/
40 
42 
43 /*============================================================================
44  * Macro definitions
45  *============================================================================*/
46 
47 /*============================================================================
48  * Type definitions
49  *============================================================================*/
50 
51 /*----------------------------------------------------------------------------*/
62 /*----------------------------------------------------------------------------*/
63 
64 typedef void
66  const double tpty_val,
67  const cs_sdm_t *mass_mat,
68  const cs_flag_t system_flag,
70  cs_cell_sys_t *csys);
71 
72 /*============================================================================
73  * Global variables
74  *============================================================================*/
75 
76 /*============================================================================
77  * Public function prototypes
78  *============================================================================*/
79 
80 /*----------------------------------------------------------------------------*/
90 /*----------------------------------------------------------------------------*/
91 
94  const cs_equation_param_t *eqp);
95 
96 /*----------------------------------------------------------------------------*/
110 /*----------------------------------------------------------------------------*/
111 
112 void
114  int stride,
115  cs_lnum_t n_dofs,
116  const cs_lnum_t *dof_ids,
117  const cs_real_t *values,
118  cs_real_t *rhs);
119 
120 /*----------------------------------------------------------------------------*/
133 /*----------------------------------------------------------------------------*/
134 
135 void
137  const double tpty_val,
138  const cs_sdm_t *mass_mat,
139  const cs_flag_t system_flag,
140  cs_cell_builder_t *cb,
141  cs_cell_sys_t *csys);
142 
143 /*----------------------------------------------------------------------------*/
155 /*----------------------------------------------------------------------------*/
156 
157 void
159  const double tpty_val,
160  const cs_sdm_t *mass_mat,
161  const cs_flag_t system_flag,
162  cs_cell_builder_t *cb,
163  cs_cell_sys_t *csys);
164 
165 /*----------------------------------------------------------------------------*/
178 /*----------------------------------------------------------------------------*/
179 
180 void
182  const double tpty_val,
183  const cs_sdm_t *mass_mat,
184  const cs_flag_t system_flag,
185  cs_cell_builder_t *cb,
186  cs_cell_sys_t *csys);
187 
188 /*----------------------------------------------------------------------------*/
200 /*----------------------------------------------------------------------------*/
201 
202 void
204  const double tpty_val,
205  const cs_sdm_t *mass_mat,
206  const cs_flag_t system_flag,
207  cs_cell_builder_t *cb,
208  cs_cell_sys_t *csys);
209 
210 /*----------------------------------------------------------------------------*/
223 /*----------------------------------------------------------------------------*/
224 
225 void
227  const double tpty_val,
228  const cs_sdm_t *mass_mat,
229  const cs_flag_t system_flag,
230  cs_cell_builder_t *cb,
231  cs_cell_sys_t *csys);
232 
233 /*----------------------------------------------------------------------------*/
245 /*----------------------------------------------------------------------------*/
246 
247 void
249  const double tpty_val,
250  const cs_sdm_t *mass_mat,
251  const cs_flag_t system_flag,
252  cs_cell_builder_t *cb,
253  cs_cell_sys_t *csys);
254 
255 /*----------------------------------------------------------------------------*/
256 
258 
259 #endif /* __CS_CDO_TIME_H__ */
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources...
Definition: cs_equation_param.h:150
#define BEGIN_C_DECLS
Definition: cs_defs.h:461
void cs_cdo_time_diag_theta(const cs_equation_param_t *eqp, const double tpty_val, const cs_sdm_t *mass_mat, const cs_flag_t system_flag, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Apply to the local system a "theta" time discretization when a CDO scheme is used and the mass matrix...
Definition: cs_cdo_time.c:480
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
Definition: cs_cdo_local.h:94
void cs_cdo_time_diag_imp(const cs_equation_param_t *eqp, const double tpty_val, const cs_sdm_t *mass_mat, const cs_flag_t system_flag, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Apply to the local system an implicit time discretization when a CDO scheme is used and the mass matr...
Definition: cs_cdo_time.c:238
cs_cdo_time_scheme_t * cs_cdo_time_get_scheme_function(const cs_flag_t sys_flag, const cs_equation_param_t *eqp)
Retrieve a pointer to the associated cs_matrix_structure_t according to the space scheme...
Definition: cs_cdo_time.c:85
void cs_cdo_time_exp(const cs_equation_param_t *eqp, const double tpty_val, const cs_sdm_t *mass_mat, const cs_flag_t system_flag, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Apply to the local system an explicit time discretization when a CDO scheme is used.
Definition: cs_cdo_time.c:419
Definition: cs_cdo_local.h:71
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
void cs_cdo_time_diag_exp(const cs_equation_param_t *eqp, const double tpty_val, const cs_sdm_t *mass_mat, const cs_flag_t system_flag, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Apply to the local system an explicit time discretization when a CDO scheme is used and the mass matr...
Definition: cs_cdo_time.c:358
#define END_C_DECLS
Definition: cs_defs.h:462
unsigned short int cs_flag_t
Definition: cs_defs.h:299
void cs_cdo_time_imp(const cs_equation_param_t *eqp, const double tpty_val, const cs_sdm_t *mass_mat, const cs_flag_t system_flag, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Apply to the local system an implicit time discretization when a CDO scheme is used.
Definition: cs_cdo_time.c:294
void cs_cdo_time_update_rhs(const cs_equation_param_t *eqp, int stride, cs_lnum_t n_dofs, const cs_lnum_t *dof_ids, const cs_real_t *values, cs_real_t *rhs)
Update the RHS with the previously computed array of values (for instance the previous source term ev...
Definition: cs_cdo_time.c:141
void cs_cdo_time_theta(const cs_equation_param_t *eqp, const double tpty_val, const cs_sdm_t *mass_mat, const cs_flag_t system_flag, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Apply to the local system a "theta" time discretization when a CDO scheme is used.
Definition: cs_cdo_time.c:552
Structure and routines handling the specific settings related to a cs_equation_t structure.
void() cs_cdo_time_scheme_t(const cs_equation_param_t *eqp, const double tpty_val, const cs_sdm_t *mass_mat, const cs_flag_t system_flag, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Apply the time discretization to a local system.
Definition: cs_cdo_time.h:65