programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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-2017 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 #include "cs_equation_param.h"
39 
40 /*----------------------------------------------------------------------------*/
41 
43 
44 /*============================================================================
45  * Macro definitions
46  *============================================================================*/
47 
48 /*============================================================================
49  * Type definitions
50  *============================================================================*/
51 
52 /*----------------------------------------------------------------------------*/
63 /*----------------------------------------------------------------------------*/
64 
65 typedef void
67  const double tpty_val,
68  const cs_sdm_t *mass_mat,
69  const cs_flag_t system_flag,
71  cs_cell_sys_t *csys);
72 
73 /*============================================================================
74  * Global variables
75  *============================================================================*/
76 
77 /*============================================================================
78  * Public function prototypes
79  *============================================================================*/
80 
81 /*----------------------------------------------------------------------------*/
91 /*----------------------------------------------------------------------------*/
92 
95  const cs_equation_param_t *eqp);
96 
97 /*----------------------------------------------------------------------------*/
107 /*----------------------------------------------------------------------------*/
108 
109 void
111  const cs_lnum_t n_dofs,
112  const cs_real_t *values,
113  cs_real_t *rhs);
114 
115 /*----------------------------------------------------------------------------*/
128 /*----------------------------------------------------------------------------*/
129 
130 void
132  const double tpty_val,
133  const cs_sdm_t *mass_mat,
134  const cs_flag_t system_flag,
135  cs_cell_builder_t *cb,
136  cs_cell_sys_t *csys);
137 
138 /*----------------------------------------------------------------------------*/
150 /*----------------------------------------------------------------------------*/
151 
152 void
154  const double tpty_val,
155  const cs_sdm_t *mass_mat,
156  const cs_flag_t system_flag,
157  cs_cell_builder_t *cb,
158  cs_cell_sys_t *csys);
159 
160 /*----------------------------------------------------------------------------*/
173 /*----------------------------------------------------------------------------*/
174 
175 void
177  const double tpty_val,
178  const cs_sdm_t *mass_mat,
179  const cs_flag_t system_flag,
180  cs_cell_builder_t *cb,
181  cs_cell_sys_t *csys);
182 
183 /*----------------------------------------------------------------------------*/
195 /*----------------------------------------------------------------------------*/
196 
197 void
199  const double tpty_val,
200  const cs_sdm_t *mass_mat,
201  const cs_flag_t system_flag,
202  cs_cell_builder_t *cb,
203  cs_cell_sys_t *csys);
204 
205 /*----------------------------------------------------------------------------*/
218 /*----------------------------------------------------------------------------*/
219 
220 void
222  const double tpty_val,
223  const cs_sdm_t *mass_mat,
224  const cs_flag_t system_flag,
225  cs_cell_builder_t *cb,
226  cs_cell_sys_t *csys);
227 
228 /*----------------------------------------------------------------------------*/
240 /*----------------------------------------------------------------------------*/
241 
242 void
244  const double tpty_val,
245  const cs_sdm_t *mass_mat,
246  const cs_flag_t system_flag,
247  cs_cell_builder_t *cb,
248  cs_cell_sys_t *csys);
249 
250 /*----------------------------------------------------------------------------*/
251 
253 
254 #endif /* __CS_CDO_TIME_H__ */
Definition: cs_equation_param.h:101
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:66
#define BEGIN_C_DECLS
Definition: cs_defs.h:453
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:429
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:187
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:368
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:307
#define END_C_DECLS
Definition: cs_defs.h:454
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:243
void cs_cdo_time_update_rhs_with_array(const cs_equation_param_t *eqp, 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:137
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:501