v0.9.0
Functions
triangle_ncc_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_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 ()
 
inttriangle_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_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_ncc_degree()

int triangle_ncc_degree ( int  rule)

Definition at line 528 of file triangle_ncc_rule.c.

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

◆ triangle_ncc_order_num()

int triangle_ncc_order_num ( int  rule)

Definition at line 582 of file triangle_ncc_rule.c.

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

◆ triangle_ncc_rule()

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

Definition at line 638 of file triangle_ncc_rule.c.

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

◆ triangle_ncc_rule_num()

int triangle_ncc_rule_num ( )

Definition at line 753 of file triangle_ncc_rule.c.

784 {
785  int rule_num;
786 
787  rule_num = 9;
788 
789  return rule_num;
790 }

◆ triangle_ncc_suborder()

int* triangle_ncc_suborder ( int  rule,
int  suborder_num 
)

Definition at line 793 of file triangle_ncc_rule.c.

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

◆ triangle_ncc_suborder_num()

int triangle_ncc_suborder_num ( int  rule)

Definition at line 910 of file triangle_ncc_rule.c.

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

◆ triangle_ncc_subrule()

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

Definition at line 996 of file triangle_ncc_rule.c.

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

◆ 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 1120 of file triangle_ncc_rule.c.

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

◆ 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 1193 of file triangle_ncc_rule.c.

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

◆ 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 1266 of file triangle_ncc_rule.c.

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

◆ 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 1339 of file triangle_ncc_rule.c.

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

◆ 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 1414 of file triangle_ncc_rule.c.

1458 {
1459  int i;
1460  int s;
1461  int suborder_xyz_n_05[3*3] = {
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[3] = { 4, -1, 8 };
1468  int suborder_w_d_05 = 45;
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_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 1489 of file triangle_ncc_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] = { 11, 25, 25, 200, 25 };
1545  int suborder_w_d_06 = 1008;
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_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 1566 of file triangle_ncc_rule.c.

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

◆ 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 1644 of file triangle_ncc_rule.c.

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

◆ 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 1724 of file triangle_ncc_rule.c.

1768 {
1769  int i;
1770  int s;
1771  int suborder_xyz_n_09[3*9] = {
1772  7, 1, 0,
1773  6, 2, 0,
1774  6, 1, 1,
1775  5, 3, 0,
1776  5, 2, 1,
1777  4, 4, 0,
1778  4, 3, 1,
1779  4, 2, 2,
1780  3, 3, 2
1781  };
1782  int suborder_xyz_d_09 = 8;
1783  int suborder_w_n_09[9] = {
1784  368, -468, 704, 1136, 832, -1083, 672, -1448, 1472 };
1785  int suborder_w_d_09 = 14175;
1786 
1787  for ( s = 0; s < suborder_num; s++ )
1788  {
1789  for ( i = 0; i < 3; i++ )
1790  {
1791  suborder_xyz_n[i+s*3] = suborder_xyz_n_09[i+s*3];
1792  }
1793  }
1794  *suborder_xyz_d = suborder_xyz_d_09;
1795 
1796  for ( s = 0; s < suborder_num; s++ )
1797  {
1798  suborder_w_n[s] = suborder_w_n_09[s];
1799  }
1800  *suborder_w_d = suborder_w_d_09;
1801 
1802  return;
1803 }