v0.9.0
Functions
triangle_nco_rule.h File Reference

Go to the source code of this file.

Functions

int i4_max (int i1, int i2)
 
int i4_min (int i1, int i2)
 
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[])
 
void timestamp ()
 
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 ()
 
inttriangle_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_max()

int i4_max ( int  i1,
int  i2 
)

Definition at line 459 of file gm_rule.c.

485 {
486  int value;
487 
488  if ( i2 < i1 )
489  {
490  value = i1;
491  }
492  else
493  {
494  value = i2;
495  }
496  return value;
497 }

◆ i4_min()

int i4_min ( int  i1,
int  i2 
)

Definition at line 500 of file gm_rule.c.

526 {
527  int value;
528 
529  if ( i1 < i2 )
530  {
531  value = i1;
532  }
533  else
534  {
535  value = i2;
536  }
537  return value;
538 }

◆ i4_modp()

int i4_modp ( int  i,
int  j 
)

Definition at line 94 of file triangle_ncc_rule.c.

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

◆ i4_wrap()

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

Definition at line 171 of file triangle_ncc_rule.c.

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

◆ r8_huge()

double r8_huge ( )

Definition at line 255 of file triangle_ncc_rule.c.

286 {
287  double value;
288 
289  value = 1.0E+30;
290 
291  return value;
292 }

◆ r8_nint()

int r8_nint ( double  x)

Definition at line 295 of file triangle_ncc_rule.c.

334 {
335  int s;
336  int value;
337 
338  if ( x < 0.0 )
339  {
340  s = - 1;
341  }
342  else
343  {
344  s = + 1;
345  }
346  value = s * ( int ) ( fabs ( x ) + 0.5 );
347 
348  return value;
349 }

◆ reference_to_physical_t3()

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

Definition at line 352 of file triangle_ncc_rule.c.

411 {
412  int i;
413  int j;
414 
415  for ( i = 0; i < 2; i++ )
416  {
417  for ( j = 0; j < n; j++ )
418  {
419  phy[i+j*2] = t[i+0*2] * ( 1.0 - ref[0+j*2] - ref[1+j*2] )
420  + t[i+1*2] * + ref[0+j*2]
421  + t[i+2*2] * + ref[1+j*2];
422  }
423  }
424 
425  return;
426 }

◆ timestamp()

void timestamp ( )

Definition at line 1268 of file gm_rule.c.

1296 {
1297 # define TIME_SIZE 40
1298 
1299  static char time_buffer[TIME_SIZE];
1300  const struct tm *tm;
1301  size_t len;
1302  time_t now;
1303 
1304  (void)(len);
1305 
1306  now = time ( NULL );
1307  tm = localtime ( &now );
1308 
1309  len = strftime ( time_buffer, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm );
1310 
1311  fprintf ( stdout, "%s\n", time_buffer );
1312 
1313  return;
1314 # undef TIME_SIZE
1315 }
#define TIME_SIZE

◆ triangle_area()

double triangle_area ( double  t[2 *3])

Definition at line 477 of file triangle_ncc_rule.c.

516 {
517  double area;
518 
519  area = 0.5 * (
520  t[0+0*2] * ( t[1+1*2] - t[1+2*2] ) +
521  t[0+1*2] * ( t[1+2*2] - t[1+0*2] ) +
522  t[0+2*2] * ( t[1+0*2] - t[1+1*2] ) );
523 
524  return area;
525 }

◆ triangle_nco_degree()

int triangle_nco_degree ( int  rule)

Definition at line 526 of file triangle_nco_rule.c.

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

◆ triangle_nco_order_num()

int triangle_nco_order_num ( int  rule)

Definition at line 580 of file triangle_nco_rule.c.

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

◆ triangle_nco_rule()

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

Definition at line 636 of file triangle_nco_rule.c.

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

◆ triangle_nco_rule_num()

int triangle_nco_rule_num ( )

Definition at line 751 of file triangle_nco_rule.c.

782 {
783  int rule_num;
784 
785  rule_num = 9;
786 
787  return rule_num;
788 }

◆ triangle_nco_suborder()

int* triangle_nco_suborder ( int  rule,
int  suborder_num 
)

Definition at line 791 of file triangle_nco_rule.c.

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

◆ triangle_nco_suborder_num()

int triangle_nco_suborder_num ( int  rule)

Definition at line 912 of file triangle_nco_rule.c.

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

◆ triangle_nco_subrule()

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

Definition at line 998 of file triangle_nco_rule.c.

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

◆ 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 1122 of file triangle_nco_rule.c.

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

◆ 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 1195 of file triangle_nco_rule.c.

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

◆ 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 1268 of file triangle_nco_rule.c.

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

◆ 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 1342 of file triangle_nco_rule.c.

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

◆ 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 1417 of file triangle_nco_rule.c.

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

◆ 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 1493 of file triangle_nco_rule.c.

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

◆ 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 1570 of file triangle_nco_rule.c.

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

◆ 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 1649 of file triangle_nco_rule.c.

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

◆ 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 1729 of file triangle_nco_rule.c.

1773 {
1774  int i;
1775  int s;
1776  int suborder_xyz_n_09[3*10] = {
1777  8, 0, 0,
1778  7, 1, 0,
1779  6, 2, 0,
1780  6, 1, 1,
1781  5, 3, 0,
1782  5, 2, 1,
1783  4, 4, 0,
1784  4, 3, 1,
1785  4, 2, 2,
1786  3, 3, 2
1787  };
1788  int suborder_xyz_d_09 = 8;
1789  int suborder_w_n_09[10] = {
1790  1051445, -2366706, 6493915, 1818134, -9986439,-3757007, 12368047,
1791  478257, 10685542, -6437608 };
1792  int suborder_w_d_09 = 3628800;
1793 
1794  for ( s = 0; s < suborder_num; s++ )
1795  {
1796  for ( i = 0; i < 3; i++ )
1797  {
1798  suborder_xyz_n[i+s*3] = suborder_xyz_n_09[i+s*3];
1799  }
1800  }
1801  *suborder_xyz_d = suborder_xyz_d_09;
1802 
1803  for ( s = 0; s < suborder_num; s++ )
1804  {
1805  suborder_w_n[s] = suborder_w_n_09[s];
1806  }
1807  *suborder_w_d = suborder_w_d_09;
1808 
1809  return;
1810 }