v0.14.0
Functions
triangle_ncc_rule.c File Reference
#include "triangle_ncc_rule.h"

Go to the source code of this file.

Functions

int i4_modp (int i, int j)
 
int i4_wrap (int ival, int ilo, int ihi)
 
double r8_huge ()
 
int r8_nint (double x)
 
void reference_to_physical_t3 (double t[], int n, double ref[], double phy[])
 
double triangle_area (double t[2 *3])
 
int triangle_ncc_degree (int rule)
 
int triangle_ncc_order_num (int rule)
 
void triangle_ncc_rule (int rule, int order_num, double xy[], double w[])
 
int triangle_ncc_rule_num ()
 
int * triangle_ncc_suborder (int rule, int suborder_num)
 
int triangle_ncc_suborder_num (int rule)
 
void triangle_ncc_subrule (int rule, int suborder_num, double suborder_xyz[], double suborder_w[])
 
void triangle_ncc_subrule_01 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_ncc_subrule_02 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_ncc_subrule_03 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_ncc_subrule_04 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_ncc_subrule_05 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_ncc_subrule_06 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_ncc_subrule_07 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_ncc_subrule_08 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_ncc_subrule_09 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 

Function Documentation

◆ i4_modp()

int i4_modp ( int  i,
int  j 
)

Definition at line 89 of file triangle_ncc_rule.c.

144 {
145  int value;
146 
147  if ( j == 0 )
148  {
149  fprintf ( stderr, "\n" );
150  fprintf ( stderr, "I4_MODP - Fatal error!\n" );
151  fprintf ( stderr, " I4_MODP ( I, J ) called with J = %d\n", j );
152  exit ( 1 );
153  }
154 
155  value = i % j;
156 
157  if ( value < 0 )
158  {
159  value = value + abs ( j );
160  }
161 
162  return value;
163 }

◆ i4_wrap()

int i4_wrap ( int  ival,
int  ilo,
int  ihi 
)

Definition at line 166 of file triangle_ncc_rule.c.

218 {
219  int jhi;
220  int jlo;
221  int value;
222  int wide;
223 
224  if ( ilo < ihi )
225  {
226  jlo = ilo;
227  jhi = ihi;
228  }
229  else
230  {
231  jlo = ihi;
232  jhi = ilo;
233  }
234 
235  wide = jhi + 1 - jlo;
236 
237  if ( wide == 1 )
238  {
239  value = jlo;
240  }
241  else
242  {
243  value = jlo + i4_modp ( ival - jlo, wide );
244  }
245 
246  return value;
247 }

◆ r8_huge()

double r8_huge ( )

Definition at line 250 of file triangle_ncc_rule.c.

281 {
282  double value;
283 
284  value = 1.0E+30;
285 
286  return value;
287 }

◆ r8_nint()

int r8_nint ( double  x)

Definition at line 290 of file triangle_ncc_rule.c.

329 {
330  int s;
331  int value;
332 
333  if ( x < 0.0 )
334  {
335  s = - 1;
336  }
337  else
338  {
339  s = + 1;
340  }
341  value = s * ( int ) ( fabs ( x ) + 0.5 );
342 
343  return value;
344 }

◆ reference_to_physical_t3()

void reference_to_physical_t3 ( double  t[],
int  n,
double  ref[],
double  phy[] 
)

Definition at line 347 of file triangle_ncc_rule.c.

406 {
407  int i;
408  int j;
409 
410  for ( i = 0; i < 2; i++ )
411  {
412  for ( j = 0; j < n; j++ )
413  {
414  phy[i+j*2] = t[i+0*2] * ( 1.0 - ref[0+j*2] - ref[1+j*2] )
415  + t[i+1*2] * + ref[0+j*2]
416  + t[i+2*2] * + ref[1+j*2];
417  }
418  }
419 
420  return;
421 }

◆ triangle_area()

double triangle_area ( double  t[2 *3])

Definition at line 472 of file triangle_ncc_rule.c.

511 {
512  double area;
513 
514  area = 0.5 * (
515  t[0+0*2] * ( t[1+1*2] - t[1+2*2] ) +
516  t[0+1*2] * ( t[1+2*2] - t[1+0*2] ) +
517  t[0+2*2] * ( t[1+0*2] - t[1+1*2] ) );
518 
519  return area;
520 }

◆ triangle_ncc_degree()

int triangle_ncc_degree ( int  rule)

Definition at line 523 of file triangle_ncc_rule.c.

557 {
558  int degree;
559 
560  if ( 1 <= rule && rule <= 9 )
561  {
562  degree = rule - 1;
563  }
564  else
565  {
566  degree = -1;
567  fprintf ( stderr, "\n" );
568  fprintf ( stderr, "TRIANGLE_NCC_DEGREE - Fatal error!\n" );
569  fprintf ( stderr, " Illegal RULE = %d\n", rule );
570  exit ( 1 );
571  }
572 
573  return degree;
574 }

◆ triangle_ncc_order_num()

int triangle_ncc_order_num ( int  rule)

Definition at line 577 of file triangle_ncc_rule.c.

611 {
612  int order;
613  int order_num;
614  int *suborder;
615  int suborder_num;
616 
617  suborder_num = triangle_ncc_suborder_num ( rule );
618 
619  suborder = triangle_ncc_suborder ( rule, suborder_num );
620 
621  order_num = 0;
622  for ( order = 0; order < suborder_num; order++ )
623  {
624  order_num = order_num + suborder[order];
625  }
626 
627  free ( suborder );
628 
629  return order_num;
630 }

◆ triangle_ncc_rule()

void triangle_ncc_rule ( int  rule,
int  order_num,
double  xy[],
double  w[] 
)

Definition at line 633 of file triangle_ncc_rule.c.

670 {
671  int k;
672  int o;
673  int s;
674  int *suborder;
675  int suborder_num;
676  double *suborder_w;
677  double *suborder_xyz;
678 /*
679  Get the suborder information.
680 */
681  suborder_num = triangle_ncc_suborder_num ( rule );
682 
683  suborder_xyz = ( double * ) malloc ( 3 * suborder_num * sizeof ( double ) );
684  suborder_w = ( double * ) malloc ( suborder_num * sizeof ( double ) );
685 
686  suborder = triangle_ncc_suborder ( rule, suborder_num );
687 
688  triangle_ncc_subrule ( rule, suborder_num, suborder_xyz, suborder_w );
689 /*
690  Expand the suborder information to a full order rule.
691 */
692  o = 0;
693 
694  for ( s = 0; s < suborder_num; s++ )
695  {
696  if ( suborder[s] == 1 )
697  {
698  xy[0+o*2] = suborder_xyz[0+s*3];
699  xy[1+o*2] = suborder_xyz[1+s*3];
700  w[o] = suborder_w[s];
701  o = o + 1;
702  }
703  else if ( suborder[s] == 3 )
704  {
705  for ( k = 0; k < 3; k++ )
706  {
707  xy[0+o*2] = suborder_xyz [ i4_wrap(k, 0,2) + s*3 ];
708  xy[1+o*2] = suborder_xyz [ i4_wrap(k+1,0,2) + s*3 ];
709  w[o] = suborder_w[s];
710  o = o + 1;
711  }
712  }
713  else if ( suborder[s] == 6 )
714  {
715  for ( k = 0; k < 3; k++ )
716  {
717  xy[0+o*2] = suborder_xyz [ i4_wrap(k, 0,2) + s*3 ];
718  xy[1+o*2] = suborder_xyz [ i4_wrap(k+1,0,2) + s*3 ];
719  w[o] = suborder_w[s];
720  o = o + 1;
721  }
722 
723  for ( k = 0; k < 3; k++ )
724  {
725  xy[0+o*2] = suborder_xyz [ i4_wrap(k+1,0,2) + s*3 ];
726  xy[1+o*2] = suborder_xyz [ i4_wrap(k, 0,2) + s*3 ];
727  w[o] = suborder_w[s];
728  o = o + 1;
729  }
730  }
731  else
732  {
733  fprintf ( stderr, "\n" );
734  fprintf ( stderr, "TRIANGLE_NCC_RULE - Fatal error!\n" );
735  fprintf ( stderr, " Illegal SUBORDER(%d) = %d\n", s, suborder[s] );
736  exit ( 1 );
737  }
738  }
739 
740  free ( suborder );
741  free ( suborder_xyz );
742  free ( suborder_w );
743 
744  return;
745 }

◆ triangle_ncc_rule_num()

int triangle_ncc_rule_num ( )

Definition at line 748 of file triangle_ncc_rule.c.

779 {
780  int rule_num;
781 
782  rule_num = 9;
783 
784  return rule_num;
785 }

◆ triangle_ncc_suborder()

int* triangle_ncc_suborder ( int  rule,
int  suborder_num 
)

Definition at line 788 of file triangle_ncc_rule.c.

824 {
825  int *suborder;
826 
827  suborder = ( int * ) malloc ( suborder_num * sizeof ( int ) );
828 
829  if ( rule == 1 )
830  {
831  suborder[0] = 1;
832  }
833  else if ( rule == 2 )
834  {
835  suborder[0] = 3;
836  }
837  else if ( rule == 3 )
838  {
839  suborder[0] = 3;
840  }
841  else if ( rule == 4 )
842  {
843  suborder[0] = 3;
844  suborder[1] = 6;
845  suborder[2] = 1;
846  }
847  else if ( rule == 5 )
848  {
849  suborder[0] = 6;
850  suborder[1] = 3;
851  suborder[2] = 3;
852  }
853  else if ( rule == 6 )
854  {
855  suborder[0] = 3;
856  suborder[1] = 6;
857  suborder[2] = 6;
858  suborder[3] = 3;
859  suborder[4] = 3;
860  }
861  else if ( rule == 7 )
862  {
863  suborder[0] = 6;
864  suborder[1] = 6;
865  suborder[2] = 3;
866  suborder[3] = 3;
867  suborder[4] = 6;
868  suborder[5] = 1;
869  }
870  else if ( rule == 8 )
871  {
872  suborder[0] = 3;
873  suborder[1] = 6;
874  suborder[2] = 6;
875  suborder[3] = 3;
876  suborder[4] = 6;
877  suborder[5] = 6;
878  suborder[6] = 3;
879  suborder[7] = 3;
880  }
881  else if ( rule == 9 )
882  {
883  suborder[0] = 6;
884  suborder[1] = 6;
885  suborder[2] = 3;
886  suborder[3] = 6;
887  suborder[4] = 6;
888  suborder[5] = 3;
889  suborder[6] = 6;
890  suborder[7] = 3;
891  suborder[8] = 3;
892  }
893  else
894  {
895  fprintf ( stderr, "\n" );
896  fprintf ( stderr, "TRIANGLE_NCC_SUBORDER - Fatal error!\n" );
897  fprintf ( stderr, " Illegal RULE = %d\n", rule );
898  exit ( 1 );
899  }
900 
901  return suborder;
902 }

◆ triangle_ncc_suborder_num()

int triangle_ncc_suborder_num ( int  rule)

Definition at line 905 of file triangle_ncc_rule.c.

939 {
940  int suborder_num;
941 
942  if ( rule == 1 )
943  {
944  suborder_num = 1;
945  }
946  else if ( rule == 2 )
947  {
948  suborder_num = 1;
949  }
950  else if ( rule == 3 )
951  {
952  suborder_num = 1;
953  }
954  else if ( rule == 4 )
955  {
956  suborder_num = 3;
957  }
958  else if ( rule == 5 )
959  {
960  suborder_num = 3;
961  }
962  else if ( rule == 6 )
963  {
964  suborder_num = 5;
965  }
966  else if ( rule == 7 )
967  {
968  suborder_num = 6;
969  }
970  else if ( rule == 8 )
971  {
972  suborder_num = 8;
973  }
974  else if ( rule == 9 )
975  {
976  suborder_num = 9;
977  }
978  else
979  {
980  suborder_num = -1;
981  fprintf ( stderr, "\n" );
982  fprintf ( stderr, "TRIANGLE_NCC_SUBORDER_NUM - Fatal error!\n" );
983  fprintf ( stderr, " Illegal RULE = %d\n", rule );
984  exit ( 1 );
985  }
986 
987  return suborder_num;
988 }

◆ triangle_ncc_subrule()

void triangle_ncc_subrule ( int  rule,
int  suborder_num,
double  suborder_xyz[],
double  suborder_w[] 
)

Definition at line 991 of file triangle_ncc_rule.c.

1030 {
1031  int i;
1032  int s;
1033  int suborder_w_d;
1034  int *suborder_w_n;
1035  int suborder_xyz_d;
1036  int *suborder_xyz_n;
1037 
1038  suborder_xyz_n = ( int * ) malloc ( 3 * suborder_num * sizeof ( int ) );
1039  suborder_w_n = ( int * ) malloc ( suborder_num * sizeof ( int ) );
1040 
1041  if ( rule == 1 )
1042  {
1043  triangle_ncc_subrule_01 ( suborder_num, suborder_xyz_n, &suborder_xyz_d,
1044  suborder_w_n, &suborder_w_d );
1045  }
1046  else if ( rule == 2 )
1047  {
1048  triangle_ncc_subrule_02 ( suborder_num, suborder_xyz_n, &suborder_xyz_d,
1049  suborder_w_n, &suborder_w_d );
1050  }
1051  else if ( rule == 3 )
1052  {
1053  triangle_ncc_subrule_03 ( suborder_num, suborder_xyz_n, &suborder_xyz_d,
1054  suborder_w_n, &suborder_w_d );
1055  }
1056  else if ( rule == 4 )
1057  {
1058  triangle_ncc_subrule_04 ( suborder_num, suborder_xyz_n, &suborder_xyz_d,
1059  suborder_w_n, &suborder_w_d );
1060  }
1061  else if ( rule == 5 )
1062  {
1063  triangle_ncc_subrule_05 ( suborder_num, suborder_xyz_n, &suborder_xyz_d,
1064  suborder_w_n, &suborder_w_d );
1065  }
1066  else if ( rule == 6 )
1067  {
1068  triangle_ncc_subrule_06 ( suborder_num, suborder_xyz_n, &suborder_xyz_d,
1069  suborder_w_n, &suborder_w_d );
1070  }
1071  else if ( rule == 7 )
1072  {
1073  triangle_ncc_subrule_07 ( suborder_num, suborder_xyz_n, &suborder_xyz_d,
1074  suborder_w_n, &suborder_w_d );
1075  }
1076  else if ( rule == 8 )
1077  {
1078  triangle_ncc_subrule_08 ( suborder_num, suborder_xyz_n, &suborder_xyz_d,
1079  suborder_w_n, &suborder_w_d );
1080  }
1081  else if ( rule == 9 )
1082  {
1083  triangle_ncc_subrule_09 ( suborder_num, suborder_xyz_n, &suborder_xyz_d,
1084  suborder_w_n, &suborder_w_d );
1085  }
1086  else
1087  {
1088  fprintf ( stderr, "\n" );
1089  fprintf ( stderr, "TRIANGLE_NCC_SUBRULE - Fatal error!\n" );
1090  fprintf ( stderr, " Illegal RULE = %d\n", rule );
1091  exit ( 1 );
1092  }
1093 
1094  for ( s = 0; s < suborder_num; s++ )
1095  {
1096  for ( i = 0; i < 3; i++ )
1097  {
1098  suborder_xyz[i+s*3] =
1099  ( double ) ( suborder_xyz_n[i+s*3] )
1100  / ( double ) ( suborder_xyz_d );
1101  }
1102  }
1103  for ( s = 0; s < suborder_num; s++ )
1104  {
1105  suborder_w[s] = ( double ) suborder_w_n[s] / ( double ) suborder_w_d;
1106  }
1107 
1108  free ( suborder_w_n );
1109  free ( suborder_xyz_n );
1110 
1111  return;
1112 }

◆ triangle_ncc_subrule_01()

void triangle_ncc_subrule_01 ( int  suborder_num,
int  suborder_xyz_n[],
int *  suborder_xyz_d,
int  suborder_w_n[],
int *  suborder_w_d 
)

Definition at line 1115 of file triangle_ncc_rule.c.

1159 {
1160  int i;
1161  int s;
1162  int suborder_xyz_n_01[3*1] = {
1163  1, 1, 1
1164  };
1165  int suborder_xyz_d_01 = 3;
1166  int suborder_w_n_01[1] = { 1 };
1167  int suborder_w_d_01 = 1;
1168 
1169  for ( s = 0; s < suborder_num; s++ )
1170  {
1171  for ( i = 0; i < 3; i++ )
1172  {
1173  suborder_xyz_n[i+s*3] = suborder_xyz_n_01[i+s*3];
1174  }
1175  }
1176  *suborder_xyz_d = suborder_xyz_d_01;
1177 
1178  for ( s = 0; s < suborder_num; s++ )
1179  {
1180  suborder_w_n[s] = suborder_w_n_01[s];
1181  }
1182  *suborder_w_d = suborder_w_d_01;
1183 
1184  return;
1185 }

◆ triangle_ncc_subrule_02()

void triangle_ncc_subrule_02 ( int  suborder_num,
int  suborder_xyz_n[],
int *  suborder_xyz_d,
int  suborder_w_n[],
int *  suborder_w_d 
)

Definition at line 1188 of file triangle_ncc_rule.c.

1232 {
1233  int i;
1234  int s;
1235  int suborder_xyz_n_02[3*1] = {
1236  1, 0, 0
1237  };
1238  int suborder_xyz_d_02 = 1;
1239  int suborder_w_n_02[1] = { 1 };
1240  int suborder_w_d_02 = 3;
1241 
1242  for ( s = 0; s < suborder_num; s++ )
1243  {
1244  for ( i = 0; i < 3; i++ )
1245  {
1246  suborder_xyz_n[i+s*3] = suborder_xyz_n_02[i+s*3];
1247  }
1248  }
1249  *suborder_xyz_d = suborder_xyz_d_02;
1250 
1251  for ( s = 0; s < suborder_num; s++ )
1252  {
1253  suborder_w_n[s] = suborder_w_n_02[s];
1254  }
1255  *suborder_w_d = suborder_w_d_02;
1256 
1257  return;
1258 }

◆ triangle_ncc_subrule_03()

void triangle_ncc_subrule_03 ( int  suborder_num,
int  suborder_xyz_n[],
int *  suborder_xyz_d,
int  suborder_w_n[],
int *  suborder_w_d 
)

Definition at line 1261 of file triangle_ncc_rule.c.

1305 {
1306  int i;
1307  int s;
1308  int suborder_xyz_n_03[3*1] = {
1309  1, 1, 0
1310  };
1311  int suborder_xyz_d_03 = 2;
1312  int suborder_w_n_03[1] = { 1 };
1313  int suborder_w_d_03 = 3;
1314 
1315  for ( s = 0; s < suborder_num; s++ )
1316  {
1317  for ( i = 0; i < 3; i++ )
1318  {
1319  suborder_xyz_n[i+s*3] = suborder_xyz_n_03[i+s*3];
1320  }
1321  }
1322  *suborder_xyz_d = suborder_xyz_d_03;
1323 
1324  for ( s = 0; s < suborder_num; s++ )
1325  {
1326  suborder_w_n[s] = suborder_w_n_03[s];
1327  }
1328  *suborder_w_d = suborder_w_d_03;
1329 
1330  return;
1331 }

◆ triangle_ncc_subrule_04()

void triangle_ncc_subrule_04 ( int  suborder_num,
int  suborder_xyz_n[],
int *  suborder_xyz_d,
int  suborder_w_n[],
int *  suborder_w_d 
)

Definition at line 1334 of file triangle_ncc_rule.c.

1378 {
1379  int i;
1380  int s;
1381  int suborder_xyz_n_04[3*3] = {
1382  3, 0, 0,
1383  2, 1, 0,
1384  1, 1, 1
1385  };
1386  int suborder_xyz_d_04 = 3;
1387  int suborder_w_n_04[3] = { 4, 9, 54 };
1388  int suborder_w_d_04 = 120;
1389 
1390  for ( s = 0; s < suborder_num; s++ )
1391  {
1392  for ( i = 0; i < 3; i++ )
1393  {
1394  suborder_xyz_n[i+s*3] = suborder_xyz_n_04[i+s*3];
1395  }
1396  }
1397  *suborder_xyz_d = suborder_xyz_d_04;
1398 
1399  for ( s = 0; s < suborder_num; s++ )
1400  {
1401  suborder_w_n[s] = suborder_w_n_04[s];
1402  }
1403  *suborder_w_d = suborder_w_d_04;
1404 
1405  return;
1406 }

◆ triangle_ncc_subrule_05()

void triangle_ncc_subrule_05 ( int  suborder_num,
int  suborder_xyz_n[],
int *  suborder_xyz_d,
int  suborder_w_n[],
int *  suborder_w_d 
)

Definition at line 1409 of file triangle_ncc_rule.c.

1453 {
1454  int i;
1455  int s;
1456  int suborder_xyz_n_05[3*3] = {
1457  3, 1, 0,
1458  2, 2, 0,
1459  2, 1, 1
1460  };
1461  int suborder_xyz_d_05 = 4;
1462  int suborder_w_n_05[3] = { 4, -1, 8 };
1463  int suborder_w_d_05 = 45;
1464 
1465  for ( s = 0; s < suborder_num; s++ )
1466  {
1467  for ( i = 0; i < 3; i++ )
1468  {
1469  suborder_xyz_n[i+s*3] = suborder_xyz_n_05[i+s*3];
1470  }
1471  }
1472  *suborder_xyz_d = suborder_xyz_d_05;
1473 
1474  for ( s = 0; s < suborder_num; s++ )
1475  {
1476  suborder_w_n[s] = suborder_w_n_05[s];
1477  }
1478  *suborder_w_d = suborder_w_d_05;
1479 
1480  return;
1481 }

◆ triangle_ncc_subrule_06()

void triangle_ncc_subrule_06 ( int  suborder_num,
int  suborder_xyz_n[],
int *  suborder_xyz_d,
int  suborder_w_n[],
int *  suborder_w_d 
)

Definition at line 1484 of file triangle_ncc_rule.c.

1528 {
1529  int i;
1530  int s;
1531  int suborder_xyz_n_06[3*5] = {
1532  5, 0, 0,
1533  4, 1, 0,
1534  3, 2, 0,
1535  3, 1, 1,
1536  2, 2, 1
1537  };
1538  int suborder_xyz_d_06 = 5;
1539  int suborder_w_n_06[5] = { 11, 25, 25, 200, 25 };
1540  int suborder_w_d_06 = 1008;
1541 
1542  for ( s = 0; s < suborder_num; s++ )
1543  {
1544  for ( i = 0; i < 3; i++ )
1545  {
1546  suborder_xyz_n[i+s*3] = suborder_xyz_n_06[i+s*3];
1547  }
1548  }
1549  *suborder_xyz_d = suborder_xyz_d_06;
1550 
1551  for ( s = 0; s < suborder_num; s++ )
1552  {
1553  suborder_w_n[s] = suborder_w_n_06[s];
1554  }
1555  *suborder_w_d = suborder_w_d_06;
1556 
1557  return;
1558 }

◆ triangle_ncc_subrule_07()

void triangle_ncc_subrule_07 ( int  suborder_num,
int  suborder_xyz_n[],
int *  suborder_xyz_d,
int  suborder_w_n[],
int *  suborder_w_d 
)

Definition at line 1561 of file triangle_ncc_rule.c.

1605 {
1606  int i;
1607  int s;
1608  int suborder_xyz_n_07[3*6] = {
1609  5, 1, 0,
1610  4, 2, 0,
1611  4, 1, 1,
1612  3, 3, 0,
1613  3, 2, 1,
1614  2, 2, 2
1615  };
1616  int suborder_xyz_d_07 = 6;
1617  int suborder_w_n_07[6] = { 36, -27, 72, 64, 72, -54 };
1618  int suborder_w_d_07 = 840;
1619 
1620  for ( s = 0; s < suborder_num; s++ )
1621  {
1622  for ( i = 0; i < 3; i++ )
1623  {
1624  suborder_xyz_n[i+s*3] = suborder_xyz_n_07[i+s*3];
1625  }
1626  }
1627  *suborder_xyz_d = suborder_xyz_d_07;
1628 
1629  for ( s = 0; s < suborder_num; s++ )
1630  {
1631  suborder_w_n[s] = suborder_w_n_07[s];
1632  }
1633  *suborder_w_d = suborder_w_d_07;
1634 
1635  return;
1636 }

◆ triangle_ncc_subrule_08()

void triangle_ncc_subrule_08 ( int  suborder_num,
int  suborder_xyz_n[],
int *  suborder_xyz_d,
int  suborder_w_n[],
int *  suborder_w_d 
)

Definition at line 1639 of file triangle_ncc_rule.c.

1683 {
1684  int i;
1685  int s;
1686  int suborder_xyz_n_08[3*8] = {
1687  7, 0, 0,
1688  6, 1, 0,
1689  5, 2, 0,
1690  5, 1, 1,
1691  4, 3, 0,
1692  4, 2, 1,
1693  3, 3, 1,
1694  3, 2, 2
1695  };
1696  int suborder_xyz_d_08 = 7;
1697  int suborder_w_n_08[8] = { 1336, 2989, 3577, 32242, 2695, -6860, 44590, 3430 };
1698  int suborder_w_d_08 = 259200;
1699 
1700  for ( s = 0; s < suborder_num; s++ )
1701  {
1702  for ( i = 0; i < 3; i++ )
1703  {
1704  suborder_xyz_n[i+s*3] = suborder_xyz_n_08[i+s*3];
1705  }
1706  }
1707  *suborder_xyz_d = suborder_xyz_d_08;
1708 
1709  for ( s = 0; s < suborder_num; s++ )
1710  {
1711  suborder_w_n[s] = suborder_w_n_08[s];
1712  }
1713  *suborder_w_d = suborder_w_d_08;
1714 
1715  return;
1716 }

◆ triangle_ncc_subrule_09()

void triangle_ncc_subrule_09 ( int  suborder_num,
int  suborder_xyz_n[],
int *  suborder_xyz_d,
int  suborder_w_n[],
int *  suborder_w_d 
)

Definition at line 1719 of file triangle_ncc_rule.c.

1763 {
1764  int i;
1765  int s;
1766  int suborder_xyz_n_09[3*9] = {
1767  7, 1, 0,
1768  6, 2, 0,
1769  6, 1, 1,
1770  5, 3, 0,
1771  5, 2, 1,
1772  4, 4, 0,
1773  4, 3, 1,
1774  4, 2, 2,
1775  3, 3, 2
1776  };
1777  int suborder_xyz_d_09 = 8;
1778  int suborder_w_n_09[9] = {
1779  368, -468, 704, 1136, 832, -1083, 672, -1448, 1472 };
1780  int suborder_w_d_09 = 14175;
1781 
1782  for ( s = 0; s < suborder_num; s++ )
1783  {
1784  for ( i = 0; i < 3; i++ )
1785  {
1786  suborder_xyz_n[i+s*3] = suborder_xyz_n_09[i+s*3];
1787  }
1788  }
1789  *suborder_xyz_d = suborder_xyz_d_09;
1790 
1791  for ( s = 0; s < suborder_num; s++ )
1792  {
1793  suborder_w_n[s] = suborder_w_n_09[s];
1794  }
1795  *suborder_w_d = suborder_w_d_09;
1796 
1797  return;
1798 }
triangle_ncc_subrule_02
void triangle_ncc_subrule_02(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_ncc_rule.c:1188
triangle_ncc_subrule_06
void triangle_ncc_subrule_06(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_ncc_rule.c:1484
triangle_ncc_subrule_07
void triangle_ncc_subrule_07(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_ncc_rule.c:1561
triangle_ncc_subrule
void triangle_ncc_subrule(int rule, int suborder_num, double suborder_xyz[], double suborder_w[])
Definition: triangle_ncc_rule.c:991
order
constexpr int order
Definition: dg_projection.cpp:18
triangle_ncc_suborder_num
int triangle_ncc_suborder_num(int rule)
Definition: triangle_ncc_rule.c:905
triangle_ncc_subrule_03
void triangle_ncc_subrule_03(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_ncc_rule.c:1261
triangle_ncc_subrule_05
void triangle_ncc_subrule_05(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_ncc_rule.c:1409
triangle_ncc_subrule_08
void triangle_ncc_subrule_08(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_ncc_rule.c:1639
double
triangle_ncc_subrule_01
void triangle_ncc_subrule_01(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_ncc_rule.c:1115
triangle_ncc_suborder
int * triangle_ncc_suborder(int rule, int suborder_num)
Definition: triangle_ncc_rule.c:788
t
constexpr double t
plate stiffness
Definition: plate.cpp:58
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
convert.n
n
Definition: convert.py:82
triangle_ncc_subrule_09
void triangle_ncc_subrule_09(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_ncc_rule.c:1719
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
sdf_wavy_2d.w
int w
Definition: sdf_wavy_2d.py:6
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
convert.int
int
Definition: convert.py:64
triangle_ncc_subrule_04
void triangle_ncc_subrule_04(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_ncc_rule.c:1334
i4_wrap
int i4_wrap(int ival, int ilo, int ihi)
Definition: triangle_ncc_rule.c:166
i4_modp
int i4_modp(int i, int j)
Definition: triangle_ncc_rule.c:89