~johan-hake/dolfin/dolfin-logger

« back to all changes in this revision

Viewing changes to demo/undocumented/conditional/cpp/Conditional.h

  • Committer: Anders Logg
  • Date: 2011-05-01 22:01:45 UTC
  • mfrom: (5839.1.29 dolfin-all)
  • Revision ID: logg@simula.no-20110501220145-60ys4e77qbc0mq32
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
711
711
      // Tables of derivatives of the polynomial base (transpose).
712
712
      static const double dmats0[6][6] = \
713
713
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
714
 
      {4.898979485566355, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
714
      {4.898979485566354, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
715
715
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
716
716
      {0.000000000000000, 9.486832980505138, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
717
 
      {3.999999999999999, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
717
      {3.999999999999997, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
718
718
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
719
719
      
720
720
      static const double dmats1[6][6] = \
721
721
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
722
722
      {2.449489742783177, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
723
723
      {4.242640687119285, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
724
 
      {2.581988897471611, 4.743416490252570, -0.912870929175278, 0.000000000000000, 0.000000000000000, 0.000000000000000},
725
 
      {1.999999999999999, 6.123724356957944, 3.535533905932737, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
724
      {2.581988897471611, 4.743416490252569, -0.912870929175277, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
725
      {1.999999999999998, 6.123724356957944, 3.535533905932738, 0.000000000000000, 0.000000000000000, 0.000000000000000},
726
726
      {-2.309401076758502, 0.000000000000000, 8.164965809277259, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
727
727
      
728
728
      // Compute reference derivatives.
908
908
      // Tables of derivatives of the polynomial base (transpose).
909
909
      static const double dmats0[6][6] = \
910
910
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
911
 
      {4.898979485566355, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
911
      {4.898979485566354, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
912
912
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
913
913
      {0.000000000000000, 9.486832980505138, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
914
 
      {3.999999999999999, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
914
      {3.999999999999997, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
915
915
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
916
916
      
917
917
      static const double dmats1[6][6] = \
918
918
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
919
919
      {2.449489742783177, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
920
920
      {4.242640687119285, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
921
 
      {2.581988897471611, 4.743416490252570, -0.912870929175278, 0.000000000000000, 0.000000000000000, 0.000000000000000},
922
 
      {1.999999999999999, 6.123724356957944, 3.535533905932737, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
921
      {2.581988897471611, 4.743416490252569, -0.912870929175277, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
922
      {1.999999999999998, 6.123724356957944, 3.535533905932738, 0.000000000000000, 0.000000000000000, 0.000000000000000},
923
923
      {-2.309401076758502, 0.000000000000000, 8.164965809277259, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
924
924
      
925
925
      // Compute reference derivatives.
1105
1105
      // Tables of derivatives of the polynomial base (transpose).
1106
1106
      static const double dmats0[6][6] = \
1107
1107
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1108
 
      {4.898979485566355, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1108
      {4.898979485566354, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1109
1109
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1110
1110
      {0.000000000000000, 9.486832980505138, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1111
 
      {3.999999999999999, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1111
      {3.999999999999997, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1112
1112
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
1113
1113
      
1114
1114
      static const double dmats1[6][6] = \
1115
1115
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1116
1116
      {2.449489742783177, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1117
1117
      {4.242640687119285, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1118
 
      {2.581988897471611, 4.743416490252570, -0.912870929175278, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1119
 
      {1.999999999999999, 6.123724356957944, 3.535533905932737, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1118
      {2.581988897471611, 4.743416490252569, -0.912870929175277, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1119
      {1.999999999999998, 6.123724356957944, 3.535533905932738, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1120
1120
      {-2.309401076758502, 0.000000000000000, 8.164965809277259, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
1121
1121
      
1122
1122
      // Compute reference derivatives.
1302
1302
      // Tables of derivatives of the polynomial base (transpose).
1303
1303
      static const double dmats0[6][6] = \
1304
1304
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1305
 
      {4.898979485566355, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1305
      {4.898979485566354, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1306
1306
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1307
1307
      {0.000000000000000, 9.486832980505138, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1308
 
      {3.999999999999999, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1308
      {3.999999999999997, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1309
1309
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
1310
1310
      
1311
1311
      static const double dmats1[6][6] = \
1312
1312
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1313
1313
      {2.449489742783177, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1314
1314
      {4.242640687119285, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1315
 
      {2.581988897471611, 4.743416490252570, -0.912870929175278, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1316
 
      {1.999999999999999, 6.123724356957944, 3.535533905932737, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1315
      {2.581988897471611, 4.743416490252569, -0.912870929175277, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1316
      {1.999999999999998, 6.123724356957944, 3.535533905932738, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1317
1317
      {-2.309401076758502, 0.000000000000000, 8.164965809277259, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
1318
1318
      
1319
1319
      // Compute reference derivatives.
1499
1499
      // Tables of derivatives of the polynomial base (transpose).
1500
1500
      static const double dmats0[6][6] = \
1501
1501
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1502
 
      {4.898979485566355, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1502
      {4.898979485566354, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1503
1503
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1504
1504
      {0.000000000000000, 9.486832980505138, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1505
 
      {3.999999999999999, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1505
      {3.999999999999997, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1506
1506
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
1507
1507
      
1508
1508
      static const double dmats1[6][6] = \
1509
1509
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1510
1510
      {2.449489742783177, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1511
1511
      {4.242640687119285, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1512
 
      {2.581988897471611, 4.743416490252570, -0.912870929175278, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1513
 
      {1.999999999999999, 6.123724356957944, 3.535533905932737, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1512
      {2.581988897471611, 4.743416490252569, -0.912870929175277, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1513
      {1.999999999999998, 6.123724356957944, 3.535533905932738, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1514
1514
      {-2.309401076758502, 0.000000000000000, 8.164965809277259, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
1515
1515
      
1516
1516
      // Compute reference derivatives.
1696
1696
      // Tables of derivatives of the polynomial base (transpose).
1697
1697
      static const double dmats0[6][6] = \
1698
1698
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1699
 
      {4.898979485566355, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1699
      {4.898979485566354, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1700
1700
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1701
1701
      {0.000000000000000, 9.486832980505138, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1702
 
      {3.999999999999999, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1702
      {3.999999999999997, 0.000000000000000, 7.071067811865476, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1703
1703
      {0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
1704
1704
      
1705
1705
      static const double dmats1[6][6] = \
1706
1706
      {{0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1707
1707
      {2.449489742783177, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1708
1708
      {4.242640687119285, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1709
 
      {2.581988897471611, 4.743416490252570, -0.912870929175278, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1710
 
      {1.999999999999999, 6.123724356957944, 3.535533905932737, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1709
      {2.581988897471611, 4.743416490252569, -0.912870929175277, 0.000000000000000, 0.000000000000000, 0.000000000000000},
 
1710
      {1.999999999999998, 6.123724356957944, 3.535533905932738, 0.000000000000000, 0.000000000000000, 0.000000000000000},
1711
1711
      {-2.309401076758502, 0.000000000000000, 8.164965809277259, 0.000000000000000, 0.000000000000000, 0.000000000000000}};
1712
1712
      
1713
1713
      // Compute reference derivatives.
2373
2373
    const double G0_1_1 = det*(K_10*K_10 + K_11*K_11);
2374
2374
    
2375
2375
    // Compute element tensor
2376
 
    A[0] = 0.499999999999999*G0_0_0 + 0.499999999999999*G0_0_1 + 0.499999999999999*G0_1_0 + 0.499999999999999*G0_1_1;
2377
 
    A[1] = 0.166666666666666*G0_0_0 + 0.166666666666667*G0_1_0;
2378
 
    A[2] = 0.166666666666666*G0_0_1 + 0.166666666666666*G0_1_1;
 
2376
    A[0] = 0.500000000000000*G0_0_0 + 0.500000000000000*G0_0_1 + 0.500000000000000*G0_1_0 + 0.500000000000000*G0_1_1;
 
2377
    A[1] = 0.166666666666667*G0_0_0 + 0.166666666666667*G0_1_0;
 
2378
    A[2] = 0.166666666666667*G0_0_1 + 0.166666666666667*G0_1_1;
2379
2379
    A[3] = 0.000000000000000;
2380
 
    A[4] = -0.666666666666665*G0_0_1 - 0.666666666666665*G0_1_1;
2381
 
    A[5] = -0.666666666666666*G0_0_0 - 0.666666666666666*G0_1_0;
2382
 
    A[6] = 0.166666666666666*G0_0_0 + 0.166666666666667*G0_0_1;
2383
 
    A[7] = 0.499999999999999*G0_0_0;
2384
 
    A[8] = -0.166666666666666*G0_0_1;
2385
 
    A[9] = 0.666666666666665*G0_0_1;
 
2380
    A[4] = -0.666666666666667*G0_0_1 - 0.666666666666667*G0_1_1;
 
2381
    A[5] = -0.666666666666667*G0_0_0 - 0.666666666666667*G0_1_0;
 
2382
    A[6] = 0.166666666666667*G0_0_0 + 0.166666666666667*G0_0_1;
 
2383
    A[7] = 0.500000000000000*G0_0_0;
 
2384
    A[8] = -0.166666666666667*G0_0_1;
 
2385
    A[9] = 0.666666666666666*G0_0_1;
2386
2386
    A[10] = 0.000000000000000;
2387
 
    A[11] = -0.666666666666665*G0_0_0 - 0.666666666666665*G0_0_1;
2388
 
    A[12] = 0.166666666666666*G0_1_0 + 0.166666666666666*G0_1_1;
2389
 
    A[13] = -0.166666666666666*G0_1_0;
2390
 
    A[14] = 0.499999999999999*G0_1_1;
2391
 
    A[15] = 0.666666666666665*G0_1_0;
2392
 
    A[16] = -0.666666666666665*G0_1_0 - 0.666666666666665*G0_1_1;
 
2387
    A[11] = -0.666666666666667*G0_0_0 - 0.666666666666666*G0_0_1;
 
2388
    A[12] = 0.166666666666667*G0_1_0 + 0.166666666666667*G0_1_1;
 
2389
    A[13] = -0.166666666666667*G0_1_0;
 
2390
    A[14] = 0.500000000000000*G0_1_1;
 
2391
    A[15] = 0.666666666666666*G0_1_0;
 
2392
    A[16] = -0.666666666666666*G0_1_0 - 0.666666666666666*G0_1_1;
2393
2393
    A[17] = 0.000000000000000;
2394
2394
    A[18] = 0.000000000000000;
2395
 
    A[19] = 0.666666666666665*G0_1_0;
2396
 
    A[20] = 0.666666666666665*G0_0_1;
2397
 
    A[21] = 1.333333333333330*G0_0_0 + 0.666666666666665*G0_0_1 + 0.666666666666665*G0_1_0 + 1.333333333333330*G0_1_1;
2398
 
    A[22] = -1.333333333333330*G0_0_0 - 0.666666666666665*G0_0_1 - 0.666666666666665*G0_1_0;
2399
 
    A[23] = -0.666666666666665*G0_0_1 - 0.666666666666665*G0_1_0 - 1.333333333333330*G0_1_1;
2400
 
    A[24] = -0.666666666666665*G0_1_0 - 0.666666666666665*G0_1_1;
 
2395
    A[19] = 0.666666666666666*G0_1_0;
 
2396
    A[20] = 0.666666666666666*G0_0_1;
 
2397
    A[21] = 1.333333333333332*G0_0_0 + 0.666666666666665*G0_0_1 + 0.666666666666665*G0_1_0 + 1.333333333333331*G0_1_1;
 
2398
    A[22] = -1.333333333333332*G0_0_0 - 0.666666666666666*G0_0_1 - 0.666666666666665*G0_1_0;
 
2399
    A[23] = -0.666666666666666*G0_0_1 - 0.666666666666666*G0_1_0 - 1.333333333333332*G0_1_1;
 
2400
    A[24] = -0.666666666666667*G0_1_0 - 0.666666666666667*G0_1_1;
2401
2401
    A[25] = 0.000000000000000;
2402
 
    A[26] = -0.666666666666666*G0_0_1 - 0.666666666666665*G0_1_1;
2403
 
    A[27] = -1.333333333333330*G0_0_0 - 0.666666666666665*G0_0_1 - 0.666666666666665*G0_1_0;
2404
 
    A[28] = 1.333333333333331*G0_0_0 + 0.666666666666666*G0_0_1 + 0.666666666666666*G0_1_0 + 1.333333333333331*G0_1_1;
2405
 
    A[29] = 0.666666666666665*G0_0_1 + 0.666666666666665*G0_1_0;
2406
 
    A[30] = -0.666666666666666*G0_0_0 - 0.666666666666666*G0_0_1;
2407
 
    A[31] = -0.666666666666665*G0_0_0 - 0.666666666666665*G0_1_0;
 
2402
    A[26] = -0.666666666666666*G0_0_1 - 0.666666666666666*G0_1_1;
 
2403
    A[27] = -1.333333333333332*G0_0_0 - 0.666666666666665*G0_0_1 - 0.666666666666666*G0_1_0;
 
2404
    A[28] = 1.333333333333332*G0_0_0 + 0.666666666666666*G0_0_1 + 0.666666666666666*G0_1_0 + 1.333333333333333*G0_1_1;
 
2405
    A[29] = 0.666666666666666*G0_0_1 + 0.666666666666667*G0_1_0;
 
2406
    A[30] = -0.666666666666667*G0_0_0 - 0.666666666666667*G0_0_1;
 
2407
    A[31] = -0.666666666666666*G0_0_0 - 0.666666666666666*G0_1_0;
2408
2408
    A[32] = 0.000000000000000;
2409
 
    A[33] = -0.666666666666665*G0_0_1 - 0.666666666666665*G0_1_0 - 1.333333333333330*G0_1_1;
2410
 
    A[34] = 0.666666666666665*G0_0_1 + 0.666666666666665*G0_1_0;
2411
 
    A[35] = 1.333333333333331*G0_0_0 + 0.666666666666665*G0_0_1 + 0.666666666666665*G0_1_0 + 1.333333333333330*G0_1_1;
 
2409
    A[33] = -0.666666666666666*G0_0_1 - 0.666666666666666*G0_1_0 - 1.333333333333332*G0_1_1;
 
2410
    A[34] = 0.666666666666667*G0_0_1 + 0.666666666666666*G0_1_0;
 
2411
    A[35] = 1.333333333333333*G0_0_0 + 0.666666666666666*G0_0_1 + 0.666666666666666*G0_1_0 + 1.333333333333332*G0_1_1;
2412
2412
  }
2413
2413
 
2414
2414
  /// Tabulate the tensor for the contribution from a local cell
2473
2473
    
2474
2474
    
2475
2475
    // Array of quadrature weights.
2476
 
    static const double W4[4] = {0.159020690871988, 0.090979309128011, 0.159020690871988, 0.090979309128011};
2477
 
    // Quadrature points on the UFC reference element: (0.178558728263616, 0.155051025721682), (0.075031110222608, 0.644948974278318), (0.666390246014701, 0.155051025721682), (0.280019915499074, 0.644948974278318)
 
2476
    static const double W3[3] = {0.166666666666667, 0.166666666666667, 0.166666666666667};
 
2477
    // Quadrature points on the UFC reference element: (0.166666666666667, 0.166666666666667), (0.166666666666667, 0.666666666666667), (0.666666666666667, 0.166666666666667)
2478
2478
    
2479
2479
    // Value of basis functions at quadrature points.
2480
 
    static const double FE0[4][6] = \
2481
 
    {{0.221761673952367, -0.114792289385376, -0.106969384566991, 0.110742855875331, 0.413297964702014, 0.475959179422654},
2482
 
    {-0.123197609346857, -0.063771775220134, 0.186969384566991, 0.193564950308138, 0.722394229114516, 0.084040820577346},
2483
 
    {-0.114792289385376, 0.221761673952367, -0.106969384566991, 0.413297964702014, 0.110742855875331, 0.475959179422654},
2484
 
    {-0.063771775220134, -0.123197609346857, 0.186969384566991, 0.722394229114516, 0.193564950308138, 0.084040820577346}};
 
2480
    static const double FE0[3][6] = \
 
2481
    {{0.222222222222222, -0.111111111111111, -0.111111111111111, 0.111111111111111, 0.444444444444444, 0.444444444444444},
 
2482
    {-0.111111111111111, -0.111111111111111, 0.222222222222222, 0.444444444444444, 0.444444444444444, 0.111111111111111},
 
2483
    {-0.111111111111111, 0.222222222222222, -0.111111111111111, 0.444444444444444, 0.111111111111111, 0.444444444444444}};
2485
2484
    
2486
 
    static const double FEA4_f0[4][3] = \
2487
 
    {{0.666390246014701, 0.178558728263616, 0.155051025721682},
2488
 
    {0.280019915499074, 0.075031110222608, 0.644948974278318},
2489
 
    {0.178558728263616, 0.666390246014701, 0.155051025721682},
2490
 
    {0.075031110222608, 0.280019915499074, 0.644948974278318}};
 
2485
    static const double FEA3_f0[3][3] = \
 
2486
    {{0.666666666666667, 0.166666666666667, 0.166666666666667},
 
2487
    {0.166666666666667, 0.166666666666667, 0.666666666666667},
 
2488
    {0.166666666666667, 0.666666666666667, 0.166666666666667}};
2491
2489
    
2492
2490
    // Reset values in the element tensor.
2493
2491
    for (unsigned int r = 0; r < 6; r++)
2501
2499
    // Loop quadrature points for integral.
2502
2500
    
2503
2501
    // Declare array to hold physical coordinate of quadrature point.
2504
 
    double X4[2];
2505
 
    // Number of operations to compute element tensor for following IP loop = 192
2506
 
    for (unsigned int ip = 0; ip < 4; ip++)
 
2502
    double X3[2];
 
2503
    // Number of operations to compute element tensor for following IP loop = 144
 
2504
    for (unsigned int ip = 0; ip < 3; ip++)
2507
2505
    {
2508
2506
      
2509
2507
      // Compute physical coordinate of quadrature point, operations: 10.
2510
 
      X4[0] = FEA4_f0[ip][0]*x[0][0] + FEA4_f0[ip][1]*x[1][0] + FEA4_f0[ip][2]*x[2][0];
2511
 
      X4[1] = FEA4_f0[ip][0]*x[0][1] + FEA4_f0[ip][1]*x[1][1] + FEA4_f0[ip][2]*x[2][1];
 
2508
      X3[0] = FEA3_f0[ip][0]*x[0][0] + FEA3_f0[ip][1]*x[1][0] + FEA3_f0[ip][2]*x[2][0];
 
2509
      X3[1] = FEA3_f0[ip][0]*x[0][1] + FEA3_f0[ip][1]*x[1][1] + FEA3_f0[ip][2]*x[2][1];
2512
2510
      double C[7];
2513
2511
      // Compute conditional, operations: 1.
2514
 
      C[0] = (X4[0] >= 0.550000000000000) ? -1.000000000000000 : 0.000000000000000;
2515
 
      // Compute conditional, operations: 1.
2516
 
      C[1] = (X4[0] <= 0.950000000000000) ? C[0] : 0.000000000000000;
2517
 
      // Compute conditional, operations: 1.
2518
 
      C[2] = (X4[1] >= 0.050000000000000) ? C[1] : 0.000000000000000;
2519
 
      // Compute conditional, operations: 1.
2520
 
      C[3] = (X4[1] <= 0.450000000000000) ? C[2] : 0.000000000000000;
 
2512
      C[0] = (X3[0] >= 0.550000000000000) ? -1.000000000000000 : 0.000000000000000;
 
2513
      // Compute conditional, operations: 1.
 
2514
      C[1] = (X3[0] <= 0.950000000000000) ? C[0] : 0.000000000000000;
 
2515
      // Compute conditional, operations: 1.
 
2516
      C[2] = (X3[1] >= 0.050000000000000) ? C[1] : 0.000000000000000;
 
2517
      // Compute conditional, operations: 1.
 
2518
      C[3] = (X3[1] <= 0.450000000000000) ? C[2] : 0.000000000000000;
2521
2519
      // Compute conditional, operations: 3.
2522
 
      C[4] = ((0.500000000000000 + X4[1] - X4[0]) >= 0.000000000000000) ? C[3] : 0.000000000000000;
2523
 
      // Compute conditional, operations: 8.
2524
 
      C[5] = (((X4[0]-0.330000000000000)*(X4[0]-0.330000000000000) + (X4[1]-0.670000000000000)*(X4[1]-0.670000000000000)) <= 0.015000000000000) ? -1.000000000000000 : 5.000000000000000;
2525
 
      // Compute conditional, operations: 8.
2526
 
      C[6] = (((X4[0]-0.330000000000000)*(X4[0]-0.330000000000000) + (X4[1]-0.670000000000000)*(X4[1]-0.670000000000000)) <= 0.025000000000000) ? C[5] : 0.000000000000000;
 
2520
      C[4] = ((0.500000000000000 + X3[1] - X3[0]) >= 0.000000000000000) ? C[3] : 0.000000000000000;
 
2521
      // Compute conditional, operations: 8.
 
2522
      C[5] = (((X3[0]-0.330000000000000)*(X3[0]-0.330000000000000) + (X3[1]-0.670000000000000)*(X3[1]-0.670000000000000)) <= 0.015000000000000) ? -1.000000000000000 : 5.000000000000000;
 
2523
      // Compute conditional, operations: 8.
 
2524
      C[6] = (((X3[0]-0.330000000000000)*(X3[0]-0.330000000000000) + (X3[1]-0.670000000000000)*(X3[1]-0.670000000000000)) <= 0.025000000000000) ? C[5] : 0.000000000000000;
2527
2525
      
2528
2526
      // Number of operations to compute ip constants: 3
2529
2527
      double I[1];
2530
2528
      // Number of operations: 3
2531
 
      I[0] = W4[ip]*det*(C[4] + C[6]);
 
2529
      I[0] = W3[ip]*det*(C[4] + C[6]);
2532
2530
      
2533
2531
      
2534
2532
      // Number of operations for primary indices: 12
2724
2722
  /// Return a string identifying the form
2725
2723
  virtual const char* signature() const
2726
2724
  {
2727
 
    return "Form([Integral(Product(Argument(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 0), Sum(Conditional(GE(Sum(FloatValue(0.55000000000000004, (), (), {}), Sum(FloatValue(-0.050000000000000003, (), (), {}), Sum(Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(1),), {FixedIndex(1): 2})), Product(IntValue(-1, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(0),), {FixedIndex(0): 2})))))), Zero((), (), {})), Conditional(LE(Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(1),), {FixedIndex(1): 2})), FloatValue(0.45000000000000001, (), (), {})), Conditional(GE(Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(1),), {FixedIndex(1): 2})), FloatValue(0.050000000000000003, (), (), {})), Conditional(LE(Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(0),), {FixedIndex(0): 2})), FloatValue(0.94999999999999996, (), (), {})), Conditional(GE(Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(0),), {FixedIndex(0): 2})), FloatValue(0.55000000000000004, (), (), {})), FloatValue(-1.0, (), (), {}), Zero((), (), {})), Zero((), (), {})), Zero((), (), {})), Zero((), (), {})), Zero((), (), {})), Conditional(LE(Sum(Power(Sum(FloatValue(-0.33000000000000002, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(0),), {FixedIndex(0): 2}))), IntValue(2, (), (), {})), Power(Sum(FloatValue(-0.67000000000000004, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(1),), {FixedIndex(1): 2}))), IntValue(2, (), (), {}))), FloatValue(0.025000000000000001, (), (), {})), Conditional(LE(Sum(Power(Sum(FloatValue(-0.33000000000000002, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(0),), {FixedIndex(0): 2}))), IntValue(2, (), (), {})), Power(Sum(FloatValue(-0.67000000000000004, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(1),), {FixedIndex(1): 2}))), IntValue(2, (), (), {}))), FloatValue(0.014999999999999999, (), (), {})), FloatValue(-1.0, (), (), {}), FloatValue(5.0, (), (), {})), Zero((), (), {})))), Measure('cell', 0, None))])";
 
2725
    return "Form([Integral(Product(Argument(FiniteElement('Lagrange', Cell('triangle', 1, Space(2)), 2), 0), Sum(Conditional(GE(Sum(FloatValue(0.55, (), (), {}), Sum(FloatValue(-0.05, (), (), {}), Sum(Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(1),), {FixedIndex(1): 2})), Product(IntValue(-1, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(0),), {FixedIndex(0): 2})))))), Zero((), (), {})), Conditional(LE(Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(1),), {FixedIndex(1): 2})), FloatValue(0.45, (), (), {})), Conditional(GE(Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(1),), {FixedIndex(1): 2})), FloatValue(0.05, (), (), {})), Conditional(LE(Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(0),), {FixedIndex(0): 2})), FloatValue(0.95, (), (), {})), Conditional(GE(Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(0),), {FixedIndex(0): 2})), FloatValue(0.55, (), (), {})), FloatValue(-1.0, (), (), {}), Zero((), (), {})), Zero((), (), {})), Zero((), (), {})), Zero((), (), {})), Zero((), (), {})), Conditional(LE(Sum(Power(Sum(FloatValue(-0.33, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(0),), {FixedIndex(0): 2}))), IntValue(2, (), (), {})), Power(Sum(FloatValue(-0.67, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(1),), {FixedIndex(1): 2}))), IntValue(2, (), (), {}))), FloatValue(0.025, (), (), {})), Conditional(LE(Sum(Power(Sum(FloatValue(-0.33, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(0),), {FixedIndex(0): 2}))), IntValue(2, (), (), {})), Power(Sum(FloatValue(-0.67, (), (), {}), Indexed(SpatialCoordinate(Cell('triangle', 1, Space(2))), MultiIndex((FixedIndex(1),), {FixedIndex(1): 2}))), IntValue(2, (), (), {}))), FloatValue(0.015, (), (), {})), FloatValue(-1.0, (), (), {}), FloatValue(5.0, (), (), {})), Zero((), (), {})))), Measure('cell', 0, None))])";
2728
2726
  }
2729
2727
 
2730
2728
  /// Return the rank of the global tensor (r)