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.h"
37 #include "cs_cdo_local.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_locmat_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_param_time_t t_info);
95 
96 /*----------------------------------------------------------------------------*/
107 /*----------------------------------------------------------------------------*/
108 
109 void
111  const cs_param_time_t t_info,
112  const cs_lnum_t n_dofs,
113  const cs_real_t *values,
114  cs_real_t *rhs);
115 
116 /*----------------------------------------------------------------------------*/
129 /*----------------------------------------------------------------------------*/
130 
131 void
133  const double tpty_val,
134  const cs_locmat_t *mass_mat,
135  const cs_flag_t system_flag,
136  cs_cell_builder_t *cb,
137  cs_cell_sys_t *csys);
138 
139 /*----------------------------------------------------------------------------*/
151 /*----------------------------------------------------------------------------*/
152 
153 void
154 cs_cdo_time_imp(const cs_param_time_t t_info,
155  const double tpty_val,
156  const cs_locmat_t *mass_mat,
157  const cs_flag_t system_flag,
158  cs_cell_builder_t *cb,
159  cs_cell_sys_t *csys);
160 
161 /*----------------------------------------------------------------------------*/
174 /*----------------------------------------------------------------------------*/
175 
176 void
178  const double tpty_val,
179  const cs_locmat_t *mass_mat,
180  const cs_flag_t system_flag,
181  cs_cell_builder_t *cb,
182  cs_cell_sys_t *csys);
183 
184 /*----------------------------------------------------------------------------*/
196 /*----------------------------------------------------------------------------*/
197 
198 void
199 cs_cdo_time_exp(const cs_param_time_t t_info,
200  const double tpty_val,
201  const cs_locmat_t *mass_mat,
202  const cs_flag_t system_flag,
203  cs_cell_builder_t *cb,
204  cs_cell_sys_t *csys);
205 
206 /*----------------------------------------------------------------------------*/
219 /*----------------------------------------------------------------------------*/
220 
221 void
223  const double tpty_val,
224  const cs_locmat_t *mass_mat,
225  const cs_flag_t system_flag,
226  cs_cell_builder_t *cb,
227  cs_cell_sys_t *csys);
228 
229 /*----------------------------------------------------------------------------*/
241 /*----------------------------------------------------------------------------*/
242 
243 void
245  const double tpty_val,
246  const cs_locmat_t *mass_mat,
247  const cs_flag_t system_flag,
248  cs_cell_builder_t *cb,
249  cs_cell_sys_t *csys);
250 
251 /*----------------------------------------------------------------------------*/
252 
254 
255 #endif /* __CS_CDO_TIME_H__ */
void cs_cdo_time_diag_imp(const cs_param_time_t t_info, const double tpty_val, const cs_locmat_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:189
void cs_cdo_time_exp(const cs_param_time_t t_info, const double tpty_val, const cs_locmat_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:370
#define BEGIN_C_DECLS
Definition: cs_defs.h:451
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
Definition: cs_cdo_local.h:90
void cs_cdo_time_update_rhs_with_array(const cs_flag_t sys_flag, const cs_param_time_t t_info, const cs_lnum_t n_dofs, const cs_real_t *values, cs_real_t *rhs)
Update the RHS with the previously computed array values (for instance the source term) ...
Definition: cs_cdo_time.c:138
void cs_cdo_time_diag_exp(const cs_param_time_t t_info, const double tpty_val, const cs_locmat_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:309
Definition: cs_param.h:184
void() cs_cdo_time_scheme_t(const cs_param_time_t t_info, const double tpty_val, const cs_locmat_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
Definition: cs_cdo_local.h:67
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
#define END_C_DECLS
Definition: cs_defs.h:452
unsigned short int cs_flag_t
Definition: cs_defs.h:299
void cs_cdo_time_imp(const cs_param_time_t t_info, const double tpty_val, const cs_locmat_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:245
void cs_cdo_time_theta(const cs_param_time_t t_info, const double tpty_val, const cs_locmat_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:503
Definition: cs_cdo_toolbox.h:63
void cs_cdo_time_diag_theta(const cs_param_time_t t_info, const double tpty_val, const cs_locmat_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:431
cs_cdo_time_scheme_t * cs_cdo_time_get_scheme_function(const cs_flag_t sys_flag, const cs_param_time_t t_info)
Retrieve a pointer to the associated cs_matrix_structure_t according to the space scheme...
Definition: cs_cdo_time.c:85