406 std::vector<Point> points = {
Point(0, 0, 0),
Point(1, 0, 0),
Point(1, 1, 0),
Point(0, 1, 0),
407 Point(0, 0, 1),
Point(1, 0, 1),
Point(1, 1, 1),
Point(0, 1, 1)};
410 const std::vector<std::vector<unsigned int>> nodes_on_side =
421 std::vector<std::unique_ptr<Node>> nodes(points.size());
423 nodes[i] = Node::build(points[i], i);
426 std::vector<std::shared_ptr<Polygon>> sides(nodes_on_side.size());
430 const auto & nodes_on_s = nodes_on_side[s];
431 sides[s] = std::make_shared<C0Polygon>(nodes_on_s.size());
433 sides[s]->set_node(i, nodes[nodes_on_s[i]].
get());
436 std::unique_ptr<libMesh::Node> mid_elem_node;
437 std::unique_ptr<Elem> polyhedron = std::make_unique<C0Polyhedron>(sides, mid_elem_node);
438 const Point n1 = polyhedron->side_vertex_average_normal(0);
440 const Point n2 = polyhedron->side_vertex_average_normal(1);
442 const Point n3 = polyhedron->side_vertex_average_normal(2);
444 const Point n4 = polyhedron->side_vertex_average_normal(3);
446 const Point n5 = polyhedron->side_vertex_average_normal(4);
448 const Point n6 = polyhedron->side_vertex_average_normal(5);
454 std::vector<Point> pts = {
Point(0, 0, 0),
Point(1, 0, 0),
Point(1, 1, 0),
Point(0, 1, 0),
455 Point(0, 0, 4),
Point(1, 0, 4),
Point(1, 1, 5),
Point(0, 1, 5)};
458 const std::vector<std::vector<unsigned int>> nodes_on_side =
467 std::vector<std::unique_ptr<Node>> nodes(pts.size());
469 nodes[i] = Node::build(pts[i], i);
472 std::vector<std::shared_ptr<Polygon>> sides(nodes_on_side.size());
476 const auto & nodes_on_s = nodes_on_side[s];
477 sides[s] = std::make_shared<C0Polygon>(nodes_on_s.size());
479 sides[s]->set_node(i, nodes[nodes_on_s[i]].
get());
482 std::unique_ptr<libMesh::Node> mid_elem_node;
483 std::unique_ptr<Elem> polyhedron = std::make_unique<C0Polyhedron>(sides, mid_elem_node);
487 for (
const auto s :
make_range(hex8->n_sides()))
489 const Point n1 = polyhedron->side_vertex_average_normal(s);
490 const Point normal = hex8->Elem::side_vertex_average_normal(s);
const RealVectorValue unit_z
static constexpr Real TOLERANCE
const RealVectorValue unit_x
std::pair< std::unique_ptr< Elem >, std::vector< std::unique_ptr< Node > > > construct_elem(const std::vector< Point > &pts, ElemType elem_type)
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
const RealVectorValue unit_y
A Point defines a location in LIBMESH_DIM dimensional Real space.
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...