programmer's documentation
cs_hodge.h
Go to the documentation of this file.
1 #ifndef __CS_HODGE_H__
2 #define __CS_HODGE_H__
3 
4 /*============================================================================
5  * Build discrete Hodge operators
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2016 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  * Standard C library headers
30  *----------------------------------------------------------------------------*/
31 
32 /*----------------------------------------------------------------------------
33  * Local headers
34  *----------------------------------------------------------------------------*/
35 
36 #include "cs_base.h"
37 #include "cs_time_step.h"
38 #include "cs_sla.h"
39 #include "cs_cdo_connect.h"
40 #include "cs_cdo_local.h"
41 #include "cs_cdo_quantities.h"
42 #include "cs_param.h"
43 #include "cs_property.h"
44 
45 /*----------------------------------------------------------------------------*/
46 
48 
49 /*============================================================================
50  * Macro and type definitions
51  *============================================================================*/
52 
53 typedef struct _hodge_builder_t cs_hodge_builder_t;
54 
55 /*============================================================================
56  * Public function definitions
57  *============================================================================*/
58 
59 /*----------------------------------------------------------------------------*/
65 /*----------------------------------------------------------------------------*/
66 
67 void
68 cs_hodge_set_timer_stats(int level);
69 
70 /*----------------------------------------------------------------------------*/
80 /*----------------------------------------------------------------------------*/
81 
84  cs_param_hodge_t h_info);
85 
86 /*----------------------------------------------------------------------------*/
94 /*----------------------------------------------------------------------------*/
95 
98 
99 /*----------------------------------------------------------------------------*/
107 /*----------------------------------------------------------------------------*/
108 
109 bool
111 
112 /*----------------------------------------------------------------------------*/
118 /*----------------------------------------------------------------------------*/
119 
120 void
122 
123 /*----------------------------------------------------------------------------*/
130 /*----------------------------------------------------------------------------*/
131 
132 void
134  cs_real_t ptyval);
135 
136 /*----------------------------------------------------------------------------*/
143 /*----------------------------------------------------------------------------*/
144 
145 void
147  const cs_real_33_t ptymat);
148 
149 /*----------------------------------------------------------------------------*/
159 /*----------------------------------------------------------------------------*/
160 
161 void
163  cs_hodge_builder_t *hb,
164  cs_locmat_t *sloc);
165 
166 /*----------------------------------------------------------------------------*/
175 /*----------------------------------------------------------------------------*/
176 
177 cs_locmat_t *
179  cs_hodge_builder_t *hb);
180 
181 /*----------------------------------------------------------------------------*/
192 /*----------------------------------------------------------------------------*/
193 
194 cs_locmat_t *
195 cs_hodge_build_local(int c_id,
196  const cs_cdo_connect_t *connect,
197  const cs_cdo_quantities_t *quant,
198  cs_hodge_builder_t *hb);
199 
200 /*----------------------------------------------------------------------------*/
211 /*----------------------------------------------------------------------------*/
212 
214 cs_hodge_compute(const cs_cdo_connect_t *connect,
215  const cs_cdo_quantities_t *quant,
216  const cs_property_t *pty,
217  const cs_param_hodge_t h_info);
218 
219 /*----------------------------------------------------------------------------*/
220 
222 
223 #endif /* __CS_HODGE_H__ */
224 
#define BEGIN_C_DECLS
Definition: cs_defs.h:448
cs_locmat_t * cs_hodge_build_local(int c_id, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_hodge_builder_t *hb)
Build a local discrete Hodge.
Definition: cs_hodge.c:1849
Definition: cs_cdo_local.h:73
bool cs_hodge_builder_get_setting_flag(cs_hodge_builder_t *hb)
Get the flag indicating the status of the property.
Definition: cs_hodge.c:1613
void cs_hodge_builder_set_tensor(cs_hodge_builder_t *hb, const cs_real_33_t ptymat)
Set the value of the property attached to a hodge builder.
Definition: cs_hodge.c:1668
Definition: cs_cdo_connect.h:67
double cs_real_t
Floating-point value.
Definition: cs_defs.h:296
Definition: cs_cdo_quantities.h:100
Definition: cs_sla.h:86
struct _hodge_builder_t cs_hodge_builder_t
Definition: cs_hodge.h:53
void cs_hodge_builder_unset(cs_hodge_builder_t *hb)
Set the flag indicating the status of the property to false.
Definition: cs_hodge.c:1630
void cs_hodge_set_timer_stats(int level)
Initialize cs_timer_stats_t structure for monitoring purpose.
Definition: cs_hodge.c:1451
cs_locmat_t * cs_hodge_build_cellwise(const cs_cell_mesh_t *lm, cs_hodge_builder_t *hb)
Build a local discrete Hodge using a cell-wise view of the mesh.
Definition: cs_hodge.c:1757
void cs_hodge_build_local_stiffness(const cs_cell_mesh_t *lm, cs_hodge_builder_t *hb, cs_locmat_t *sloc)
Build a local stiffness matrix from a local discrete Hodge H and the local discrete gradient and dive...
Definition: cs_hodge.c:1692
cs_hodge_builder_t * cs_hodge_builder_init(const cs_cdo_connect_t *connect, cs_param_hodge_t h_info)
Allocate and initialize a cs_hodge_builder_t structure.
Definition: cs_hodge.c:1478
#define END_C_DECLS
Definition: cs_defs.h:449
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:314
cs_hodge_builder_t * cs_hodge_builder_free(cs_hodge_builder_t *hb)
Free a cs_hodge_builder_t structure.
Definition: cs_hodge.c:1581
Definition: cs_param.h:143
void cs_hodge_builder_set_val(cs_hodge_builder_t *hb, cs_real_t ptyval)
Set the value of the property attached to a hodge builder.
Definition: cs_hodge.c:1648
Definition: cs_cdo_toolbox.h:71
cs_sla_matrix_t * cs_hodge_compute(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_property_t *pty, const cs_param_hodge_t h_info)
Build the full matrix related to a discrete Hodge operator.
Definition: cs_hodge.c:1938