2 #include "libmesh/libmesh.h" 
    3 #include "libmesh/replicated_mesh.h" 
    4 #include "libmesh/mesh_generation.h" 
    5 #include "libmesh/inf_elem_builder.h" 
    6 #include "libmesh/fe_type.h" 
    7 #include "libmesh/quadrature_gauss.h" 
    8 #include "libmesh/elem.h" 
    9 #include "libmesh/inf_fe.h" 
   36   CPPUNIT_TEST( testDifferentOrders );
 
   37   CPPUNIT_TEST_SUITE_END();
 
   43       : i(i_in), qp(qp_in), val(val_in) {}
 
   52       : i(i_in), qp(qp_in), grad(grad_in) {}
 
   60   typedef std::pair<Order, FEFamily> 
KeyType;
 
   88 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 
  112     if (!infinite_elem || !infinite_elem->
infinite())
 
  113       libmesh_error_msg(
"Error setting Elem pointer.");
 
  127     inf_fe->attach_quadrature_rule(&qrule);
 
  128     const std::vector<std::vector<Real>> & phi = inf_fe->get_phi();
 
  129     const std::vector<std::vector<RealGradient>> & dphi = inf_fe->get_dphi();
 
  132     inf_fe->reinit(infinite_elem);
 
  169       tabulated_vals[std::make_pair(radial_order, radial_family)];
 
  171       tabulated_grads[std::make_pair(radial_order, radial_family)];
 
  175     for (
const auto & t : val_table)
 
  176       LIBMESH_ASSERT_FP_EQUAL(t.val, phi[t.i][t.qp], 1.e-4);
 
  177     for (
const auto & t : grad_table)
 
  178       LIBMESH_ASSERT_FP_EQUAL(0., (dphi[t.i][t.qp] - t.grad).norm_sq(), 1.e-4);
 
  181     if (val_table.empty())
 
  182       libmesh_error_msg(
"No tabulated values found!");
 
  183     if (grad_table.empty())
 
  184       libmesh_error_msg(
"No tabulated gradients found!");
 
  186 #endif // LIBMESH_ENABLE_INFINITE_ELEMENTS 
  196         {0,9,0.0550016}, {1,5,0.41674},   {2,8,0.0147376}, {3,7,0.111665},
 
  197         {4,6,0.0737011}, {5,1,0.0803773}, {6,11,0.275056}, {7,15,0.021537}
 
  202         {0,3,0.0425633}, {1,6,0.0343526}, {2,2,0.158848}, {3,7,0.128206},
 
  203         {4,12,0.220829}, {5,5,-0.136549}, {6,0,0.0149032}, {7,10,-0.0334936},
 
  204         {8,16,0.00399329}, {9,18,-0.00209733}, {10,2,0.0556194}, {11,17,-0.000561977}
 
  209         {12,9,0.136657}, {13,6,0.175034}, {14,20,-0.0011016}, {15,15,0.0428935}
 
  214         {16,3,0.00826618}, {17,10,-0.547813}, {18,14,0.311004}, {19,27,-0.00192085}
 
  222         {0,9,
Point(-0.0429458, -0.0115073, 0.)},
 
  223         {1,5,
Point(0.177013, -0.177013, -0.483609)},
 
  224         {2,8,
Point(0.0115073, 0.0115073, 0.00842393)},
 
  225         {3,7,
Point(-0.177013, 0.0474305, 0.)},
 
  226         {4,6,
Point(-0.031305, -0.116832,  0.10025)},
 
  227         {5,1,
Point(0.0474191, -0.0474191, 0.872917)},
 
  228         {6,11,
Point(0.0575466, 0.0575466, -0.11251)},
 
  229         {7,15,
Point(-0.00353805, 0.000948017, 0.000111572)}
 
  234         {0,3,
Point(-0.0959817, -0.0959817, 0.0702635)},
 
  235         {1,6,
Point(0.0625228, -0.0625228, 0.0457699)},
 
  236         {2,2,
Point(0.358209, 0.0959817, -2.77556e-17)},
 
  237         {3,7,
Point(-0.233338, 0.0625228, -6.93889e-17)},
 
  238         {4,12,
Point(-0.0323071, -0.0323071, -0.0729771)},
 
  239         {5,5,
Point(0.248523, 0.0665915, -0.245097)},
 
  240         {6,0,
Point(0.0336072, -0.00900502, 0.288589)},
 
  241         {7,10,
Point(-0.0396234, 0.0396234, -0.0290064)},
 
  242         {8,16,
Point(0.000443217, 0.000443217, 0.000333678)},
 
  243         {9,18,
Point(-0.000232783, -6.23741e-05, 9.35433e-05)},
 
  244         {10,2,
Point(-0.0336072, 0.0336072, 0.985214)},
 
  245         {11,17,
Point(6.23741e-05, -6.23741e-05, -2.05961e-05)},
 
  250         {12,9,
Point(0.0536552, 0.200244, -0.0849541)},
 
  251         {13,6,
Point(-0.0921697, 0.0921697, 0.461056)},
 
  252         {14,20,
Point(2.35811e-05, -8.80059e-05, 3.58959e-05)},
 
  253         {15,15,
Point(-0.0386352, 0.0103523, -0.0197323)},
 
  258         {16,3,
Point(-0.0190603, 0.0051072, 0.308529)},
 
  259         {17,10,
Point(0.244125, -0.244125, 0.140907)},
 
  260         {18,14,
Point(-0.0985844, 0.0985844, -0.502591)},
 
  261         {19,27,
Point(0.000115647, -3.09874e-05, 4.30775e-05)}
 
  270         {0,9,0.0550016}, {1,5,0.41674},   {2,8,0.0147376}, {3,7,0.111665},
 
  272         {4,6,0.147402}, {5,1,0.160755}, {6,11,0.550112}, {7,15,0.043074}
 
  278         {0,3,0.0425633}, {1,6,0.0343526}, {2,2,0.158848}, {3,7,0.128206},
 
  280         {4,12,0.441658}, {5,5,-0.193445}, {6,0,0.0298063}, {7,10,-0.0279114},
 
  281         {8,16,0.00798659}, {9,18,0.0320146}, {10,2,0.111239}, {11,17,0.00857829}
 
  286         {12,9,0.0837876}, {13,6,0.350068}, {14,20,0.0244336}, {15,15,0.0181532}
 
  291         {16,3,0.0165324}, {17,10,-0.720085}, {18,14,0.0777511}, {19,27,0.0453842}
 
  300         {0,9,
Point(-0.0429458, -0.0115073, 0.)},
 
  301         {1,5,
Point(0.177013, -0.177013, -0.483609)},
 
  302         {2,8,
Point(0.0115073, 0.0115073, 0.00842393)},
 
  303         {3,7,
Point(-0.177013, 0.0474305, 0.)},
 
  305         {4,6,
Point(-0.0626101, -0.233664,   0.2005)},
 
  306         {5,1,
Point(0.0948382, -0.0948382,  1.74583)},
 
  307         {6,11,
Point(0.115093, 0.115093, -0.22502)},
 
  308         {7,15,
Point(-0.0070761, 0.00189603, 0.000223144)}
 
  314         {0,3,
Point(-0.0959817, -0.0959817, 0.0702635)},
 
  315         {1,6,
Point(0.0625228, -0.0625228, 0.0457699)},
 
  316         {2,2,
Point(0.358209, 0.0959817, -2.77556e-17)},
 
  317         {3,7,
Point(-0.233338, 0.0625228, -6.93889e-17)},
 
  319         {4,12,
Point(-0.0646142, -0.0646142, -0.145954)},
 
  320         {5,5,
Point(0.352076, 0.0943384, -0.233431)},
 
  321         {6,0,
Point(0.0672144, -0.01801, 0.577179)},
 
  322         {7,10,
Point(-0.0330195, 0.0330195, 0.00373942)},
 
  323         {8,16,
Point(0.000886435, 0.000886435, 0.000667355)},
 
  324         {9,18,
Point(0.00355332, 0.000952108, 0.000319882)},
 
  325         {10,2,
Point(-0.0672144, 0.0672144,  1.97043)},
 
  326         {11,17,
Point(-0.000952108, 0.000952108, 0.000782704)}
 
  331         {12,9,
Point(0.0328972,0.122774,-0.222472)},
 
  332         {13,6,
Point(-0.184339,0.184339,0.922112)},
 
  333         {14,20,
Point(-0.000523034,0.00195199,0.000121819)},
 
  334         {15,15,
Point(-0.016351,0.00438123,0.0404817)}
 
  339         {16,3,
Point(-0.0381206,0.0102144,0.617059)},
 
  340         {17,10,
Point(0.320895,-0.320895,0.641729)},
 
  341         {18,14,
Point(-0.0246461,0.0246461,-0.300588)},
 
  342         {19,27,
Point(-0.0027324,0.000732145,0.000328402)}
 
  351         {0,9,0.0550016}, {1,5,0.41674},   {2,8,0.0147376}, {3,7,0.111665},
 
  353         {4,6,0.184253}, {5,1,0.200943}, {6,11,0.68764}, {7,15,0.0538426}
 
  359         {0,3,0.0425633}, {1,6,0.0343526}, {2,2,0.158848}, {3,7,0.128206},
 
  361         {4,12,0.552072}, {5,5,-0.211652}, {6,0,0.0372579}, {7,10,-0.0167468},
 
  362         {8,16,0.00998323}, {9,18,0.0597236}, {10,2,0.139049}, {11,17,0.0160029}
 
  367         {12,9,0.0469849}, {13,6,0.437585}, {14,20,0.0450821}, {15,15,0.0469849}
 
  372         {16,3,0.0206655}, {17,10,-0.748341}, {18,14,0}, {19,27,0.115995}
 
  381         {0,9,
Point(-0.0429458, -0.0115073, 0.)},
 
  382         {1,5,
Point(0.177013, -0.177013, -0.483609)},
 
  383         {2,8,
Point(0.0115073, 0.0115073, 0.00842393)},
 
  384         {3,7,
Point(-0.177013, 0.0474305, 0.)},
 
  386         {4,6,
Point(-0.0782626,-0.29208,0.250625)},
 
  387         {5,1,
Point(0.118548,-0.118548,2.18229)},
 
  388         {6,11,
Point(0.143866,0.143866,-0.281275)},
 
  389         {7,15,
Point(-0.00884512,0.00237004,0.00027893)}
 
  395         {0,3,
Point(-0.0959817, -0.0959817, 0.0702635)},
 
  396         {1,6,
Point(0.0625228, -0.0625228, 0.0457699)},
 
  397         {2,2,
Point(0.358209, 0.0959817, -2.77556e-17)},
 
  398         {3,7,
Point(-0.233338, 0.0625228, -6.93889e-17)},
 
  400         {4,12,
Point(-0.0807678,-0.0807678,-0.182443)},
 
  401         {5,5,
Point(0.385213,0.103218,-0.175079)},
 
  402         {6,0,
Point(0.0840179,-0.0225125,0.721474)},
 
  403         {7,10,
Point(-0.0198117,0.0198117,0.0357373)},
 
  404         {8,16,
Point(0.00110804,0.00110804,0.000834194)},
 
  405         {9,18,
Point(0.00662875,0.00177617,0.000482244)},
 
  406         {10,2,
Point(-0.0840179,0.0840179,2.46303)},
 
  407         {11,17,
Point(-0.00177617,0.00177617,0.00142946)},
 
  412         {12,9,
Point(0.0184475,0.0688471,-0.254748)},
 
  413         {13,6,
Point(-0.230424,0.230424,1.15264)},
 
  414         {14,20,
Point(-0.000965042,0.00360159,0.000183379)},
 
  415         {15,15,
Point(-0.0423204,0.0113397,0.12514)},
 
  420         {16,3,
Point(-0.0476508,0.012768,0.771323)},
 
  421         {17,10,
Point(0.333487,-0.333487,1.01421)},
 
  422         {18,14,
Point(0,0,0)},
 
  423         {19,27,
Point(-0.00698362,0.00187126,0.000667664)},