programmer's documentation
cs_cdovb_scaleq.h
Go to the documentation of this file.
1 #ifndef __CS_CDOVB_SCALEQ_H__
2 #define __CS_CDOVB_SCALEQ_H__
3 
4 /*============================================================================
5  * Build an algebraic CDO vertex-based system for scalar conv./diff. eq.
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2015 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_base.h"
33 #include "cs_time_step.h"
34 #include "cs_mesh.h"
35 #include "cs_field.h"
36 #include "cs_cdo_connect.h"
37 #include "cs_cdo_quantities.h"
38 #include "cs_equation_priv.h"
39 
40 /*----------------------------------------------------------------------------*/
41 
43 
44 /*============================================================================
45  * Macro definitions
46  *============================================================================*/
47 
48 /*============================================================================
49  * Type definitions
50  *============================================================================*/
51 
52 /* Algebraic system for CDO vertex-based discretization */
53 typedef struct _cs_cdovb_scaleq_t cs_cdovb_scaleq_t;
54 
55 /*============================================================================
56  * Public function prototypes
57  *============================================================================*/
58 
59 /*----------------------------------------------------------------------------*/
65 /*----------------------------------------------------------------------------*/
66 
67 void
69 
70 /*----------------------------------------------------------------------------*/
74 /*----------------------------------------------------------------------------*/
75 
76 void
78 
79 /*----------------------------------------------------------------------------*/
86 /*----------------------------------------------------------------------------*/
87 
88 cs_real_t *
90 
91 /*----------------------------------------------------------------------------*/
103 /*----------------------------------------------------------------------------*/
104 
105 void *
107  const cs_mesh_t *mesh,
108  const cs_cdo_connect_t *connect,
109  const cs_cdo_quantities_t *quant,
110  const cs_time_step_t *time_step);
111 
112 /*----------------------------------------------------------------------------*/
120 /*----------------------------------------------------------------------------*/
121 
122 void *
123 cs_cdovb_scaleq_free(void *builder);
124 
125 /*----------------------------------------------------------------------------*/
131 /*----------------------------------------------------------------------------*/
132 
133 void
134 cs_cdovb_scaleq_compute_source(void *builder);
135 
136 /*----------------------------------------------------------------------------*/
149 /*----------------------------------------------------------------------------*/
150 
151 void
153  const cs_real_t *field_val,
154  double dt_cur,
155  void *builder,
156  cs_real_t **rhs,
157  cs_sla_matrix_t **sla_mat);
158 
159 /*----------------------------------------------------------------------------*/
168 /*----------------------------------------------------------------------------*/
169 
170 void
172  void *builder,
173  cs_real_t *field_val);
174 
175 /*----------------------------------------------------------------------------*/
183 /*----------------------------------------------------------------------------*/
184 
185 void
186 cs_cdovb_scaleq_post(const char *eqname,
187  const cs_field_t *field,
188  void *builder);
189 
190 /*----------------------------------------------------------------------------*/
191 
193 
194 #endif /* __CS_CDOVB_SCALEQ_H__ */
void cs_cdovb_scaleq_free_buffer(void)
Free work buffer related to cdo vertex-based schemes.
Definition: cs_cdovb_scaleq.c:879
time step descriptor
Definition: cs_time_step.h:51
Field descriptor.
Definition: cs_field.h:99
Definition: cs_equation_priv.h:100
#define BEGIN_C_DECLS
Definition: cs_defs.h:429
Definition: cs_cdo_connect.h:67
Definition: field.f90:27
void cs_cdovb_scaleq_init_buffer(const cs_cdo_connect_t *connect)
Allocate work buffer related to cdo vertex-based schemes.
Definition: cs_cdovb_scaleq.c:859
void * cs_cdovb_scaleq_free(void *builder)
Destroy a cs_cdovb_scaleq_t structure.
Definition: cs_cdovb_scaleq.c:1075
Definition: cs_cdo_quantities.h:86
Definition: cs_sla.h:86
Definition: cs_mesh.h:62
void cs_cdovb_scaleq_post(const char *eqname, const cs_field_t *field, void *builder)
Post-processing related to this equation.
Definition: cs_cdovb_scaleq.c:1523
void cs_cdovb_scaleq_build_system(const cs_mesh_t *mesh, const cs_real_t *field_val, double dt_cur, void *builder, cs_real_t **rhs, cs_sla_matrix_t **sla_mat)
Build the linear system arising from a scalar convection/diffusion equation with a CDO vertex-based s...
Definition: cs_cdovb_scaleq.c:1202
cs_real_t * cs_cdovb_scaleq_get_tmpbuf(void)
Retrieve a pointer to a temporary buffer related to scalar equations discretized with CDO vertex-base...
Definition: cs_cdovb_scaleq.c:898
void cs_cdovb_scaleq_update_field(const cs_real_t *solu, void *builder, cs_real_t *field_val)
Post-process the solution of a scalar convection/diffusion equation solved with a CDO vertex-based sc...
Definition: cs_cdovb_scaleq.c:1482
#define END_C_DECLS
Definition: cs_defs.h:430
double cs_real_t
Definition: cs_defs.h:296
void cs_cdovb_scaleq_compute_source(void *builder)
Compute the contributions of source terms (store inside builder)
Definition: cs_cdovb_scaleq.c:1120
void * cs_cdovb_scaleq_init(const cs_equation_param_t *eqp, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step)
Initialize a cs_cdovb_scaleq_t structure.
Definition: cs_cdovb_scaleq.c:921
Definition: mesh.f90:26