My Project
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-2019 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 /*----------------------------------------------------------------------------*/
109 /*----------------------------------------------------------------------------*/
110 
111 void
113  int stride,
114  cs_lnum_t n_dofs,
115  const cs_lnum_t *dof_ids,
116  const cs_real_t *values,
117  cs_real_t *rhs);
118 
119 /*----------------------------------------------------------------------------*/
132 /*----------------------------------------------------------------------------*/
133 
134 void
136  const double tpty_val,
137  const cs_sdm_t *mass_mat,
138  const cs_flag_t system_flag,
139  cs_cell_builder_t *cb,
140  cs_cell_sys_t *csys);
141 
142 /*----------------------------------------------------------------------------*/
154 /*----------------------------------------------------------------------------*/
155 
156 void
158  const double tpty_val,
159  const cs_sdm_t *mass_mat,
160  const cs_flag_t system_flag,
161  cs_cell_builder_t *cb,
162  cs_cell_sys_t *csys);
163 
164 /*----------------------------------------------------------------------------*/
177 /*----------------------------------------------------------------------------*/
178 
179 void
181  const double tpty_val,
182  const cs_sdm_t *mass_mat,
183  const cs_flag_t system_flag,
184  cs_cell_builder_t *cb,
185  cs_cell_sys_t *csys);
186 
187 /*----------------------------------------------------------------------------*/
199 /*----------------------------------------------------------------------------*/
200 
201 void
203  const double tpty_val,
204  const cs_sdm_t *mass_mat,
205  const cs_flag_t system_flag,
206  cs_cell_builder_t *cb,
207  cs_cell_sys_t *csys);
208 
209 /*----------------------------------------------------------------------------*/
222 /*----------------------------------------------------------------------------*/
223 
224 void
226  const double tpty_val,
227  const cs_sdm_t *mass_mat,
228  const cs_flag_t system_flag,
229  cs_cell_builder_t *cb,
230  cs_cell_sys_t *csys);
231 
232 /*----------------------------------------------------------------------------*/
244 /*----------------------------------------------------------------------------*/
245 
246 void
248  const double tpty_val,
249  const cs_sdm_t *mass_mat,
250  const cs_flag_t system_flag,
251  cs_cell_builder_t *cb,
252  cs_cell_sys_t *csys);
253 
254 /*----------------------------------------------------------------------------*/
255 
257 
258 #endif /* __CS_CDO_TIME_H__ */
cs_cdo_time_theta
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:536
cs_cdo_time_scheme_t
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
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_cdo_time_diag_imp
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:237
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
cs_cdo_time_diag_theta
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:468
cs_cdo_time_get_scheme_function
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
stride
void const cs_int_t const cs_int_t const cs_int_t const cs_int_t * stride
Definition: cs_sat_coupling.h:325
cs_equation_param_t
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:148
cs_cdo_time_exp
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:407
cs_cdo_time_imp
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:288
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_cell_builder_t
Set of local and temporary buffers useful for building the algebraic system with a cellwise process....
Definition: cs_cdo_local.h:56
cs_cdo_time_update_rhs
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 Do not use OpenMP inside this function si...
Definition: cs_cdo_time.c:140
cs_flag_t
unsigned short int cs_flag_t
Definition: cs_defs.h:304
cs_equation_param.h
Structure and routines handling the specific settings related to a cs_equation_t structure.
cs_cell_sys_t
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:93
cs_cdo_time_diag_exp
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:346
cs_base.h
cs_cdo_local.h