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-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  * Standard C library headers
30  *----------------------------------------------------------------------------*/
31 
32 /*----------------------------------------------------------------------------
33  * Local headers
34  *----------------------------------------------------------------------------*/
35 
36 #include "cs_base.h"
37 
38 #include "cs_cdo_toolbox.h"
39 #include "cs_cdo_connect.h"
40 #include "cs_cdo_quantities.h"
41 #include "cs_param.h"
42 #include "cs_sla.h"
43 
44 /*----------------------------------------------------------------------------*/
45 
47 
48 /*============================================================================
49  * Macro and type definitions
50  *============================================================================*/
51 
52 typedef struct _hodge_builder_t cs_hodge_builder_t;
53 
54 /*============================================================================
55  * Public function definitions
56  *============================================================================*/
57 
58 /*----------------------------------------------------------------------------*/
68 /*----------------------------------------------------------------------------*/
69 
70 int
71 cs_hodge_add(const cs_cdo_connect_t *connect,
72  const cs_cdo_quantities_t *quant,
73  cs_param_hodge_t param);
74 
75 /*----------------------------------------------------------------------------*/
86 /*----------------------------------------------------------------------------*/
87 
90  const cs_cdo_quantities_t *quant,
91  const cs_param_hodge_type_t type);
92 
93 /*----------------------------------------------------------------------------*/
101 /*----------------------------------------------------------------------------*/
102 
104 cs_hodge_builder_init(int n_max_ent);
105 
106 /*----------------------------------------------------------------------------*/
114 /*----------------------------------------------------------------------------*/
115 
118 
119 /*----------------------------------------------------------------------------*/
130 /*----------------------------------------------------------------------------*/
131 
132 void
134  const cs_cdo_connect_t *connect,
135  const cs_cdo_quantities_t *quant,
136  const cs_param_hodge_t h_info,
138  cs_hodge_builder_t *hb);
139 
140 /*----------------------------------------------------------------------------*/
153 /*----------------------------------------------------------------------------*/
154 
157  const cs_cdo_quantities_t *quant,
158  const cs_param_hodge_t h_info);
159 
160 /*----------------------------------------------------------------------------*/
172 /*----------------------------------------------------------------------------*/
173 
176  const cs_cdo_quantities_t *quant,
177  const cs_param_hodge_t h_info);
178 
179 /*----------------------------------------------------------------------------*/
180 
182 
183 #endif /* __CS_HODGE_H__ */
184 
cs_hodge_builder_t * cs_hodge_builder_free(cs_hodge_builder_t *hcq)
Free a cs_hodge_builder_t structure.
Definition: cs_hodge.c:765
#define BEGIN_C_DECLS
Definition: cs_defs.h:419
cs_sla_matrix_t * cs_hodge_cost_build(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_param_hodge_t h_info)
Build a discrete Hodge operator using a generic reconstruction algorithm: Reconstruction with Consist...
Definition: cs_hodge.c:892
Definition: cs_cdo_connect.h:86
cs_sla_matrix_t * cs_hodge_init_matrix(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_param_hodge_type_t type)
Allocate and initialize by default the matrix related to a discrete Hodge operator.
Definition: cs_hodge.c:676
Definition: cs_cdo_quantities.h:94
Definition: cs_sla.h:87
struct _hodge_builder_t cs_hodge_builder_t
Definition: cs_hodge.h:52
cs_hodge_builder_t * cs_hodge_builder_init(int n_max_ent)
Allocate and initialize a cs_hodge_builder_t structure.
Definition: cs_hodge.c:717
Definition: cs_cdo_toolbox.h:72
cs_param_hodge_type_t
Definition: cs_param.h:141
cs_sla_matrix_t * cs_hodge_voronoi_build(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_param_hodge_t h_info)
H is an operator from primal edges to dual faces. It mimics a Hodge operator from primal mesh to dual...
Definition: cs_hodge.c:957
#define END_C_DECLS
Definition: cs_defs.h:420
Definition: cs_param.h:161
void cs_hodge_cost_build_local(int cid, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_param_hodge_t h_info, cs_toolbox_locmat_t *hl, cs_hodge_builder_t *hb)
Build a local discrete Hodge operator using the generic COST algo.
Definition: cs_hodge.c:795
int cs_hodge_add(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_param_hodge_t param)
Add or associate a discrete Hodge operator to a given setting.