v0.14.0
Functions
triangle_nco_rule.c File Reference
#include "triangle_nco_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_nco_degree (int rule)
 
int triangle_nco_order_num (int rule)
 
void triangle_nco_rule (int rule, int order_num, double xy[], double w[])
 
int triangle_nco_rule_num ()
 
int * triangle_nco_suborder (int rule, int suborder_num)
 
int triangle_nco_suborder_num (int rule)
 
void triangle_nco_subrule (int rule, int suborder_num, double suborder_xyz[], double suborder_w[])
 
void triangle_nco_subrule_01 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_nco_subrule_02 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_nco_subrule_03 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_nco_subrule_04 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_nco_subrule_05 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_nco_subrule_06 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_nco_subrule_07 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_nco_subrule_08 (int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
 
void triangle_nco_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 88 of file triangle_nco_rule.c.

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

◆ i4_wrap()

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

Definition at line 165 of file triangle_nco_rule.c.

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

◆ r8_huge()

double r8_huge ( )

Definition at line 249 of file triangle_nco_rule.c.

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

◆ r8_nint()

int r8_nint ( double  x)

Definition at line 289 of file triangle_nco_rule.c.

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

◆ reference_to_physical_t3()

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

Definition at line 346 of file triangle_nco_rule.c.

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

◆ triangle_area()

double triangle_area ( double  t[2 *3])

Definition at line 471 of file triangle_nco_rule.c.

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

◆ triangle_nco_degree()

int triangle_nco_degree ( int  rule)

Definition at line 522 of file triangle_nco_rule.c.

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

◆ triangle_nco_order_num()

int triangle_nco_order_num ( int  rule)

Definition at line 576 of file triangle_nco_rule.c.

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

◆ triangle_nco_rule()

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

Definition at line 632 of file triangle_nco_rule.c.

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

◆ triangle_nco_rule_num()

int triangle_nco_rule_num ( )

Definition at line 747 of file triangle_nco_rule.c.

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

◆ triangle_nco_suborder()

int* triangle_nco_suborder ( int  rule,
int  suborder_num 
)

Definition at line 787 of file triangle_nco_rule.c.

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

◆ triangle_nco_suborder_num()

int triangle_nco_suborder_num ( int  rule)

Definition at line 908 of file triangle_nco_rule.c.

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

◆ triangle_nco_subrule()

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

Definition at line 994 of file triangle_nco_rule.c.

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

◆ triangle_nco_subrule_01()

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

Definition at line 1118 of file triangle_nco_rule.c.

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

◆ triangle_nco_subrule_02()

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

Definition at line 1191 of file triangle_nco_rule.c.

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

◆ triangle_nco_subrule_03()

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

Definition at line 1264 of file triangle_nco_rule.c.

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

◆ triangle_nco_subrule_04()

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

Definition at line 1338 of file triangle_nco_rule.c.

1382 {
1383  int i;
1384  int s;
1385  int suborder_xyz_n_04[3*3] = {
1386  3, 0, 0,
1387  2, 1, 0,
1388  1, 1, 1
1389  };
1390  int suborder_xyz_d_04 = 3;
1391  int suborder_w_n_04[3] = { 8, 3, -12 };
1392  int suborder_w_d_04 = 30;
1393 
1394  for ( s = 0; s < suborder_num; s++ )
1395  {
1396  for ( i = 0; i < 3; i++ )
1397  {
1398  suborder_xyz_n[i+s*3] = suborder_xyz_n_04[i+s*3];
1399  }
1400  }
1401  *suborder_xyz_d = suborder_xyz_d_04;
1402 
1403  for ( s = 0; s < suborder_num; s++ )
1404  {
1405  suborder_w_n[s] = suborder_w_n_04[s];
1406  }
1407  *suborder_w_d = suborder_w_d_04;
1408 
1409  return;
1410 }

◆ triangle_nco_subrule_05()

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

Definition at line 1413 of file triangle_nco_rule.c.

1457 {
1458  int i;
1459  int s;
1460  int suborder_xyz_n_05[3*4] = {
1461  4, 0, 0,
1462  3, 1, 0,
1463  2, 2, 0,
1464  2, 1, 1
1465  };
1466  int suborder_xyz_d_05 = 4;
1467  int suborder_w_n_05[4] = { 307, -316, 629, -64 };
1468  int suborder_w_d_05 = 720;
1469 
1470  for ( s = 0; s < suborder_num; s++ )
1471  {
1472  for ( i = 0; i < 3; i++ )
1473  {
1474  suborder_xyz_n[i+s*3] = suborder_xyz_n_05[i+s*3];
1475  }
1476  }
1477  *suborder_xyz_d = suborder_xyz_d_05;
1478 
1479  for ( s = 0; s < suborder_num; s++ )
1480  {
1481  suborder_w_n[s] = suborder_w_n_05[s];
1482  }
1483  *suborder_w_d = suborder_w_d_05;
1484 
1485  return;
1486 }

◆ triangle_nco_subrule_06()

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

Definition at line 1489 of file triangle_nco_rule.c.

1533 {
1534  int i;
1535  int s;
1536  int suborder_xyz_n_06[3*5] = {
1537  5, 0, 0,
1538  4, 1, 0,
1539  3, 2, 0,
1540  3, 1, 1,
1541  2, 2, 1
1542  };
1543  int suborder_xyz_d_06 = 5;
1544  int suborder_w_n_06[5] = { 71, -13, 57, -167, 113 };
1545  int suborder_w_d_06 = 315;
1546 
1547  for ( s = 0; s < suborder_num; s++ )
1548  {
1549  for ( i = 0; i < 3; i++ )
1550  {
1551  suborder_xyz_n[i+s*3] = suborder_xyz_n_06[i+s*3];
1552  }
1553  }
1554  *suborder_xyz_d = suborder_xyz_d_06;
1555 
1556  for ( s = 0; s < suborder_num; s++ )
1557  {
1558  suborder_w_n[s] = suborder_w_n_06[s];
1559  }
1560  *suborder_w_d = suborder_w_d_06;
1561 
1562  return;
1563 }

◆ triangle_nco_subrule_07()

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

Definition at line 1566 of file triangle_nco_rule.c.

1610 {
1611  int i;
1612  int s;
1613  int suborder_xyz_n_07[3*7] = {
1614  6, 0, 0,
1615  5, 1, 0,
1616  4, 2, 0,
1617  4, 1, 1,
1618  3, 3, 0,
1619  3, 2, 1,
1620  2, 2, 2
1621  };
1622  int suborder_xyz_d_07 = 6;
1623  int suborder_w_n_07[7] = { 767, -1257, 2901, 387, -3035, -915, 3509 };
1624  int suborder_w_d_07 = 2240;
1625 
1626  for ( s = 0; s < suborder_num; s++ )
1627  {
1628  for ( i = 0; i < 3; i++ )
1629  {
1630  suborder_xyz_n[i+s*3] = suborder_xyz_n_07[i+s*3];
1631  }
1632  }
1633  *suborder_xyz_d = suborder_xyz_d_07;
1634 
1635  for ( s = 0; s < suborder_num; s++ )
1636  {
1637  suborder_w_n[s] = suborder_w_n_07[s];
1638  }
1639  *suborder_w_d = suborder_w_d_07;
1640 
1641  return;
1642 }

◆ triangle_nco_subrule_08()

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

Definition at line 1645 of file triangle_nco_rule.c.

1689 {
1690  int i;
1691  int s;
1692  int suborder_xyz_n_08[3*8] = {
1693  7, 0, 0,
1694  6, 1, 0,
1695  5, 2, 0,
1696  5, 1, 1,
1697  4, 3, 0,
1698  4, 2, 1,
1699  3, 3, 1,
1700  3, 2, 2
1701  };
1702  int suborder_xyz_d_08 = 7;
1703  int suborder_w_n_08[8] = { 898, -662, 1573, -2522, -191, 2989, -5726, 1444 };
1704  int suborder_w_d_08 = 4536;
1705 
1706  for ( s = 0; s < suborder_num; s++ )
1707  {
1708  for ( i = 0; i < 3; i++ )
1709  {
1710  suborder_xyz_n[i+s*3] = suborder_xyz_n_08[i+s*3];
1711  }
1712  }
1713  *suborder_xyz_d = suborder_xyz_d_08;
1714 
1715  for ( s = 0; s < suborder_num; s++ )
1716  {
1717  suborder_w_n[s] = suborder_w_n_08[s];
1718  }
1719  *suborder_w_d = suborder_w_d_08;
1720 
1721  return;
1722 }

◆ triangle_nco_subrule_09()

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

Definition at line 1725 of file triangle_nco_rule.c.

1769 {
1770  int i;
1771  int s;
1772  int suborder_xyz_n_09[3*10] = {
1773  8, 0, 0,
1774  7, 1, 0,
1775  6, 2, 0,
1776  6, 1, 1,
1777  5, 3, 0,
1778  5, 2, 1,
1779  4, 4, 0,
1780  4, 3, 1,
1781  4, 2, 2,
1782  3, 3, 2
1783  };
1784  int suborder_xyz_d_09 = 8;
1785  int suborder_w_n_09[10] = {
1786  1051445, -2366706, 6493915, 1818134, -9986439,-3757007, 12368047,
1787  478257, 10685542, -6437608 };
1788  int suborder_w_d_09 = 3628800;
1789 
1790  for ( s = 0; s < suborder_num; s++ )
1791  {
1792  for ( i = 0; i < 3; i++ )
1793  {
1794  suborder_xyz_n[i+s*3] = suborder_xyz_n_09[i+s*3];
1795  }
1796  }
1797  *suborder_xyz_d = suborder_xyz_d_09;
1798 
1799  for ( s = 0; s < suborder_num; s++ )
1800  {
1801  suborder_w_n[s] = suborder_w_n_09[s];
1802  }
1803  *suborder_w_d = suborder_w_d_09;
1804 
1805  return;
1806 }
i4_modp
int i4_modp(int i, int j)
Definition: triangle_nco_rule.c:88
triangle_nco_subrule_04
void triangle_nco_subrule_04(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_nco_rule.c:1338
triangle_nco_subrule_01
void triangle_nco_subrule_01(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_nco_rule.c:1118
order
constexpr int order
Definition: dg_projection.cpp:18
triangle_nco_suborder_num
int triangle_nco_suborder_num(int rule)
Definition: triangle_nco_rule.c:908
double
triangle_nco_suborder
int * triangle_nco_suborder(int rule, int suborder_num)
Definition: triangle_nco_rule.c:787
triangle_nco_subrule_02
void triangle_nco_subrule_02(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_nco_rule.c:1191
triangle_nco_subrule_05
void triangle_nco_subrule_05(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_nco_rule.c:1413
t
constexpr double t
plate stiffness
Definition: plate.cpp:58
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
triangle_nco_subrule_09
void triangle_nco_subrule_09(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_nco_rule.c:1725
convert.n
n
Definition: convert.py:82
triangle_nco_subrule
void triangle_nco_subrule(int rule, int suborder_num, double suborder_xyz[], double suborder_w[])
Definition: triangle_nco_rule.c:994
triangle_nco_subrule_03
void triangle_nco_subrule_03(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_nco_rule.c:1264
i4_wrap
int i4_wrap(int ival, int ilo, int ihi)
Definition: triangle_nco_rule.c:165
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
sdf_wavy_2d.w
int w
Definition: sdf_wavy_2d.py:6
triangle_nco_subrule_08
void triangle_nco_subrule_08(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_nco_rule.c:1645
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
convert.int
int
Definition: convert.py:64
triangle_nco_subrule_07
void triangle_nco_subrule_07(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_nco_rule.c:1566
triangle_nco_subrule_06
void triangle_nco_subrule_06(int suborder_num, int suborder_xyz_n[], int *suborder_xyz_d, int suborder_w_n[], int *suborder_w_d)
Definition: triangle_nco_rule.c:1489