|
programmer's documentation
|
#include "cs_defs.h"#include <math.h>#include <assert.h>#include "cs_cdo.h"#include "cs_quadrature.h"
Functions | |
| void | cs_quadrature_setup (void) |
| Compute constant weights for all quadratures used. More... | |
| 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 order 3. More... | |
| 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 order 5. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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). More... | |
| 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). More... | |
| const char * | cs_quadrature_get_type_name (const cs_quadra_type_t type) |
| Return th name associated to a type of quadrature. More... | |
Variables | |
| static const double | _quad_25ov48 = 25./48. |
| static const double | _quad_9ov16 = 9./16. |
| static const double | _quad_over18 = 1./18. |
| static const double | _quad_over6 = 1./6. |
| static const double | _quad_over3 = 1./3. |
| static const double | _quad_9ov40 = 9./40. |
| static const double | _quad_31ov240 = 31./240. |
| static double | _edge_quad2c1 |
| static double | _edge_quad2c2 |
| static double | _edge_quad3c1 |
| static double | _edge_quad3c2 |
| static double | _tria_quad7c1 |
| static double | _tria_quad7c2 |
| static double | _tria_quad7c3 |
| static double | _tria_quad7c4 |
| static double | _tetr_quad4c1 |
| static double | _tetr_quad4c2 |
| static const char | cs_quadrature_type_name [CS_QUADRATURE_N_TYPES][CS_CDO_LEN_NAME] |
| 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 order 3.
| [in] | v1 | first vertex |
| [in] | v2 | second vertex |
| [in] | len | length of edge [v1, v2] |
| [in,out] | gpts | gauss points |
| [in,out] | w | weight (same weight for the two points) |
| 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 order 5.
| [in] | v1 | first vertex |
| [in] | v2 | second vertex |
| [in] | len | length of edge [v1, v2] |
| [in,out] | gpts | gauss points |
| [in,out] | w | weights |
| const char* cs_quadrature_get_type_name | ( | const cs_quadra_type_t | type | ) |
Return th name associated to a type of quadrature.
| [in] | type | cs_quadra_type_t |
| void cs_quadrature_setup | ( | void | ) |
Compute constant weights for all quadratures used.
| 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).
| [in] | xv | |
| [in] | xe | |
| [in] | xf | |
| [in] | xc | |
| [in] | vol | volume of tetrahedron {xv, xe, xf, xc} |
| [in,out] | gpts | 4 Gauss points (size = 3*4) |
| [in,out] | w | weight (same value for all points) |
| 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).
| [in] | xv | |
| [in] | xe | |
| [in] | xf | |
| [in] | xc | |
| [in] | vol | volume of tetrahedron {xv, xe, xf, xc} |
| [in,out] | gpts | 5 Gauss points (size = 3*5) |
| [in,out] | weights | 5 weigths related to each Gauss point |
| 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.
| [in] | v1 | first vertex |
| [in] | v2 | second vertex |
| [in] | v3 | third vertex |
| [in] | area | area of triangle {v1, v2, v3} |
| [in,out] | gpts | gauss points |
| [in,out] | w | weight (same weight for the three points) |
| 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.
| [in] | v1 | first vertex |
| [in] | v2 | second vertex |
| [in] | v3 | third vertex |
| [in] | area | area of triangle {v1, v2, v3} |
| [in,out] | gpts | gauss points |
| [in,out] | w | weights |
| 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.
| [in] | v1 | first vertex |
| [in] | v2 | second vertex |
| [in] | v3 | third vertex |
| [in] | area | area of triangle {v1, v2, v3} |
| [in,out] | gpts | gauss points |
| [in,out] | w | weights |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
1.8.7