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 /*----------------------------------------------------------------------------*/
81 /*----------------------------------------------------------------------------*/
82 
83 void
85  const cs_cell_mesh_t *cm,
86  cs_cell_builder_t *cb);
87 
88 /*----------------------------------------------------------------------------*/
98 /*----------------------------------------------------------------------------*/
99 
100 void
102  const cs_cell_mesh_t *cm,
103  cs_cell_builder_t *cb);
104 
105 /*----------------------------------------------------------------------------*/
115 /*----------------------------------------------------------------------------*/
116 
117 void
119  const cs_cell_mesh_t *cm,
120  cs_cell_builder_t *cb);
121 
122 /*----------------------------------------------------------------------------*/
132 /*----------------------------------------------------------------------------*/
133 
134 void
136  const cs_cell_mesh_t *cm,
137  cs_cell_builder_t *cb);
138 
139 /*----------------------------------------------------------------------------*/
148 /*----------------------------------------------------------------------------*/
149 
150 void
152  const cs_cell_mesh_t *cm,
153  cs_cell_builder_t *cb);
154 
155 /*----------------------------------------------------------------------------*/
165 /*----------------------------------------------------------------------------*/
166 
167 void
169  const cs_cell_mesh_t *cm,
170  cs_cell_builder_t *cb);
171 
172 /*----------------------------------------------------------------------------*/
181 /*----------------------------------------------------------------------------*/
182 
183 void
185  const cs_cell_mesh_t *cm,
186  cs_cell_builder_t *cb);
187 
188 /*----------------------------------------------------------------------------*/
198 /*----------------------------------------------------------------------------*/
199 
200 void
202  const cs_cell_mesh_t *cm,
203  cs_cell_builder_t *cb);
204 
205 /*----------------------------------------------------------------------------*/
215 /*----------------------------------------------------------------------------*/
216 
217 void
219  const cs_cell_mesh_t *cm,
220  cs_cell_builder_t *cb);
221 
222 /*----------------------------------------------------------------------------*/
232 /*----------------------------------------------------------------------------*/
233 
234 void
236  const cs_cell_mesh_t *cm,
237  cs_cell_builder_t *cb);
238 
239 /*----------------------------------------------------------------------------*/
249 /*----------------------------------------------------------------------------*/
250 
251 void
253  const cs_cell_mesh_t *cm,
254  cs_cell_builder_t *cb);
255 
256 /*----------------------------------------------------------------------------*/
266 /*----------------------------------------------------------------------------*/
267 
268 void
270  const cs_cell_mesh_t *cm,
271  cs_cell_builder_t *cb);
272 
273 /*----------------------------------------------------------------------------*/
283 /*----------------------------------------------------------------------------*/
284 
285 void
287  const cs_cell_mesh_t *cm,
288  cs_cell_builder_t *cb);
289 
290 /*----------------------------------------------------------------------------*/
300 /*----------------------------------------------------------------------------*/
301 
302 void
304  const cs_cell_mesh_t *cm,
305  cs_cell_builder_t *cb);
306 
307 /*----------------------------------------------------------------------------*/
317 /*----------------------------------------------------------------------------*/
318 
319 void
321  const cs_cell_mesh_t *cm,
322  cs_cell_builder_t *cb);
323 
324 /*----------------------------------------------------------------------------*/
336 /*----------------------------------------------------------------------------*/
337 
338 void
339 cs_hodge_matvec(const cs_cdo_connect_t *connect,
340  const cs_cdo_quantities_t *quant,
341  const cs_param_hodge_t h_info,
342  const cs_property_t *pty,
343  const double in_vals[],
344  double result[]);
345 
346 /*----------------------------------------------------------------------------*/
355 /*----------------------------------------------------------------------------*/
356 
357 void
359  cs_sdm_t *hf);
360 
361 /*----------------------------------------------------------------------------*/
362 
364 
365 #endif /* __CS_HODGE_H__ */
void cs_hodge_compute_wbs_surfacic(const cs_face_mesh_t *fm, cs_sdm_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:2026
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 C...
Definition: cs_hodge.c:714
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:1313
#define BEGIN_C_DECLS
Definition: cs_defs.h:453
Definition: cs_cdo_local.h:138
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:533
Definition: cs_cdo_connect.h:55
void cs_hodge_fped_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 faces to dual...
Definition: cs_hodge.c:1502
Definition: cs_cdo_quantities.h:89
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:1360
void cs_hodge_edfp_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 dual edges to primal...
Definition: cs_hodge.c:1637
Definition: cs_field_pointer.h:123
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:1203
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:808
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:942
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:1087
Definition: cs_cdo_local.h:71
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:1421
void cs_hodge_edfp_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 dual edges to prima...
Definition: cs_hodge.c:1691
void cs_hodge_fb_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:407
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:454
void cs_hodge_fped_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 faces to dua...
Definition: cs_hodge.c:1556
Definition: cs_cdo_local.h:196
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:1774
void cs_hodge_fb_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 C...
Definition: cs_hodge.c:470
Definition: cs_param.h:76
Definition: cs_property.h:62