10 static void brickToTet(
double xi,
double eta,
double zeta,
double *r,
double *s,
14 *r = 0.5e0 * (1.0e0 + xi);
16 *s = 0.5e0 * (1.0e0 + eta) * r1;
17 rs1 = 1.0e0 - (*r) - (*s);
18 *t = 0.5e0 * (1.0e0 + zeta) * rs1;
19 *J = 0.125e0 * r1 * rs1;
22 void quadToTri(
double xi,
double eta,
double *r,
double *s,
double *J)
25 *r = 0.5e0 * (1.0e0 + xi);
27 *s = 0.5e0 * (1.0e0 + eta) * r1;
31 double quadToTriJac(
double,
double eta) {
return 0.125e0 * (1.0e0 - eta); }
36 int i, j, k, index = 0;
37 double *pt1, *pt2, *pt3, *wt1, *wt2, *wt3, dJ;
42 for(i = 0; i < n1; i++) {
43 for(j = 0; j < n2; j++) {
44 for(k = 0; k < n3; k++) {
45 brickToTet(pt1[i], pt2[j], pt3[k], &(pts[index].pt[0]),
46 &(pts[index].pt[1]), &(pts[index].pt[2]), &dJ);
47 pts[index++].
weight = dJ * wt1[i] * wt2[j] * wt3[k];
58 double *pt1, *pt2, *wt1, *wt2, dJ;
63 for(i = 0; i < n1; i++) {
64 for(j = 0; j < n2; j++) {
65 quadToTri(pt1[i], pt2[j], &(pts[index].pt[0]), &(pts[index].pt[1]), &dJ);
67 pts[index++].
weight = dJ * wt1[i] * wt2[j];