20 if (ref_fe ==
nullptr)
22 "Pointer to face element is not set");
24 const auto ref_ent = ref_fe->getFEEntityHandle();
27 const auto &ref_gauss_pts = ref_fe->gaussPts;
28 const auto nb_integration_points = ref_gauss_pts.size2();
30 auto set_integration_pts_for_tri = [&]() {
32 auto get_coords = [&](
const auto ent) {
36 std::array<double, 9> node_coords;
41 auto ref_node_coords = get_coords(ref_ent);
42 auto node_coords = get_coords(ent);
45 CHKERR Tools::shapeFunMBTRI<1>(&ref_shapes(0, 0), &ref_gauss_pts(0, 0),
46 &ref_gauss_pts(1, 0), nb_integration_points);
49 if (ref_shapes.size1() * ref_shapes.size2() !=
50 nb_integration_points * ref_node_coords.size() / 3)
52 "Wrong number of shape functions");
55 auto get_glob_coords = [&]() {
59 &glob_coords(0, 0), &glob_coords(0, 1), &glob_coords(0, 2)};
63 for (
auto gg = 0; gg != nb_integration_points; ++gg) {
66 auto t_ref_node_coords =
68 &ref_node_coords[0], &ref_node_coords[1], &ref_node_coords[2]};
71 for (
int nn = 0; nn != ref_node_coords.size() / 3; ++nn) {
72 t_glob_coords(
i) += t_shape * t_ref_node_coords(
i);
82 auto glob_coords = get_glob_coords();
86 node_coords.data(), &glob_coords(0, 0), nb_integration_points,
89 gaussPts.resize(3, nb_integration_points,
false);
93 &local_coords(0, 0), &local_coords(0, 1)};
95 auto scale_quadarture = [&]() {
101 const double scale = std::sqrt((t_ref_normal(
J) * t_ref_normal(
J)) /
102 (t_normal(
J) * t_normal(
J)));
106 const auto sq = scale_quadarture();
108 for (
auto gg = 0; gg != nb_integration_points; ++gg) {
110 t_gauss_pts(
i) = t_local_coords(
i);
111 t_gauss_pts(2) = sq * ref_gauss_pts(2, gg);
122 CHKERR set_integration_pts_for_tri();
126 "Element type not implemented: %d",
type);