programmer's documentation
cs_quadrature.h
Go to the documentation of this file.
1 #ifndef __CS_QUADRATURE_H__
2 #define __CS_QUADRATURE_H__
3 
4 /*============================================================================
5  * Routines to handle quadrature rules
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 
31 
32 /*============================================================================
33  * Macro definitions
34  *============================================================================*/
35 
36 /*============================================================================
37  * Type definitions
38  *============================================================================*/
39 
40 typedef enum {
41 
43  CS_QUADRATURE_BARY, /* Value at the barycenter * meas */
44  CS_QUADRATURE_HIGHER, /* Unique weight but several Gauss points */
45  CS_QUADRATURE_HIGHEST, /* Specific weight for each Gauss points */
47 
49 
50 /*============================================================================
51  * Public function prototypes
52  *============================================================================*/
53 
54 /*----------------------------------------------------------------------------*/
58 /*----------------------------------------------------------------------------*/
59 
60 void
62 
63 /*----------------------------------------------------------------------------*/
74 /*----------------------------------------------------------------------------*/
75 
76 void
78  const cs_real_3_t v2,
79  double len,
80  cs_real_3_t gpts[],
81  double *w);
82 
83 /*----------------------------------------------------------------------------*/
94 /*----------------------------------------------------------------------------*/
95 
96 void
98  const cs_real_3_t v2,
99  double len,
100  cs_real_3_t gpts[],
101  double w[]);
102 
103 /*----------------------------------------------------------------------------*/
115 /*----------------------------------------------------------------------------*/
116 
117 void
119  const cs_real_3_t v2,
120  const cs_real_3_t v3,
121  double area,
122  cs_real_3_t gpts[],
123  double *w);
124 
125 /*----------------------------------------------------------------------------*/
137 /*----------------------------------------------------------------------------*/
138 
139 void
141  const cs_real_3_t v2,
142  const cs_real_3_t v3,
143  double area,
144  cs_real_3_t gpts[],
145  double w[]);
146 
147 /*----------------------------------------------------------------------------*/
159 /*----------------------------------------------------------------------------*/
160 
161 void
163  const cs_real_3_t v2,
164  const cs_real_3_t v3,
165  double area,
166  cs_real_3_t gpts[],
167  double w[]);
168 
169 /*----------------------------------------------------------------------------*/
182 /*----------------------------------------------------------------------------*/
183 
184 void
186  const cs_real_3_t xe,
187  const cs_real_3_t xf,
188  const cs_real_3_t xc,
189  double vol,
190  cs_real_3_t gpts[],
191  double *w);
192 
193 /*----------------------------------------------------------------------------*/
206 /*----------------------------------------------------------------------------*/
207 
208 void
210  const cs_real_3_t xe,
211  const cs_real_3_t xf,
212  const cs_real_3_t xc,
213  double vol,
214  cs_real_3_t gpts[],
215  double weights[]);
216 
217 /*----------------------------------------------------------------------------*/
225 /*----------------------------------------------------------------------------*/
226 
227 const char *
229 
230 /*----------------------------------------------------------------------------*/
231 
233 
234 #endif /* __CS_QUADRATURE_H__ */
Definition: cs_quadrature.h:45
size_t len
Definition: mei_scanner.c:615
#define BEGIN_C_DECLS
Definition: cs_defs.h:429
void cs_quadrature_edge_3pts(const cs_real_3_t v1, const cs_real_3_t v2, double len, cs_real_3_t gpts[], double w[])
Compute quadrature points for an edge from v1 -> v2 (3 points) Exact for polynomial function up to or...
Definition: cs_quadrature.c:165
void cs_quadrature_edge_2pts(const cs_real_3_t v1, const cs_real_3_t v2, double len, cs_real_3_t gpts[], double *w)
Compute quadrature points for an edge from v1 -> v2 (2 points) Exact for polynomial function up to or...
Definition: cs_quadrature.c:133
Definition: cs_quadrature.h:46
Definition: cs_quadrature.h:44
void cs_quadrature_tria_3pts(const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_real_3_t gpts[], double *w)
Compute quadrature points for a triangle (3 points) Exact for polynomial function up to order 2...
Definition: cs_quadrature.c:201
Definition: cs_quadrature.h:43
void cs_quadrature_tria_4pts(const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_real_3_t gpts[], double w[])
Compute quadrature points for a triangle (4 points) Exact for polynomial function up to order 3...
Definition: cs_quadrature.c:236
void cs_quadrature_setup(void)
Compute constant weights for all quadratures used.
Definition: cs_quadrature.c:98
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:307
void cs_quadrature_tria_7pts(const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_real_3_t gpts[], double w[])
Compute quadrature points for a triangle (7 points) Exact for polynomial function up to order 5...
Definition: cs_quadrature.c:273
cs_quadra_type_t
Definition: cs_quadrature.h:40
Definition: cs_quadrature.h:42
#define END_C_DECLS
Definition: cs_defs.h:430
const char * cs_quadrature_get_type_name(const cs_quadra_type_t type)
Return th name associated to a type of quadrature.
Definition: cs_quadrature.c:393
void cs_quadrature_tet_4pts(const cs_real_3_t xv, const cs_real_3_t xe, const cs_real_3_t xf, const cs_real_3_t xc, double vol, cs_real_3_t gpts[], double *w)
Compute the quadrature in a tetrehedra. Exact for 2nd order polynomials (order 3).
Definition: cs_quadrature.c:316
void cs_quadrature_tet_5pts(const cs_real_3_t xv, const cs_real_3_t xe, const cs_real_3_t xf, const cs_real_3_t xc, double vol, cs_real_3_t gpts[], double weights[])
Compute the quadrature in a tetrehedra. Exact for 3rd order polynomials (order 4).
Definition: cs_quadrature.c:354