3#include <libmesh/boundary_info.h>
4#include <libmesh/enum_elem_quality.h>
5#include <libmesh/elem_side_builder.h>
6#include <libmesh/mesh_modification.h>
7#include <libmesh/mesh_refinement.h>
8#include <libmesh/parallel_implementation.h>
9#include <libmesh/enum_to_string.h>
10#include <libmesh/elem_quality.h>
14template <ElemType elem_type>
21 for (
const auto & elem :
22 this->
_mesh->active_local_element_ptr_range())
24 const BoundingBox bbox = elem->loose_bounding_box();
30 BoundingBox wide_bbox(elem->point(0), elem->point(0));
32 for (
unsigned int n = 0; n != elem->n_nodes(); ++n)
34 const Point & p = elem->point(n);
36 if (!elem->infinite())
43 wide_bbox.
scale(1. / 3.);
45 if (!elem->infinite() && elem->dim())
57 for (
const auto & elem : this->
_mesh->active_local_element_ptr_range())
64 CPPUNIT_ASSERT_LESSEQUAL(edge_length_ratio,
Real(1));
72 CPPUNIT_ASSERT_LESSEQUAL(
Real(2+
TOLERANCE), edge_length_ratio);
87 CPPUNIT_ASSERT_LESSEQUAL(135 +
TOLERANCE, max_angle);
89 const auto assert_quality =
91 const Real expected_value,
92 const Real expected_lower_bound,
93 const Real expected_upper_bound)
95 const auto bounds = elem->qual_bounds(quality);
96 LIBMESH_ASSERT_FP_EQUAL(expected_lower_bound, bounds.first,
TOLERANCE);
97 LIBMESH_ASSERT_FP_EQUAL(expected_upper_bound, bounds.second,
TOLERANCE);
98 LIBMESH_ASSERT_FP_EQUAL(expected_value, elem->quality(quality),
TOLERANCE);
103 const std::vector<ElemQuality> expected = {
112 CPPUNIT_ASSERT_EQUAL(
113 std::string(
"Edge Length Ratio"),
117 assert_quality(
JACOBIAN, 0.5, 0.5, 1.);
120 assert_quality(
MAX_ANGLE, 135., 108., 144.);
121 assert_quality(
MIN_ANGLE, 90., 54., 108.);
125 const std::vector<ElemQuality> expected = {
135 const Real min_polyhedron_angle =
136 std::acos(
Real(1) / std::sqrt(
Real(17))) *
141 assert_quality(
MIN_ANGLE, min_polyhedron_angle, 30., 180.);
174 CPPUNIT_ASSERT_LESSEQUAL (90 +
TOLERANCE, max_dihedral_angle);
181 CPPUNIT_ASSERT_GREATEREQUAL(45 -
TOLERANCE, min_dihedral_angle);
195 if (elem->infinite())
196 CPPUNIT_ASSERT_LESSEQUAL (64 +
TOLERANCE, jac);
198 CPPUNIT_ASSERT_LESSEQUAL (8 +
TOLERANCE, jac);
207 CPPUNIT_ASSERT_GREATEREQUAL(1 -
TOLERANCE, jac);
209 CPPUNIT_ASSERT_GREATEREQUAL(0.5 -
TOLERANCE, jac);
211 CPPUNIT_ASSERT_GREATEREQUAL(2 -
TOLERANCE, jac);
219 CPPUNIT_ASSERT_LESSEQUAL (1 +
TOLERANCE, scaled_jac);
220 CPPUNIT_ASSERT_GREATEREQUAL(
Real(0.4), scaled_jac);
235 for (
const auto & elem :
236 this->
_mesh->active_local_element_ptr_range())
238 for (
const auto edge : elem->edge_index_range())
239 for (
const auto side_on_edge : elem->sides_on_edge(edge))
240 for (
const auto node_on_edge : elem->nodes_on_edge(edge))
241 CPPUNIT_ASSERT(elem->is_node_on_side(node_on_edge, side_on_edge));
243 for (
const auto side : elem->side_index_range())
244 for (
const auto node_on_side : elem->nodes_on_side(side))
245 CPPUNIT_ASSERT(elem->is_node_on_side(node_on_side, side));
247 for (
const auto edge : elem->edge_index_range())
248 for (
const auto node_on_edge : elem->nodes_on_edge(edge))
249 CPPUNIT_ASSERT(elem->is_node_on_edge(node_on_edge, edge));
251 for (
const auto edge : elem->edge_index_range())
252 for (
const auto side_on_edge : elem->sides_on_edge(edge))
253 CPPUNIT_ASSERT(elem->is_edge_on_side(edge, side_on_edge));
261 for (
const auto & elem :
262 this->
_mesh->active_local_element_ptr_range())
266 const ElemType etype = elem->type();
268 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(elem->dim()),
270 CPPUNIT_ASSERT_EQUAL(elem->default_order(),
276 if (!elem->runtime_topology())
295 for (
const auto & elem :
296 this->
_mesh->active_local_element_ptr_range())
298 if (elem->infinite())
301 for (
const auto n : elem->node_index_range())
302#ifndef LIBMESH_ENABLE_EXCEPTIONS
311 CPPUNIT_ASSERT(elem->contains_point(elem->point(n)));
319 for (
const auto & elem :
320 this->
_mesh->active_local_element_ptr_range())
322 if (elem->infinite())
325 const Point centroid = elem->true_centroid();
326 const Point vertex_avg = elem->vertex_average();
329 quasicc = elem->quasicircumcenter();
334 CPPUNIT_ASSERT(elem->has_invertible_map());
335 const Point new_centroid = elem->true_centroid();
336 const Point new_vertex_avg = elem->vertex_average();
339 new_quasicc = elem->quasicircumcenter();
343 LIBMESH_ASSERT_FP_EQUAL(centroid(d), new_centroid(d),
345 LIBMESH_ASSERT_FP_EQUAL(vertex_avg(d), new_vertex_avg(d),
347 LIBMESH_ASSERT_FP_EQUAL(quasicc(d), new_quasicc(d),
360 for (
const auto & elem :
361 this->
_mesh->active_local_element_ptr_range())
363 if (elem->infinite())
369 const Point vertex_avg = elem->vertex_average();
371 const unsigned int n_sides = elem->n_sides();
372 std::vector<std::set<Point*>> side_nodes(n_sides);
373 std::vector<Elem*> neighbors(n_sides);
374 std::vector<std::vector<boundary_id_type>> bcids(n_sides);
377 for (
auto n : elem->nodes_on_side(s))
378 side_nodes[s].insert(elem->node_ptr(n));
379 neighbors[s] = elem->neighbor_ptr(s);
383 elem->flip(&boundary_info);
389 if ((elem->dim() < 3 ||
390 elem->n_vertices() != 5) &&
392 CPPUNIT_ASSERT(elem->has_affine_map());
394 CPPUNIT_ASSERT(!elem->has_affine_map());
398 bool something_changed =
false;
401 std::set<Point*> new_side_nodes;
402 for (
auto n : elem->nodes_on_side(s))
403 new_side_nodes.insert(elem->node_ptr(n));
405 std::vector<boundary_id_type> new_bcids;
410 if (new_side_nodes == side_nodes[os])
414 something_changed =
true;
418 CPPUNIT_ASSERT(neighbors[old_side] ==
419 elem->neighbor_ptr(s));
421 CPPUNIT_ASSERT(bcids[old_side] == new_bcids);
423 CPPUNIT_ASSERT(!elem->dim() || something_changed);
425 const Point new_vertex_avg = elem->vertex_average();
427 LIBMESH_ASSERT_FP_EQUAL(vertex_avg(d), new_vertex_avg(d),
438 for (
const auto & elem :
439 this->
_mesh->active_local_element_ptr_range())
441 if (elem->infinite())
444 const Point vertex_avg = elem->vertex_average();
446 const unsigned int n_sides = elem->n_sides();
447 std::vector<std::set<Point*>> side_nodes(n_sides);
448 std::vector<Elem*> neighbors(n_sides);
449 std::vector<std::vector<boundary_id_type>> bcids(n_sides);
452 for (
auto n : elem->nodes_on_side(s))
453 side_nodes[s].insert(elem->node_ptr(n));
454 neighbors[s] = elem->neighbor_ptr(s);
458 CPPUNIT_ASSERT(!elem->is_flipped());
462 elem->flip(&boundary_info);
463 CPPUNIT_ASSERT(elem->is_flipped());
466 elem->orient(&boundary_info);
467 CPPUNIT_ASSERT(!elem->is_flipped());
474 if ((elem->dim() < 3 ||
475 elem->n_vertices() != 5) &&
478 CPPUNIT_ASSERT(elem->has_affine_map());
481 CPPUNIT_ASSERT(!elem->has_affine_map());
487 std::set<Point*> new_side_nodes;
488 for (
auto n : elem->nodes_on_side(s))
489 new_side_nodes.insert(elem->node_ptr(n));
491 std::vector<boundary_id_type> new_bcids;
494 CPPUNIT_ASSERT(side_nodes[s] ==
497 CPPUNIT_ASSERT(neighbors[s] ==
498 elem->neighbor_ptr(s));
500 CPPUNIT_ASSERT(bcids[s] == new_bcids);
503 const Point new_vertex_avg = elem->vertex_average();
505 LIBMESH_ASSERT_FP_EQUAL(vertex_avg(d), new_vertex_avg(d),
517 const BoundaryInfo & old_boundary_info = old_mesh.get_boundary_info();
518 CPPUNIT_ASSERT(&boundary_info != &old_boundary_info);
520 for (
const auto & elem :
521 this->
_mesh->active_local_element_ptr_range())
523 if (elem->infinite())
528 elem->flip(&boundary_info);
529 CPPUNIT_ASSERT(elem->is_flipped());
536 for (
const auto & elem :
537 this->
_mesh->active_local_element_ptr_range())
539 const Elem & old_elem = old_mesh.elem_ref(elem->id());
541 CPPUNIT_ASSERT(!elem->is_flipped());
544 CPPUNIT_ASSERT(*elem == old_elem);
546 const unsigned int n_sides = elem->n_sides();
549 std::vector<boundary_id_type> bcids, old_bcids;
551 old_boundary_info.
boundary_ids(&old_elem, s, old_bcids);
552 CPPUNIT_ASSERT(bcids == old_bcids);
554 if (elem->neighbor_ptr(s))
557 CPPUNIT_ASSERT_EQUAL(elem->neighbor_ptr(s)->id(),
570 for (
const auto & elem :
571 this->
_mesh->active_local_element_ptr_range())
572 for (
const auto s : elem->side_index_range())
574 if (elem->type() ==
EDGE2 || elem->type() ==
EDGE3 || elem->type() ==
EDGE4)
575 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(s), elem->center_node_on_side(s));
576 else if (elem->type() ==
TRI6 || elem->type() ==
TRI7)
577 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(s + 3), elem->center_node_on_side(s));
578 else if (elem->type() ==
QUAD8 || elem->type() ==
QUAD9 ||
580 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(s + 4), elem->center_node_on_side(s));
581 else if (elem->type() ==
HEX27)
582 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(s + 20), elem->center_node_on_side(s));
583 else if (elem->type() ==
PRISM18 && s >= 1 && s <= 3)
584 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(s + 14), elem->center_node_on_side(s));
585 else if ((elem->type() ==
PRISM20 ||
586 elem->type() ==
PRISM21) && s >= 1 && s <= 3)
587 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(s + 14), elem->center_node_on_side(s));
588 else if (elem->type() ==
PRISM20 ||
590 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(18 + (s == 4)), elem->center_node_on_side(s));
591 else if (elem->type() ==
PYRAMID14 && s == 4)
592 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(13), elem->center_node_on_side(s));
596 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(s + 14), elem->center_node_on_side(s));
598 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(13), elem->center_node_on_side(s));
601 CPPUNIT_ASSERT_EQUAL(
invalid_uint, elem->center_node_on_side(s));
609 for (
const auto & elem :
610 this->
_mesh->active_local_element_ptr_range())
611 for (
const auto s : elem->side_index_range())
612 CPPUNIT_ASSERT_EQUAL(elem->build_side_ptr(s)->type(), elem->side_type(s));
619 for (
const auto & elem :
620 this->
_mesh->active_local_element_ptr_range())
622 std::unique_ptr<const Elem> side;
624 for (
const auto s : elem->side_index_range())
626 CPPUNIT_ASSERT_EQUAL(elem->build_side_ptr(s)->subdomain_id(), elem->subdomain_id());
628 elem->build_side_ptr(side, s);
629 CPPUNIT_ASSERT_EQUAL(side->subdomain_id(), elem->subdomain_id());
643 for (
auto & elem : this->
_mesh->active_local_element_ptr_range())
644 for (
const auto s : elem->side_index_range())
646 const auto side = elem->build_side_ptr(s);
648 auto & cached_side = cache(*elem, s);
649 CPPUNIT_ASSERT_EQUAL(side->type(), cached_side.type());
650 for (
const auto n : side->node_index_range())
651 CPPUNIT_ASSERT_EQUAL(side->node_ref(n), cached_side.node_ref(n));
653 const auto & const_cached_side = cache(
const_cast<const Elem &
>(*elem), s);
654 CPPUNIT_ASSERT_EQUAL(side->type(), const_cached_side.type());
655 for (
const auto n : side->node_index_range())
656 CPPUNIT_ASSERT_EQUAL(side->node_ref(n), const_cached_side.node_ref(n));
662#ifdef LIBMESH_ENABLE_AMR
664 if (elem_type ==
EDGE4 ||
674 auto refining_mesh = this->
_mesh->clone();
679 std::set<std::pair<dof_id_type, unsigned int>> parent_node_was_touched;
680 std::set<std::pair<dof_id_type, unsigned int>> parent_child_was_touched;
682 for (
const Elem * elem : refining_mesh->active_element_ptr_range())
684 CPPUNIT_ASSERT_EQUAL(elem->level(), n);
685 CPPUNIT_ASSERT(!elem->ancestor());
686 CPPUNIT_ASSERT(elem->active());
687 CPPUNIT_ASSERT(!elem->subactive());
688 CPPUNIT_ASSERT(!elem->has_children());
689 CPPUNIT_ASSERT(!elem->has_ancestor_children());
690 CPPUNIT_ASSERT(!elem->interior_parent());
693 CPPUNIT_ASSERT(parent);
695 CPPUNIT_ASSERT(!parent->
active());
702 CPPUNIT_ASSERT_EQUAL(parent, elem->
top_parent());
703 CPPUNIT_ASSERT_EQUAL(parent, parent->
top_parent());
708 CPPUNIT_ASSERT(parent != parent->
top_parent());
709 CPPUNIT_ASSERT_EQUAL(elem->top_parent(), parent->
top_parent());
714 CPPUNIT_ASSERT(c < parent->n_children());
715 CPPUNIT_ASSERT_EQUAL(elem, parent->
child_ptr(c));
716 parent_child_was_touched.emplace(parent->
id(), c);
724 CPPUNIT_ASSERT_EQUAL(pn, parent->
get_node_index(elem->node_ptr(n)));
728 parent_node_was_touched.emplace(parent->
id(), pn);
740 auto child_side = elem->build_side_ptr(s);
743 if (!parent_side->infinite())
744 for (
const Node & node : child_side->node_ref_range())
745 CPPUNIT_ASSERT(parent_side->contains_point(node));
751 bool shares_a_side_node =
false;
752 bool shares_a_vertex =
false;
753 for (
const Node & node : child_side->node_ref_range())
755 shares_a_side_node =
true;
756 for (
const Node & node : elem->node_ref_range())
758 shares_a_vertex =
true;
760 CPPUNIT_ASSERT(shares_a_side_node || !shares_a_vertex);
762 if (elem->neighbor_ptr(s) && !elem->neighbor_ptr(s)->is_remote())
763 CPPUNIT_ASSERT_EQUAL(parent->
child_neighbor(elem->neighbor_ptr(s)), elem);
776 auto child_edge = elem->build_edge_ptr(e);
779 if (!parent_edge->infinite())
780 for (
const Node & node : child_edge->node_ref_range())
781 CPPUNIT_ASSERT(parent_edge->contains_point(node));
785 bool shares_an_edge_node =
false;
786 for (
const Node & node : child_edge->node_ref_range())
788 shares_an_edge_node =
true;
790 CPPUNIT_ASSERT(shares_an_edge_node);
795 CPPUNIT_ASSERT(elem->has_affine_map());
803 for (
const Elem * elem : refining_mesh->local_element_ptr_range())
813 std::vector<const Elem *> family;
814 elem->family_tree(family);
815 CPPUNIT_ASSERT_EQUAL(family.size(),
816 std::size_t(elem->n_children() + 1));
819 elem->total_family_tree(family);
820 CPPUNIT_ASSERT_EQUAL(family.size(),
821 std::size_t(elem->n_children() + 1));
824 elem->active_family_tree(family);
825 CPPUNIT_ASSERT_EQUAL(family.size(),
826 std::size_t(elem->n_children()));
831 elem->active_family_tree_by_side(family,s);
832 if (!elem->build_side_ptr(s)->infinite())
833 CPPUNIT_ASSERT_EQUAL(
double(family.size()),
834 std::pow(2.0,
int(elem->dim()-1)));
836 CPPUNIT_ASSERT_EQUAL(
double(family.size()),
837 std::pow(2.0,
int(elem->dim()-2)));
838 for (
const Elem * child : family)
840 if (child->is_remote())
843 unsigned int c = elem->which_child_am_i(child);
844 CPPUNIT_ASSERT(elem->is_child_on_side(c, s));
849 if (elem->level() + 1 == n)
853 auto it = parent_child_was_touched.find(std::make_pair(elem->id(), c));
854 CPPUNIT_ASSERT(it != parent_child_was_touched.end());
859 auto it = parent_node_was_touched.find(std::make_pair(elem->id(), n));
860 CPPUNIT_ASSERT(it != parent_node_was_touched.end());
885 for (
const auto & elem :
886 this->
_mesh->active_local_element_ptr_range())
887 for (
const auto nd : elem->node_index_range())
889 if ((elem->type() ==
EDGE3 || elem->type() ==
EDGE4) && nd >= 2)
890 CPPUNIT_ASSERT(elem->is_internal(nd));
891 else if (elem->type() ==
HEX27 && nd == 26)
892 CPPUNIT_ASSERT(elem->is_internal(nd));
893 else if (elem->type() ==
PRISM21 && nd == 20)
894 CPPUNIT_ASSERT(elem->is_internal(nd));
895 else if ((elem->type() ==
QUAD9 || elem->type() ==
QUADSHELL9) && nd == 8)
896 CPPUNIT_ASSERT(elem->is_internal(nd));
897 else if (elem->type() ==
TRI7 && nd == 6)
898 CPPUNIT_ASSERT(elem->is_internal(nd));
899 else if (elem->type() ==
INFHEX18 && nd == 17)
900 CPPUNIT_ASSERT(elem->is_internal(nd));
901 else if (elem->type() ==
INFQUAD6 && nd == 5)
902 CPPUNIT_ASSERT(elem->is_internal(nd));
904 else if (elem->type() ==
C0POLYHEDRON && nd == elem->n_vertices())
905 CPPUNIT_ASSERT(elem->is_internal(nd));
907 CPPUNIT_ASSERT(!elem->is_internal(nd));
915 for (
const auto & elem : this->
_mesh->active_local_element_ptr_range())
917 for (
const auto nd : elem->node_index_range())
919 auto adjacent_edge_ids = elem->edges_adjacent_to_node(nd);
926 CPPUNIT_ASSERT(adjacent_edge_ids.empty());
933 for (
const auto & edge_id : adjacent_edge_ids)
935 auto node_ids_on_edge = elem->nodes_on_edge(edge_id);
936 CPPUNIT_ASSERT(std::find(node_ids_on_edge.begin(), node_ids_on_edge.end(), nd) != node_ids_on_edge.end());
946 CPPUNIT_TEST( test_bounding_box ); \
947 CPPUNIT_TEST( test_quality ); \
948 CPPUNIT_TEST( test_node_edge_map_consistency ); \
949 CPPUNIT_TEST( test_maps ); \
950 CPPUNIT_TEST( test_static_data ); \
951 CPPUNIT_TEST( test_permute ); \
952 CPPUNIT_TEST( test_flip ); \
953 CPPUNIT_TEST( test_orient ); \
954 CPPUNIT_TEST( test_orient_elements ); \
955 CPPUNIT_TEST( test_contains_point_node ); \
956 CPPUNIT_TEST( test_center_node_on_side ); \
957 CPPUNIT_TEST( test_side_type ); \
958 CPPUNIT_TEST( test_side_subdomain ); \
959 CPPUNIT_TEST( test_elem_side_builder ); \
960 CPPUNIT_TEST( test_refinement ); \
961 CPPUNIT_TEST( test_double_refinement ); \
962 CPPUNIT_TEST( test_is_internal )
964#define INSTANTIATE_ELEMTEST(elemtype) \
965 class ElemTest_##elemtype : public ElemTest<elemtype> { \
967 ElemTest_##elemtype() : \
968 ElemTest<elemtype>() { \
969 if (unitlog->summarized_logs_enabled()) \
970 this->libmesh_suite_name = "ElemTest"; \
972 this->libmesh_suite_name = "ElemTest_" #elemtype; \
974 CPPUNIT_TEST_SUITE( ElemTest_##elemtype ); \
976 CPPUNIT_TEST_SUITE_END(); \
979 CPPUNIT_TEST_SUITE_REGISTRATION( ElemTest_##elemtype )
1006#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1030#ifdef LIBMESH_ENABLE_EXCEPTIONS
1037#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
void test_elem_side_builder()
void test_contains_point_node()
void test_double_refinement()
void test_center_node_on_side()
void test_n_refinements(unsigned int n)
void test_side_subdomain()
void test_orient_elements()
void test_node_edge_map_consistency()
std::unique_ptr< Mesh > _mesh
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
void boundary_ids(const Node *node, std::vector< boundary_id_type > &vec_to_fill) const
Fills a user-provided std::vector with the boundary ids associated with Node node.
Defines a Cartesian bounding box by the two corner extremum.
const Point & max() const
void scale(const Real factor)
Scales each dimension of the bounding box by factor.
const Point & min() const
bool contains_point(const Point &) const
void union_with(const Point &p)
Enlarges this bounding box to include the given point.
Helper for building element sides that minimizes the construction of new elements.
This is the base class from which all geometric element types are derived.
bool has_ancestor_children() const
virtual unsigned int n_nodes_in_child(unsigned int) const
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const =0
static const unsigned int type_to_n_nodes_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the number of nodes in the element...
bool is_ancestor_of(const Elem *descendant) const
virtual unsigned int n_vertices() const =0
Elem * child_neighbor(Elem *elem)
static const unsigned int type_to_n_edges_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the number of edges on the element...
virtual bool is_child_on_edge(const unsigned int c, const unsigned int e) const
bool has_children() const
const Elem * parent() const
const Elem * child_ptr(unsigned int i) const
virtual bool is_vertex_on_parent(unsigned int c, unsigned int n) const
unsigned int local_node(const dof_id_type i) const
unsigned int which_child_am_i(const Elem *e) const
virtual bool is_vertex_on_child(unsigned int, unsigned int n) const
static const unsigned int type_to_dim_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the geometric dimension of the ele...
static const unsigned int type_to_n_sides_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the number of sides on the element...
static const unsigned int max_n_nodes
The maximum number of nodes any element can contain.
virtual unsigned int as_parent_node(unsigned int c, unsigned int n) const
static const Order type_to_default_order_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the default approximation order of...
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i)=0
virtual bool is_vertex(const unsigned int i) const =0
unsigned int get_node_index(const Node *node_ptr) const
const Elem * interior_parent() const
virtual unsigned int n_edges() const =0
virtual unsigned int n_sides() const =0
virtual bool has_affine_map() const
const Elem * neighbor_ptr(unsigned int i) const
const Elem * top_parent() const
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i)=0
The IntRange templated class is intended to make it easy to loop over integers which are indices of a...
Implements (adaptive) mesh refinement algorithms for a MeshBase.
void uniformly_refine(unsigned int n=1)
Uniformly refines the mesh n times.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
A Node is like a Point, but with more information.
A Point defines a location in LIBMESH_DIM dimensional Real space.
Communicator * TestCommWorld
INSTANTIATE_ELEMTEST(NODEELEM)
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
std::vector< ElemQuality > valid(const ElemType t)
The libMesh namespace provides an interface to certain functionality in the library.
ElemType
Defines an enum for geometric element types.
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
ElemQuality
Defines an enum for element quality metrics.
static constexpr Real TOLERANCE
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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...