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-2018 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_cdo_connect.h"
38 #include "cs_cdo_local.h"
39 #include "cs_cdo_quantities.h"
40 #include "cs_param.h"
41 #include "cs_property.h"
42 
43 /*----------------------------------------------------------------------------*/
44 
46 
47 /*============================================================================
48  * Macro and type definitions
49  *============================================================================*/
50 
51 /*----------------------------------------------------------------------------*/
60 /*----------------------------------------------------------------------------*/
61 
62 typedef void
64  const cs_cell_mesh_t *cm,
65  cs_cell_builder_t *cb);
66 
67 /*============================================================================
68  * Public function definitions
69  *============================================================================*/
70 
71 /*----------------------------------------------------------------------------*/
80 /*----------------------------------------------------------------------------*/
81 
82 void
84  const cs_cell_mesh_t *cm,
85  cs_cell_builder_t *cb);
86 
87 /*----------------------------------------------------------------------------*/
96 /*----------------------------------------------------------------------------*/
97 
98 void
100  const cs_cell_mesh_t *cm,
101  cs_cell_builder_t *cb);
102 
103 /*----------------------------------------------------------------------------*/
112 /*----------------------------------------------------------------------------*/
113 
114 void
116  const cs_cell_mesh_t *cm,
117  cs_cell_builder_t *cb);
118 
119 /*----------------------------------------------------------------------------*/
129 /*----------------------------------------------------------------------------*/
130 
131 void
133  const cs_cell_mesh_t *cm,
134  cs_cell_builder_t *cb);
135 
136 /*----------------------------------------------------------------------------*/
145 /*----------------------------------------------------------------------------*/
146 
147 void
149  const cs_cell_mesh_t *cm,
150  cs_cell_builder_t *cb);
151 
152 /*----------------------------------------------------------------------------*/
162 /*----------------------------------------------------------------------------*/
163 
164 void
166  const cs_cell_mesh_t *cm,
167  cs_cell_builder_t *cb);
168 
169 /*----------------------------------------------------------------------------*/
179 /*----------------------------------------------------------------------------*/
180 
181 void
183  const cs_cell_mesh_t *cm,
184  cs_cell_builder_t *cb);
185 
186 /*----------------------------------------------------------------------------*/
196 /*----------------------------------------------------------------------------*/
197 
198 void
200  const cs_cell_mesh_t *cm,
201  cs_cell_builder_t *cb);
202 
203 /*----------------------------------------------------------------------------*/
213 /*----------------------------------------------------------------------------*/
214 
215 void
217  const cs_cell_mesh_t *cm,
218  cs_cell_builder_t *cb);
219 
220 /*----------------------------------------------------------------------------*/
232 /*----------------------------------------------------------------------------*/
233 
234 void
235 cs_hodge_matvec(const cs_cdo_connect_t *connect,
236  const cs_cdo_quantities_t *quant,
237  const cs_param_hodge_t h_info,
238  const cs_property_t *pty,
239  const double in_vals[],
240  double result[]);
241 
242 /*----------------------------------------------------------------------------*/
251 /*----------------------------------------------------------------------------*/
252 
253 void
255  cs_locmat_t *hf);
256 
257 /*----------------------------------------------------------------------------*/
258 
260 
261 #endif /* __CS_HODGE_H__ */
void cs_hodge_vb_voro_get_stiffness(const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Build a local stiffness matrix using the Voronoi algorithm The computed matrix is stored in cb->loc...
Definition: cs_hodge.c:484
void cs_hodge_vpcd_voro_get(const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from primal vertices to d...
Definition: cs_hodge.c:1084
#define BEGIN_C_DECLS
Definition: cs_defs.h:451
void cs_hodge_compute_wbs_surfacic(const cs_face_mesh_t *fm, cs_locmat_t *hf)
Compute the hodge operator related to a face (i.e. a mass matrix with unity property) using a Whitney...
Definition: cs_hodge.c:1483
Definition: cs_cdo_local.h:132
void cs_hodge_vb_cost_get_stiffness(const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic COST algo. The computed matrix is stored in cb->loc...
Definition: cs_hodge.c:302
Definition: cs_cdo_connect.h:56
Definition: cs_cdo_quantities.h:102
void cs_hodge_epfd_voro_get(const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using VORONOI algo. Hodge op. from primal edges to dual...
Definition: cs_hodge.c:1130
Definition: cs_field_pointer.h:121
void cs_hodge_vpcd_wbs_get(const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using WBS algo. Hodge op. from primal vertices to dual ...
Definition: cs_hodge.c:976
void cs_hodge_vb_wbs_get_stiffness(const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic WBS algo. WBS standing for Whitney Barycentric Subdi...
Definition: cs_hodge.c:578
void cs_hodge_vcb_get_stiffness(const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Build a local stiffness matrix using the generic WBS algo. WBS standing for Whitney Barycentric Subdi...
Definition: cs_hodge.c:712
void cs_hodge_vcb_wbs_get(const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using the WBS algo. This function is specific for verte...
Definition: cs_hodge.c:858
Definition: cs_cdo_local.h:67
void cs_hodge_epfd_cost_get(const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Build a local Hodge operator for a given cell using the COST algo. Hodge op. from primal edges to dua...
Definition: cs_hodge.c:1190
void() cs_hodge_t(const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Build a local operator for a given cell (stored in cb->hdg for a discrete Hodge operator or in cb->lo...
Definition: cs_hodge.h:63
#define END_C_DECLS
Definition: cs_defs.h:452
Definition: cs_cdo_local.h:188
void cs_hodge_matvec(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_param_hodge_t h_info, const cs_property_t *pty, const double in_vals[], double result[])
Compute cellwise a discrete hodge operator and multiple it with a vector.
Definition: cs_hodge.c:1270
Definition: cs_param.h:156
Definition: cs_property.h:66
Definition: cs_cdo_toolbox.h:63