return Quadrature<3>(points, weights);
};
- if (reference_cell == ReferenceCells::Tetrahedron)
+ if ((reference_cell == ReferenceCells::Tetrahedron) ||
+ (reference_cell == ReferenceCells::Wedge) ||
+ (reference_cell == ReferenceCells::Pyramid))
{
- const std::vector<std::vector<Point<3>>> face_vertex_locations = {
- {{Point<3>(0.0, 0.0, 0.0),
- Point<3>(1.0, 0.0, 0.0),
- Point<3>(0.0, 1.0, 0.0)}},
- {{Point<3>(1.0, 0.0, 0.0),
- Point<3>(0.0, 0.0, 0.0),
- Point<3>(0.0, 0.0, 1.0)}},
- {{Point<3>(0.0, 0.0, 0.0),
- Point<3>(0.0, 1.0, 0.0),
- Point<3>(0.0, 0.0, 1.0)}},
- {{Point<3>(0.0, 1.0, 0.0),
- Point<3>(1.0, 0.0, 0.0),
- Point<3>(0.0, 0.0, 1.0)}}};
-
- return process(face_vertex_locations);
- }
- else if (reference_cell == ReferenceCells::Wedge)
- {
- const std::vector<std::vector<Point<3>>> face_vertex_locations = {
- {{Point<3>(1.0, 0.0, 0.0),
- Point<3>(0.0, 0.0, 0.0),
- Point<3>(0.0, 1.0, 0.0)}},
- {{Point<3>(0.0, 0.0, 1.0),
- Point<3>(1.0, 0.0, 1.0),
- Point<3>(0.0, 1.0, 1.0)}},
- {{Point<3>(0.0, 0.0, 0.0),
- Point<3>(1.0, 0.0, 0.0),
- Point<3>(0.0, 0.0, 1.0),
- Point<3>(1.0, 0.0, 1.0)}},
- {{Point<3>(1.0, 0.0, 0.0),
- Point<3>(0.0, 1.0, 0.0),
- Point<3>(1.0, 0.0, 1.0),
- Point<3>(0.0, 1.0, 1.0)}},
- {{Point<3>(0.0, 1.0, 0.0),
- Point<3>(0.0, 0.0, 0.0),
- Point<3>(0.0, 1.0, 1.0),
- Point<3>(0.0, 0.0, 1.0)}}};
-
- return process(face_vertex_locations);
- }
- else if (reference_cell == ReferenceCells::Pyramid)
- {
- const std::vector<std::vector<Point<3>>> face_vertex_locations = {
- {{Point<3>(-1.0, -1.0, 0.0),
- Point<3>(+1.0, -1.0, 0.0),
- Point<3>(-1.0, +1.0, 0.0),
- Point<3>(+1.0, +1.0, 0.0)}},
- {{Point<3>(-1.0, -1.0, 0.0),
- Point<3>(-1.0, +1.0, 0.0),
- Point<3>(+0.0, +0.0, 1.0)}},
- {{Point<3>(+1.0, +1.0, 0.0),
- Point<3>(+1.0, -1.0, 0.0),
- Point<3>(+0.0, +0.0, 1.0)}},
- {{Point<3>(+1.0, -1.0, 0.0),
- Point<3>(-1.0, -1.0, 0.0),
- Point<3>(+0.0, +0.0, 1.0)}},
- {{Point<3>(-1.0, +1.0, 0.0),
- Point<3>(+1.0, +1.0, 0.0),
- Point<3>(+0.0, +0.0, 1.0)}}};
+ std::vector<std::vector<Point<3>>> face_vertex_locations(
+ reference_cell.n_faces());
+ for (unsigned int f : reference_cell.face_indices())
+ {
+ face_vertex_locations[f].resize(
+ reference_cell.face_reference_cell(f).n_vertices());
+ for (unsigned int v :
+ reference_cell.face_reference_cell(f).vertex_indices())
+ face_vertex_locations[f][v] =
+ reference_cell.face_vertex_location<3>(f, v);
+ }
return process(face_vertex_locations);
}