1#ifndef __CS_QUADRATURE_H__
2#define __CS_QUADRATURE_H__
309 gpts[0][0] = 0.5*(v1[0] + v2[0]);
310 gpts[0][1] = 0.5*(v1[1] + v2[1]);
311 gpts[0][2] = 0.5*(v1[2] + v2[2]);
449 gpts[0][0] = c_1ov3 * (v1[0] + v2[0] + v3[0]);
450 gpts[0][1] = c_1ov3 * (v1[1] + v2[1] + v3[1]);
451 gpts[0][2] = c_1ov3 * (v1[2] + v2[2] + v3[2]);
551 gpts[0][0] = 0.25 * (v1[0] + v2[0] + v3[0] + v4[0]);
552 gpts[0][1] = 0.25 * (v1[1] + v2[1] + v3[1] + v4[1]);
553 gpts[0][2] = 0.25 * (v1[2] + v2[2] + v3[2] + v4[2]);
658 xg[0] = .5 * (v1[0] + v2[0]);
659 xg[1] = .5 * (v1[1] + v2[1]);
660 xg[2] = .5 * (v1[2] + v2[2]);
663 ana(tcur, 1, NULL, xg,
false, input, &feval);
666 *results += len * feval;
695 double feval[2], weights[2];
701 ana(tcur, 2, NULL, (
const cs_real_t *)gauss_pts,
false, input, feval);
704 *results += weights[0] * feval[0] + weights[1] * feval[1];
733 double feval[3], weights[3];
739 ana(tcur, 3, NULL, (
const cs_real_t *)gauss_pts,
false, input, feval);
742 *results += weights[0]*feval[0] + weights[1]*feval[1] + weights[2]*feval[2];
774 xg[0] = .5 * (v1[0] + v2[0]);
775 xg[1] = .5 * (v1[1] + v2[1]);
776 xg[2] = .5 * (v1[2] + v2[2]);
779 ana(tcur, 1, NULL, xg,
false, input, feval);
782 results[0] += len * feval[0];
783 results[1] += len * feval[1];
784 results[2] += len * feval[2];
813 double feval[6], weights[2];
819 ana(tcur, 2, NULL, (
const cs_real_t *)gauss_pts,
false, input, feval);
822 results[0] += weights[0] * feval[0] + weights[1] * feval[3];
823 results[1] += weights[0] * feval[1] + weights[1] * feval[4];
824 results[2] += weights[0] * feval[2] + weights[1] * feval[5];
853 double feval[9], weights[3];
859 ana(tcur, 3, NULL, (
const cs_real_t *)gauss_pts,
false, input, feval);
862 for (
int p = 0;
p < 3;
p++) {
863 results[0] += weights[
p] * feval[3*
p ];
864 results[1] += weights[
p] * feval[3*
p+1];
865 results[2] += weights[
p] * feval[3*
p+2];
902 xg[0] = c_1ov3 * (v1[0] + v2[0] + v3[0]);
903 xg[1] = c_1ov3 * (v1[1] + v2[1] + v3[1]);
904 xg[2] = c_1ov3 * (v1[2] + v2[2] + v3[2]);
911 ana(tcur, 1, NULL, xg,
false, input, &evaluation);
913 *results += area * evaluation;
944 double evaluation[3], weights[3];
949 ana(tcur, 3, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
952 *results += weights[0] * evaluation[0] + weights[1] * evaluation[1] +
953 weights[2] * evaluation[2];
984 double evaluation[4], weights[4];
989 ana(tcur, 4, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
991 *results += weights[0] * evaluation[0] + weights[1] * evaluation[1] +
992 weights[2] * evaluation[2] + weights[3] * evaluation[3];
1023 double evaluation[7], weights[7];
1028 ana(tcur, 7, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1030 *results += weights[0] * evaluation[0] + weights[1] * evaluation[1] +
1031 weights[2] * evaluation[2] + weights[3] * evaluation[3] +
1032 weights[4] * evaluation[4] + weights[5] * evaluation[5] +
1033 weights[6] * evaluation[6] ;
1064 double evaluation[3];
1069 xg[0] = c_1ov3 * (v1[0] + v2[0] + v3[0]);
1070 xg[1] = c_1ov3 * (v1[1] + v2[1] + v3[1]);
1071 xg[2] = c_1ov3 * (v1[2] + v2[2] + v3[2]);
1078 ana(tcur, 1, NULL, xg,
false, input, evaluation);
1080 results[0] += area * evaluation[0];
1081 results[1] += area * evaluation[1];
1082 results[2] += area * evaluation[2];
1113 double evaluation[3*3], weights[3];
1118 ana(tcur, 3, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1120 for (
int p = 0;
p < 3;
p++) {
1121 results[0] += weights[
p] * evaluation[3*
p ];
1122 results[1] += weights[
p] * evaluation[3*
p+1];
1123 results[2] += weights[
p] * evaluation[3*
p+2];
1155 double evaluation[3*4], weights[4];
1160 ana(tcur, 4, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1162 for (
int p = 0;
p < 4;
p++) {
1163 results[0] += weights[
p] * evaluation[3*
p ];
1164 results[1] += weights[
p] * evaluation[3*
p+1];
1165 results[2] += weights[
p] * evaluation[3*
p+2];
1197 double evaluation[3*7], weights[7];
1202 ana(tcur, 7, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1204 for (
int p = 0;
p < 7;
p++) {
1205 results[0] += weights[
p] * evaluation[3*
p ];
1206 results[1] += weights[
p] * evaluation[3*
p+1];
1207 results[2] += weights[
p] * evaluation[3*
p+2];
1239 double evaluation[9];
1244 xg[0] = c_1ov3 * (v1[0] + v2[0] + v3[0]);
1245 xg[1] = c_1ov3 * (v1[1] + v2[1] + v3[1]);
1246 xg[2] = c_1ov3 * (v1[2] + v2[2] + v3[2]);
1253 ana(tcur, 1, NULL, xg,
false, input, evaluation);
1255 for (
short int ij = 0; ij < 9; ij++)
1256 results[ij] += area * evaluation[ij];
1287 double evaluation[9*3], weights[3];
1292 ana(tcur, 3, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1294 for (
int p = 0;
p < 3;
p++) {
1295 const double wp = weights[
p];
1296 double *eval_p = evaluation + 9*
p;
1297 for (
short int ij = 0; ij < 9; ij++)
1298 results[ij] += wp * eval_p[ij];
1330 double evaluation[9*4], weights[4];
1335 ana(tcur, 4, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1337 for (
int p = 0;
p < 4;
p++) {
1338 const double wp = weights[
p];
1339 double *eval_p = evaluation + 9*
p;
1340 for (
short int ij = 0; ij < 9; ij++)
1341 results[ij] += wp * eval_p[ij];
1373 double evaluation[9*7], weights[7];
1378 ana(tcur, 7, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1380 for (
int p = 0;
p < 7;
p++) {
1381 const double wp = weights[
p];
1382 double *eval_p = evaluation + 9*
p;
1383 for (
short int ij = 0; ij < 9; ij++)
1384 results[ij] += wp * eval_p[ij];
1421 xg[0] = 0.25 * (v1[0] + v2[0] + v3[0] + v4[0]);
1422 xg[1] = 0.25 * (v1[1] + v2[1] + v3[1] + v4[1]);
1423 xg[2] = 0.25 * (v1[2] + v2[2] + v3[2] + v4[2]);
1425 ana(tcur, 1, NULL, xg,
false, input, &evaluation);
1427 *results += vol * evaluation;
1460 double evaluation[4], weights[4];
1465 ana(tcur, 4, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1468 *results += weights[0] * evaluation[0] + weights[1] * evaluation[1] +
1469 weights[2] * evaluation[2] + weights[3] * evaluation[3];
1502 double evaluation[5], weights[5];
1507 ana(tcur, 5, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1509 *results += weights[0] * evaluation[0] + weights[1] * evaluation[1] +
1510 weights[2] * evaluation[2] + weights[3] * evaluation[3] +
1511 weights[4] * evaluation[4];
1544 double evaluation[3];
1547 xg[0] = 0.25 * (v1[0] + v2[0] + v3[0] + v4[0]);
1548 xg[1] = 0.25 * (v1[1] + v2[1] + v3[1] + v4[1]);
1549 xg[2] = 0.25 * (v1[2] + v2[2] + v3[2] + v4[2]);
1551 ana(tcur, 1, NULL, xg,
false, input, evaluation);
1553 results[0] += vol * evaluation[0];
1554 results[1] += vol * evaluation[1];
1555 results[2] += vol * evaluation[2];
1588 double evaluation[3*4], weights[4];
1593 ana(tcur, 4, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1595 for (
int p = 0;
p < 4;
p++) {
1596 results[0] += weights[
p] * evaluation[3*
p ];
1597 results[1] += weights[
p] * evaluation[3*
p+1];
1598 results[2] += weights[
p] * evaluation[3*
p+2];
1632 double evaluation[3*5], weights[5];
1637 ana(tcur, 5, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1639 for (
int p = 0;
p < 5;
p++) {
1640 results[0] += weights[
p] * evaluation[3*
p ];
1641 results[1] += weights[
p] * evaluation[3*
p+1];
1642 results[2] += weights[
p] * evaluation[3*
p+2];
1676 double evaluation[9];
1679 xg[0] = 0.25 * (v1[0] + v2[0] + v3[0] + v4[0]);
1680 xg[1] = 0.25 * (v1[1] + v2[1] + v3[1] + v4[1]);
1681 xg[2] = 0.25 * (v1[2] + v2[2] + v3[2] + v4[2]);
1683 ana(tcur, 1, NULL, xg,
false, input, evaluation);
1685 for (
short int ij = 0; ij < 9; ij++)
1686 results[ij] += vol * evaluation[ij];
1719 double evaluation[9*4], weights[4];
1724 ana(tcur, 4, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1726 for (
int p = 0;
p < 4;
p++) {
1727 const double wp = weights[
p];
1728 double *eval_p = evaluation + 9*
p;
1729 for (
short int ij = 0; ij < 9; ij++)
1730 results[ij] += wp * eval_p[ij];
1764 double evaluation[9*5], weights[5];
1769 ana(tcur, 5, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1771 for (
int p = 0;
p < 5;
p++) {
1772 const double wp = weights[
p];
1773 double *eval_p = evaluation + 9*
p;
1774 for (
short int ij = 0; ij < 9; ij++)
1775 results[ij] += wp * eval_p[ij];
1807 double weight[1], evaluation[3];
1812 ana(tcur, 1, NULL, (
const cs_real_t *)xg,
false, input, evaluation);
1814 results[0] += weight[0] * evaluation[0];
1815 results[1] += weight[0] * evaluation[1];
1816 results[2] += weight[0] * evaluation[2];
1847 double evaluation[3 * 8], weights[8];
1852 ana(tcur, 8, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1854 for (
int p = 0;
p < 8;
p++) {
1855 results[0] += weights[
p] * evaluation[3 *
p];
1856 results[1] += weights[
p] * evaluation[3 *
p + 1];
1857 results[2] += weights[
p] * evaluation[3 *
p + 2];
1889 double evaluation[3 * 27], weights[27];
1894 ana(tcur, 27, NULL, (
const cs_real_t *)gauss_pts,
false, input, evaluation);
1896 for (
int p = 0;
p < 27;
p++) {
1897 results[0] += weights[
p] * evaluation[3 *
p];
1898 results[1] += weights[
p] * evaluation[3 *
p + 1];
1899 results[2] += weights[
p] * evaluation[3 *
p + 2];
1936 " %s: Invalid quadrature type\n", __func__);
1954 " %s: Invalid quadrature type\n", __func__);
1960 " %s: Invalid dimension value %d. Only 1 and 3 are valid.\n",
2000 " %s: Invalid quadrature type\n", __func__);
2018 " %s: Invalid quadrature type\n", __func__);
2036 " %s: Invalid quadrature type\n", __func__);
2042 " %s: Invalid dimension value %d. Only 1, 3 and 9 are valid.\n",
2082 " %s: Invalid quadrature type\n", __func__);
2100 " %s: Invalid quadrature type\n", __func__);
2118 " %s: Invalid quadrature type\n", __func__);
2124 " %s: Invalid dimension value %d. Only 1, 3 and 9 are valid.\n",
2164 __FILE__, __LINE__, 0,
" %s: Invalid quadrature type\n", __func__);
2172 " %s: Invalid dimension value %d. Only 3 is valid.\n",
void bft_error(const char *const file_name, const int line_num, const int sys_error_code, const char *const format,...)
Calls the error handler (set by bft_error_handler_set() or default).
Definition: bft_error.cpp:193
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:359
#define END_C_DECLS
Definition: cs_defs.h:543
unsigned short int cs_flag_t
Definition: cs_defs.h:344
@ p
Definition: cs_field_pointer.h:67
unsigned int cs_eflag_t
Definition: cs_flag.h:192
const cs_real_t cs_math_1ov3
void() cs_analytic_func_t(cs_real_t time, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, const cs_real_t *coords, bool dense_output, void *input, cs_real_t *retval)
Generic function pointer for an evaluation relying on an analytic function.
Definition: cs_param_types.h:127
void cs_quadrature_tet_5pts(const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, 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.cpp:507
static void cs_quadrature_edge_1pt_scal(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, double len, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over an edge with the mid-point rule and add it to results Case of a scalar-valu...
Definition: cs_quadrature.h:646
void() cs_quadrature_hexa_integral_t(double tcur, const cs_real_3_t vb, const double hx, const double hy, const double hz, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over an orthogonal hexahedron based on a specified quadrature rule and add it to...
Definition: cs_quadrature.h:254
static void cs_quadrature_tet_4pts_vect(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a tetrahedron with a quadrature rule using 4 Gauss points and a unique weig...
Definition: cs_quadrature.h:1577
static void cs_quadrature_tet_1pt(const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_real_3_t gpts[], double weight[])
Compute the quadrature in a tetrehedra. Exact for 1st order polynomials (order 2).
Definition: cs_quadrature.h:543
static void cs_quadrature_tet_5pts_scal(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a tetrahedron with a quadrature rule using 5 Gauss points and 5 weights and...
Definition: cs_quadrature.h:1491
static void cs_quadrature_edge_3pts_scal(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, double len, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over an edge with a quadrature rule using 3 Gauss points and weights and add it ...
Definition: cs_quadrature.h:724
static void cs_quadrature_tet_5pts_tens(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a tetrahedron with a quadrature rule using 5 Gauss points and 5 weights and...
Definition: cs_quadrature.h:1753
static void cs_quadrature_tria_4pts_scal(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle with a quadrature rule using 4 Gauss points and 4 weights and ad...
Definition: cs_quadrature.h:974
static void cs_quadrature_tria_7pts_scal(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle with a quadrature rule using 7 Gauss points and 7 weights and ad...
Definition: cs_quadrature.h:1013
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.cpp:423
static cs_quadrature_edge_integral_t * cs_quadrature_get_edge_integral(int dim, cs_quadrature_type_t qtype)
Retrieve the integral function according to the quadrature type and the stride provided Case of integ...
Definition: cs_quadrature.h:1917
static void cs_quadrature_hex_1pt(const cs_real_3_t vb, const double hx, const double hy, const double hz, cs_real_3_t gpts[], double *w)
Compute quadrature points for an orthogonal hexahedron Exact for polynomial function up to order 1.
Definition: cs_quadrature.h:370
cs_quadrature_type_t
Type of quadrature to use when computing an integral quantity. This rationale is used for integrals a...
Definition: cs_quadrature.h:84
@ CS_QUADRATURE_HIGHEST
Definition: cs_quadrature.h:90
@ CS_QUADRATURE_NONE
Definition: cs_quadrature.h:86
@ CS_QUADRATURE_BARY_SUBDIV
Definition: cs_quadrature.h:88
@ CS_QUADRATURE_N_TYPES
Definition: cs_quadrature.h:91
@ CS_QUADRATURE_HIGHER
Definition: cs_quadrature.h:89
@ CS_QUADRATURE_BARY
Definition: cs_quadrature.h:87
void() cs_quadrature_tria_integral_t(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle based on a specified quadrature rule and add it to results.
Definition: cs_quadrature.h:201
static void cs_quadrature_tet_1pt_tens(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a tetrahedron using a barycentric quadrature rule and add it to results....
Definition: cs_quadrature.h:1665
static void cs_quadrature_edge_2pts_vect(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, double len, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over an edge with a quadrature rule using 2 Gauss points and a unique weight and...
Definition: cs_quadrature.h:804
static void cs_quadrature_tria_4pts_tens(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle with a quadrature rule using 4 Gauss points and 4 weights and ad...
Definition: cs_quadrature.h:1320
void() cs_quadrature_tria_t(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 *weights)
Generic functoin pointer to compute the quadrature points for a triangle.
Definition: cs_quadrature.h:130
static void cs_quadrature_edge_1pt(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.h:303
static void cs_quadrature_tria_4pts_vect(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle with a quadrature rule using 4 Gauss points and 4 weights and ad...
Definition: cs_quadrature.h:1145
static void cs_quadrature_tet_1pt_vect(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a tetrahedron using a barycentric quadrature rule and add it to results....
Definition: cs_quadrature.h:1533
static void cs_quadrature_tet_5pts_vect(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a tetrahedron with a quadrature rule using 5 Gauss points and 5 weights and...
Definition: cs_quadrature.h:1621
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.cpp:206
void cs_quadrature_setup(void)
Compute constant weights for all quadratures used.
Definition: cs_quadrature.cpp:108
static void cs_quadrature_tria_7pts_vect(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle with a quadrature rule using 7 Gauss points and 7 weights and ad...
Definition: cs_quadrature.h:1187
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...
void cs_quadrature_hex_8pts(const cs_real_3_t vb, const double hx, const double hy, const double hz, cs_real_3_t gpts[], double *w)
Compute quadrature points for an orthogonal hexahedron Exact for polynomial function up to order 3.
Definition: cs_quadrature.cpp:242
static void cs_quadrature_edge_2pts_scal(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, double len, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over an edge with a quadrature rule using 2 Gauss points and a unique weight and...
Definition: cs_quadrature.h:686
static void cs_quadrature_tet_1pt_scal(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a tetrahedron using a barycentric quadrature rule and add it to results....
Definition: cs_quadrature.h:1407
static cs_quadrature_tetra_integral_t * cs_quadrature_get_tetra_integral(int dim, cs_quadrature_type_t qtype)
Retrieve the integral function according to the quadrature type and the stride provided.
Definition: cs_quadrature.h:2063
static void cs_quadrature_tria_3pts_vect(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle with a quadrature rule using 3 Gauss points and a unique weight ...
Definition: cs_quadrature.h:1103
static void cs_quadrature_tria_1pt_scal(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle using a barycentric quadrature rule and add it to results Case o...
Definition: cs_quadrature.h:887
static void cs_quadrature_tet_4pts_scal(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a tetrahedron with a quadrature rule using 4 Gauss points and a unique weig...
Definition: cs_quadrature.h:1449
void cs_quadrature_hex_27pts(const cs_real_3_t vb, const double hx, const double hy, const double hz, cs_real_3_t gpts[], double w[])
Compute quadrature points for an orthogonal hexahedron Exact for polynomial function up to order 5.
Definition: cs_quadrature.cpp:295
static void cs_quadrature_tria_1pt(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 (1 point) Exact for polynomial function up to order 1 (baryc...
Definition: cs_quadrature.h:440
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.cpp:386
void() cs_quadrature_tetra_integral_t(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a tetrahedron based on a specified quadrature rule and add it to results.
Definition: cs_quadrature.h:228
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.
void cs_quadrature_tet_15pts(const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_real_3_t gpts[], double weights[])
Compute the quadrature in a tetrehedra. Exact for 5th order polynomials (order 6).
Definition: cs_quadrature.cpp:553
static void cs_quadrature_tria_1pt_vect(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle using a barycentric quadrature rule and add it to results Case o...
Definition: cs_quadrature.h:1054
static void cs_quadrature_hex_1pt_vect(double tcur, const cs_real_3_t vb, const double hx, const double hy, const double hz, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a orthoganal hexahedron using a barycentric quadrature rule and add it to r...
Definition: cs_quadrature.h:1797
const char * cs_quadrature_get_type_name(const cs_quadrature_type_t type)
Return th name associated to a type of quadrature.
Definition: cs_quadrature.cpp:155
static void cs_quadrature_tria_3pts_scal(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle with a quadrature rule using 3 Gauss points and a unique weight ...
Definition: cs_quadrature.h:934
void() cs_quadrature_edge_t(const cs_real_3_t v1, const cs_real_3_t v2, double len, cs_real_3_t gpts[], double *weights)
Generic function pointer to compute the quadrature points for an edge from v1 -> v2.
Definition: cs_quadrature.h:109
static void cs_quadrature_edge_1pt_vect(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, double len, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over an edge using a barycentric quadrature rule and add it to results Case of a...
Definition: cs_quadrature.h:762
static void cs_quadrature_hex_27pts_vect(double tcur, const cs_real_3_t vb, const double hx, const double hy, const double hz, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over an orthogonal hexahedron with a quadrature rule using 27 Gauss points add i...
Definition: cs_quadrature.h:1879
void() cs_quadrature_tet_t(const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_real_3_t gpts[], double weights[])
Generic function to compute the quadrature points in a tetrehedra.
Definition: cs_quadrature.h:152
void() cs_quadrature_edge_integral_t(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, double len, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over an edge based on a specified quadrature rule and add it to results.
Definition: cs_quadrature.h:176
static void cs_quadrature_tria_3pts_tens(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle with a quadrature rule using 3 Gauss points and a unique weight ...
Definition: cs_quadrature.h:1277
static void cs_quadrature_tria_7pts_tens(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle with a quadrature rule using 7 Gauss points and 7 weights and ad...
Definition: cs_quadrature.h:1363
void cs_quadrature_tet_4pts(const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_real_3_t gpts[], double weights[])
Compute the quadrature in a tetrehedra. Exact for 2nd order polynomials (order 3).
Definition: cs_quadrature.cpp:465
cs_eflag_t cs_quadrature_get_flag(const cs_quadrature_type_t qtype, const cs_flag_t loc)
Get the flags adapted to the given quadrature type qtype and the location on which the quadrature sho...
Definition: cs_quadrature.cpp:616
static void cs_quadrature_edge_3pts_vect(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, double len, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over an edge with a quadrature rule using 3 Gauss points and weights and add it ...
Definition: cs_quadrature.h:844
static void cs_quadrature_tria_1pt_tens(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle using a barycentric quadrature rule and add it to results....
Definition: cs_quadrature.h:1229
static cs_quadrature_hexa_integral_t * cs_quadrature_get_hexa_integral(int dim, cs_quadrature_type_t qtype)
Retrieve the integral function according to the quadrature type and the stride provided for an hexahe...
Definition: cs_quadrature.h:2146
static cs_quadrature_tria_integral_t * cs_quadrature_get_tria_integral(int dim, cs_quadrature_type_t qtype)
Retrieve the integral function according to the quadrature type and the stride provided.
Definition: cs_quadrature.h:1981
static void cs_quadrature_hex_8pts_vect(double tcur, const cs_real_3_t vb, const double hx, const double hy, const double hz, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over an orthoganal hexahedron with a quadrature rule using 8 Gauss points and a ...
Definition: cs_quadrature.h:1837
static void cs_quadrature_tet_4pts_tens(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a tetrahedron with a quadrature rule using 4 Gauss points and a unique weig...
Definition: cs_quadrature.h:1708