29 #include "libmesh/auto_ptr.h"  
   30 #include "libmesh/elem.h" 
   31 #include "libmesh/fe_type.h" 
   32 #include "libmesh/fe_interface.h" 
   33 #include "libmesh/node_elem.h" 
   34 #include "libmesh/edge_edge2.h" 
   35 #include "libmesh/edge_edge3.h" 
   36 #include "libmesh/edge_edge4.h" 
   37 #include "libmesh/edge_inf_edge2.h" 
   38 #include "libmesh/face_tri3.h" 
   39 #include "libmesh/face_tri3_subdivision.h" 
   40 #include "libmesh/face_tri3_shell.h" 
   41 #include "libmesh/face_tri6.h" 
   42 #include "libmesh/face_quad4.h" 
   43 #include "libmesh/face_quad4_shell.h" 
   44 #include "libmesh/face_quad8.h" 
   45 #include "libmesh/face_quad8_shell.h" 
   46 #include "libmesh/face_quad9.h" 
   47 #include "libmesh/face_inf_quad4.h" 
   48 #include "libmesh/face_inf_quad6.h" 
   49 #include "libmesh/cell_tet4.h" 
   50 #include "libmesh/cell_tet10.h" 
   51 #include "libmesh/cell_hex8.h" 
   52 #include "libmesh/cell_hex20.h" 
   53 #include "libmesh/cell_hex27.h" 
   54 #include "libmesh/cell_inf_hex8.h" 
   55 #include "libmesh/cell_inf_hex16.h" 
   56 #include "libmesh/cell_inf_hex18.h" 
   57 #include "libmesh/cell_prism6.h" 
   58 #include "libmesh/cell_prism15.h" 
   59 #include "libmesh/cell_prism18.h" 
   60 #include "libmesh/cell_inf_prism6.h" 
   61 #include "libmesh/cell_inf_prism12.h" 
   62 #include "libmesh/cell_pyramid5.h" 
   63 #include "libmesh/cell_pyramid13.h" 
   64 #include "libmesh/cell_pyramid14.h" 
   65 #include "libmesh/fe_base.h" 
   66 #include "libmesh/mesh_base.h" 
   67 #include "libmesh/quadrature_gauss.h" 
   68 #include "libmesh/remote_elem.h" 
   69 #include "libmesh/reference_elem.h" 
   70 #include "libmesh/enum_to_string.h" 
   71 #include "libmesh/threads.h" 
   72 #include "libmesh/enum_elem_quality.h" 
   73 #include "libmesh/enum_io_package.h" 
   74 #include "libmesh/enum_order.h" 
   75 #include "libmesh/elem_internal.h" 
   77 #ifdef LIBMESH_ENABLE_PERIODIC 
   78 #include "libmesh/mesh.h" 
   79 #include "libmesh/periodic_boundaries.h" 
   80 #include "libmesh/boundary_info.h" 
  253       return libmesh_make_unique<NodeElem>(p);
 
  257       return libmesh_make_unique<Edge2>(p);
 
  259       return libmesh_make_unique<Edge3>(p);
 
  261       return libmesh_make_unique<Edge4>(p);
 
  265       return libmesh_make_unique<Tri3>(p);
 
  267       return libmesh_make_unique<TriShell3>(p);
 
  269       return libmesh_make_unique<Tri3Subdivision>(p);
 
  271       return libmesh_make_unique<Tri6>(p);
 
  273       return libmesh_make_unique<Quad4>(p);
 
  275       return libmesh_make_unique<QuadShell4>(p);
 
  277       return libmesh_make_unique<Quad8>(p);
 
  279       return libmesh_make_unique<QuadShell8>(p);
 
  281       return libmesh_make_unique<Quad9>(p);
 
  285       return libmesh_make_unique<Tet4>(p);
 
  287       return libmesh_make_unique<Tet10>(p);
 
  289       return libmesh_make_unique<Hex8>(p);
 
  291       return libmesh_make_unique<Hex20>(p);
 
  293       return libmesh_make_unique<Hex27>(p);
 
  295       return libmesh_make_unique<Prism6>(p);
 
  297       return libmesh_make_unique<Prism15>(p);
 
  299       return libmesh_make_unique<Prism18>(p);
 
  301       return libmesh_make_unique<Pyramid5>(p);
 
  303       return libmesh_make_unique<Pyramid13>(p);
 
  305       return libmesh_make_unique<Pyramid14>(p);
 
  307 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 
  310       return libmesh_make_unique<InfEdge2>(p);
 
  314       return libmesh_make_unique<InfQuad4>(p);
 
  316       return libmesh_make_unique<InfQuad6>(p);
 
  320       return libmesh_make_unique<InfHex8>(p);
 
  322       return libmesh_make_unique<InfHex16>(p);
 
  324       return libmesh_make_unique<InfHex18>(p);
 
  326       return libmesh_make_unique<InfPrism6>(p);
 
  328       return libmesh_make_unique<InfPrism12>(p);
 
  332       libmesh_error_msg(
"ERROR: Undefined element type!");
 
  352     cp.
add (this->point(n));
 
  361   Real h_min=std::numeric_limits<Real>::max();
 
  366   for (
unsigned int n_outer=0; n_outer<
n_vertices; n_outer++)
 
  367     for (
unsigned int n_inner=n_outer+1; n_inner<
n_vertices; n_inner++)
 
  369         const auto diff = (this->
point(n_outer) - this->
point(n_inner));
 
  371         h_min = std::min(h_min, diff.norm_sq());
 
  386   for (
unsigned int n_outer=0; n_outer<
n_vertices; n_outer++)
 
  387     for (
unsigned int n_inner=n_outer+1; n_inner<
n_vertices; n_inner++)
 
  389         const auto diff = (this->
point(n_outer) - this->
point(n_inner));
 
  391         h_max = std::max(h_max, diff.norm_sq());
 
  400                   const unsigned int n2)
 const 
  402   libmesh_assert_less ( n1, this->
n_vertices() );
 
  403   libmesh_assert_less ( n2, this->
n_vertices() );
 
  405   return (this->
point(n1) - this->
point(n2)).norm();
 
  412   const unsigned short n_n = this->
n_nodes();
 
  414   std::array<dof_id_type, Elem::max_n_nodes> node_ids;
 
  416   for (
unsigned short n=0; n != n_n; ++n)
 
  417     node_ids[n] = this->
node_id(n);
 
  421   std::sort (node_ids.begin(), node_ids.begin()+n_n);
 
  434   const unsigned short n_n = this->
n_nodes();
 
  435   libmesh_assert_equal_to(n_n, rhs.
n_nodes());
 
  439   std::array<dof_id_type, Elem::max_n_nodes> this_ids, rhs_ids;
 
  441   for (
unsigned short n = 0; n != n_n; n++)
 
  443       this_ids[n] = this->
node_id(n);
 
  448   std::sort(this_ids.begin(), this_ids.begin()+n_n);
 
  449   std::sort(rhs_ids.begin(), rhs_ids.begin()+n_n);
 
  452   for (
unsigned short n = 0; n != n_n; ++n)
 
  453     if (this_ids[n] != rhs_ids[n])
 
  462   std::set<const Elem *> point_neighbors;
 
  466   for (
const auto & elem : point_neighbors)
 
  467     if (elem->processor_id() == my_pid)
 
  479   const unsigned int ns = this->
n_sides();
 
  480   const unsigned int nn = this->
n_nodes();
 
  482   const unsigned int en = e->
n_nodes();
 
  485   std::vector<bool> might_be_side(ns, 
true);
 
  487   for (
unsigned int i=0; i != en; ++i)
 
  496       for (
unsigned int j=0; j != nn; ++j)
 
  497         if (this->
point(j) == side_point)
 
  507       for (
unsigned int s=0; s != ns; ++s)
 
  509           might_be_side[s] = 
false;
 
  512   for (
unsigned int s=0; s != ns; ++s)
 
  513     if (might_be_side[s])
 
  516         for (
unsigned int s2=s+1; s2 < ns; ++s2)
 
  541   unsigned int num_contained_edges = 0;
 
  548           num_contained_edges++;
 
  549           if (num_contained_edges>=2)
 
  561                                 std::set<const Elem *> & neighbor_set)
 const 
  566   neighbor_set.clear();
 
  567   neighbor_set.insert(
this);
 
  569   std::set<const Elem *> untested_set, next_untested_set;
 
  570   untested_set.insert(
this);
 
  572   while (!untested_set.empty())
 
  576       for (
const auto & elem : untested_set)
 
  577           for (
auto current_neighbor : elem->neighbor_ptr_range())
 
  579               if (current_neighbor &&
 
  582                   if (current_neighbor->active())                
 
  584                       if (current_neighbor->contains_point(p))   
 
  587                           if (!neighbor_set.count(current_neighbor))
 
  588                             next_untested_set.insert (current_neighbor);
 
  591                           neighbor_set.insert (current_neighbor);
 
  594 #ifdef LIBMESH_ENABLE_AMR 
  598                       std::vector<const Elem *> active_neighbor_children;
 
  600                       current_neighbor->active_family_tree_by_neighbor
 
  601                         (active_neighbor_children, elem);
 
  603                       for (
const auto & current_child : active_neighbor_children)
 
  604                           if (current_child->contains_point(p))
 
  607                               if (!neighbor_set.count(current_child))
 
  608                                 next_untested_set.insert (current_child);
 
  610                               neighbor_set.insert (current_child);
 
  613 #endif // #ifdef LIBMESH_ENABLE_AMR 
  616       untested_set.swap(next_untested_set);
 
  617       next_untested_set.clear();
 
  631                                 const Elem * start_elem)
 const 
  648                                std::set<const Elem *> & neighbor_set)
 const 
  657   std::set<const Elem *>::iterator        it = neighbor_set.begin();
 
  658   const std::set<const Elem *>::iterator 
end = neighbor_set.end();
 
  664       if (!(*it)->contains_point(p2))
 
  665         it = neighbor_set.erase(it);
 
  675   neighbor_set.clear();
 
  676   neighbor_set.insert(
this);
 
  678   std::set<const Elem *> untested_set, next_untested_set;
 
  679   untested_set.insert(
this);
 
  681   while (!untested_set.empty())
 
  685       for (
const auto & elem : untested_set)
 
  687           for (
auto current_neighbor : elem->neighbor_ptr_range())
 
  689               if (current_neighbor &&
 
  692                   if (current_neighbor->active())                
 
  695                           || current_neighbor->contains_edge_of(
this))
 
  698                           if (!neighbor_set.count(current_neighbor))
 
  699                             next_untested_set.insert (current_neighbor);
 
  702                           neighbor_set.insert (current_neighbor);
 
  705 #ifdef LIBMESH_ENABLE_AMR 
  709                       std::vector<const Elem *> active_neighbor_children;
 
  711                       current_neighbor->active_family_tree_by_neighbor
 
  712                         (active_neighbor_children, elem);
 
  714                       for (
const auto & current_child : active_neighbor_children)
 
  715                         if (this->
contains_edge_of(current_child) || current_child->contains_edge_of(
this))
 
  718                             if (!neighbor_set.count(current_child))
 
  719                               next_untested_set.insert (current_child);
 
  721                             neighbor_set.insert (current_child);
 
  724 #endif // #ifdef LIBMESH_ENABLE_AMR 
  728       untested_set.swap(next_untested_set);
 
  729       next_untested_set.clear();
 
  752   libmesh_assert_less (this->
dim(), LIBMESH_DIM);
 
  772                   (interior_p->
dim() > this->
dim()));
 
  777     libmesh_assert_less_equal (interior_p->
level(), this->
level());
 
  787   libmesh_assert_less (this->
dim(), LIBMESH_DIM);
 
  792                   (interior_p->
dim() > this->
dim()));
 
  794     libmesh_assert_less_equal (interior_p->
level(), this->
level());
 
  804   libmesh_assert_less (this->
dim(), LIBMESH_DIM);
 
  814                   (p->
dim() > this->
dim()));
 
  821 #ifdef LIBMESH_ENABLE_PERIODIC 
  831   if (neighbor_i != 
nullptr)
 
  839       std::vector<boundary_id_type> bc_ids;
 
  840       mesh.get_boundary_info().boundary_ids(
this, cast_int<unsigned short>(i), bc_ids);
 
  841       for (
const auto & 
id : bc_ids)
 
  847             const Elem * 
const cn = pb->
neighbor(
id, point_locator, 
this, i);
 
  848             neighbor_i = const_cast<Elem *>(cn);
 
  855                 neighbor_i = neighbor_i->
parent();
 
  873   if (neighbor_i != 
nullptr)
 
  881       std::vector<boundary_id_type> bc_ids;
 
  882       mesh.get_boundary_info().boundary_ids(
this, cast_int<unsigned short>(i), bc_ids);
 
  883       for (
const auto & 
id : bc_ids)
 
  886             neighbor_i = pb->
neighbor(
id, point_locator, 
this, i);
 
  893                 neighbor_i = neighbor_i->
parent();
 
  951           const Elem * elem = 
this;
 
  959               for (elem = 
this; !elem->active();
 
  960                    elem = elem->parent())
 
  973                       elem = elem->parent();
 
  981                   for (; elem != nn; elem = elem->
parent())
 
  997               (my_parent->
dim() == this->
dim()))
 
 1016   libmesh_assert_less_equal (neigh->
level(), this->
level());
 
 1045   std::vector<Elem *> neigh_family;
 
 1046 #ifdef LIBMESH_ENABLE_AMR 
 1051     neigh_family.push_back(neigh);
 
 1054   for (
auto & neigh_family_member : neigh_family)
 
 1057       if (this->
subactive() && !neigh_family_member->subactive())
 
 1067 #ifdef LIBMESH_ENABLE_AMR 
 1069                       (neigh_family_member->neighbor_ptr(nn)->active() ||
 
 1070                        neigh_family_member->neighbor_ptr(nn)->is_ancestor_of(
this))) ||
 
 1071                      (neigh_family_member->neighbor_ptr(nn) == 
remote_elem) ||
 
 1073                       (this->
parent() != 
nullptr) &&
 
 1074                       (neigh_family_member->neighbor_ptr(nn) == this->
parent())));
 
 1076       libmesh_assert((neigh_family_member->neighbor_ptr(nn) == 
this) ||
 
 1077                      (neigh_family_member->neighbor_ptr(nn) == 
remote_elem));
 
 1080       neigh_family_member->set_neighbor(nn, 
this);
 
 1090 #if defined(LIBMESH_ENABLE_AMR) && defined(DEBUG) 
 1103           libmesh_assert_greater_equal (this->
level(), neigh->level());
 
 1105           if (this->
level() == neigh->level() &&
 
 1106               neigh->has_neighbor(
this))
 
 1108 #ifdef LIBMESH_ENABLE_AMR 
 1111               std::vector<Elem *> family;
 
 1112               neigh->total_family_tree_by_neighbor (family, 
this);
 
 1116               for (
auto & n : family)
 
 1121                   unsigned int my_s = n->which_neighbor_am_i(
this);
 
 1122                   libmesh_assert_less (my_s, n->n_neighbors());
 
 1123                   libmesh_assert_equal_to (n->neighbor_ptr(my_s), 
this);
 
 1124                   n->set_neighbor(my_s, const_cast<RemoteElem *>(
remote_elem));
 
 1127               unsigned int my_s = neigh->which_neighbor_am_i(
this);
 
 1128               libmesh_assert_less (my_s, neigh->n_neighbors());
 
 1129               libmesh_assert_equal_to (neigh->neighbor_ptr(my_s), 
this);
 
 1130               neigh->set_neighbor(my_s, const_cast<RemoteElem *>(
remote_elem));
 
 1133 #ifdef LIBMESH_ENABLE_AMR 
 1136           else if (neigh->has_children())
 
 1147               while (!neigh->has_neighbor(my_ancestor))
 
 1149                   my_ancestor = my_ancestor->parent();
 
 1155               std::vector<Elem *> family;
 
 1156               neigh->total_family_tree_by_subneighbor (family, my_ancestor, 
this);
 
 1158               for (
auto & n : family)
 
 1163                   unsigned int my_s = n->which_neighbor_am_i(
this);
 
 1164                   libmesh_assert_less (my_s, n->n_neighbors());
 
 1165                   libmesh_assert_equal_to (n->neighbor_ptr(my_s), 
this);
 
 1167                   n->set_neighbor(my_s, const_cast<RemoteElem *>(
remote_elem));
 
 1174 #ifdef LIBMESH_ENABLE_AMR 
 1181       this->
dim() == my_parent->
dim())
 
 1184       libmesh_assert_equal_to (my_parent->
child_ptr(me), 
this);
 
 1196 #ifdef LIBMESH_ENABLE_AMR 
 1207           libmesh_assert_greater_equal (this->
level(), neigh->level());
 
 1209           if (this->
level() == neigh->level() &&
 
 1210               neigh->has_neighbor(
this))
 
 1212 #ifdef LIBMESH_ENABLE_AMR 
 1215               std::vector<Elem *> family;
 
 1216               neigh->total_family_tree_by_neighbor (family, 
this);
 
 1218               for (
auto & n : family)
 
 1223                   unsigned int my_s = n->which_neighbor_am_i(
this);
 
 1224                   libmesh_assert_less (my_s, n->n_neighbors());
 
 1225                   libmesh_assert_equal_to (n->neighbor_ptr(my_s), 
this);
 
 1226                   n->set_neighbor(my_s, 
nullptr);
 
 1229               unsigned int my_s = neigh->which_neighbor_am_i(
this);
 
 1230               libmesh_assert_less (my_s, neigh->n_neighbors());
 
 1231               libmesh_assert_equal_to (neigh->neighbor_ptr(my_s), 
this);
 
 1232               neigh->set_neighbor(my_s, 
nullptr);
 
 1235 #ifdef LIBMESH_ENABLE_AMR 
 1238           else if (neigh->has_children())
 
 1249               while (!neigh->has_neighbor(my_ancestor))
 
 1251                   my_ancestor = my_ancestor->parent();
 
 1257               std::vector<Elem *> family;
 
 1258               neigh->total_family_tree_by_subneighbor (family, my_ancestor, 
this);
 
 1260               for (
auto & n : family)
 
 1265                   unsigned int my_s = n->which_neighbor_am_i(
this);
 
 1266                   libmesh_assert_less (my_s, n->n_neighbors());
 
 1267                   libmesh_assert_equal_to (n->neighbor_ptr(my_s), 
this);
 
 1268                   n->set_neighbor(my_s, 
nullptr);
 
 1275 #ifdef LIBMESH_ENABLE_AMR 
 1296         std::vector<dof_id_type> conn;
 
 1301             std::copy(conn.begin(),
 
 1303                       std::ostream_iterator<dof_id_type>(out_stream, 
" "));
 
 1313           out_stream << this->
node_id(i)+1 << 
"\t";
 
 1320       libmesh_error_msg(
"Unsupported IO package " << iop);
 
 1335         libmesh_do_once( libmesh_here();
 
 1340                          << 
"Cowardly returning 1." 
 1352 #ifdef LIBMESH_ENABLE_AMR 
 1355   const bool is_ancestor =
 
 1382 #ifdef LIBMESH_ENABLE_AMR 
 1392       for (
unsigned int c = 0; c != nc; c++)
 
 1396   for (
unsigned int c = 0; c != nc; c++)
 
 1400           libmesh_assert_equal_to (
this, elem->
parent());
 
 1406   libmesh_error_msg(
"Error: Tried to add a child to an element with full children array");
 
 1418       for (
unsigned int i = 0; i != nc; i++)
 
 1526                                     const Elem * neighbor,
 
 1544                                           const Elem * neighbor,
 
 1562                                        const Elem * neighbor,
 
 1563                                        const Elem * subneighbor,
 
 1582                                              const Elem * neighbor,
 
 1583                                              const Elem * subneighbor,
 
 1602                                            const Elem * neighbor,
 
 1620                                                        const Elem * neighbor,
 
 1627                                                            mesh, point_locator, pb,
 
 1641                                                            mesh, point_locator, pb,
 
 1647                             const unsigned int e)
 const 
 1650   libmesh_assert_less (e, this->
n_edges());
 
 1653   std::unique_ptr<const Elem> child_edge = this->
build_edge_ptr(e);
 
 1657   return (child_edge->node_id(0) == my_edge->node_id(0) ||
 
 1658           child_edge->node_id(1) == my_edge->node_id(1));
 
 1664                                            unsigned int current_min)
 const 
 1671     return std::min(current_min, this->
p_level());
 
 1678   if (current_min <= this->
p_level())
 
 1681   unsigned int min_p_level = current_min;
 
 1686         c.min_p_level_by_neighbor(neighbor_in, min_p_level);
 
 1693                                                unsigned int current_min)
 const 
 1701       unsigned int new_p_level = this->
p_level();
 
 1706           libmesh_assert_greater (new_p_level, 0);
 
 1709       return std::min(current_min, new_p_level);
 
 1714   unsigned int min_p_level = current_min;
 
 1719         c.min_new_p_level_by_neighbor(neighbor_in, min_p_level);
 
 1727                                    unsigned int child_node)
 const 
 1730   libmesh_assert_less(child, nc);
 
 1734   std::vector<std::vector<std::vector<signed char>>> &
 
 1743   if (em_vers >= cached_parent_indices.size())
 
 1744     cached_parent_indices.resize(em_vers+1);
 
 1746   if (child >= cached_parent_indices[em_vers].size())
 
 1748       const signed char nn = cast_int<signed char>(this->
n_nodes());
 
 1750       cached_parent_indices[em_vers].resize(nc);
 
 1752       for (
unsigned int c = 0; c != nc; ++c)
 
 1755           cached_parent_indices[em_vers][c].resize(ncn);
 
 1756           for (
unsigned int cn = 0; cn != ncn; ++cn)
 
 1758               for (
signed char n = 0; n != nn; ++n)
 
 1764                       cached_parent_indices[em_vers][c][cn] = n;
 
 1770                       cached_parent_indices[em_vers][c][cn] =
 
 1777                   libmesh_assert_not_equal_to (n+1, nn);
 
 1783   const signed char cache_val =
 
 1784     cached_parent_indices[em_vers][child][child_node];
 
 1785   if (cache_val == -1)
 
 1788   return cached_parent_indices[em_vers][child][child_node];
 
 1793 const std::vector<std::pair<unsigned char, unsigned char>> &
 
 1795                               unsigned int child_node)
 const 
 1799   std::vector<std::vector<std::vector<std::vector<std::pair<unsigned char, unsigned char>>>>> &
 
 1808   if (cached_bracketing_nodes.size() <= em_vers)
 
 1809     cached_bracketing_nodes.resize(em_vers+1);
 
 1815   if (cached_bracketing_nodes[em_vers].size() < nc)
 
 1826           libmesh_assert_equal_to
 
 1833           std::unique_ptr<Elem> full_elem = 
Elem::build(full_type);
 
 1838           libmesh_assert_equal_to(em_vers, 0);
 
 1844           full_elem->parent_bracketing_nodes(0,0);
 
 1853           cached_bracketing_nodes =
 
 1854             full_elem->_get_bracketing_node_cache();
 
 1857           return cached_bracketing_nodes[em_vers][child][child_node];
 
 1860       cached_bracketing_nodes[em_vers].resize(nc);
 
 1862       const unsigned int nn = this->
n_nodes();
 
 1865       for (
unsigned int c = 0; c != nc; ++c)
 
 1869           cached_bracketing_nodes[em_vers][c].resize(ncn);
 
 1872           for (
unsigned int n = 0; n != ncn; ++n)
 
 1878 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
 
 1887                   for (
unsigned int pn = 0; pn != nn; ++pn)
 
 1889                       const float em_val =
 
 1892                       libmesh_assert_not_equal_to (em_val, 1);
 
 1899                   for (
unsigned int n1 = 0; n1 != ncn; ++n1)
 
 1904                       unsigned int parent_n1 =
 
 1912                       for (
unsigned int n2 = n1+1; n2 < nn; ++n2)
 
 1917                           unsigned int parent_n2 =
 
 1925                           Point pmid = (p1 + p2)/2;
 
 1927                           if (pmid == bracketed_pt)
 
 1929                               cached_bracketing_nodes[em_vers][c][n].push_back
 
 1930                                 (std::make_pair(parent_n1,parent_n2));
 
 1951                       for (
unsigned int pn = 0; pn != nn; ++pn)
 
 1953                           const float em_val =
 
 1956                           libmesh_assert_not_equal_to (em_val, 1);
 
 1965                   for (
unsigned int n1 = 0; n1 != nn; ++n1)
 
 1967                       if (n1 == parent_node)
 
 1972                       for (
unsigned int n2 = n1+1; n2 < nn; ++n2)
 
 1974                           if (n2 == parent_node)
 
 1979                           if (pmid == bracketed_pt)
 
 1981                               cached_bracketing_nodes[em_vers][c][n].push_back
 
 1982                                 (std::make_pair(n1,n2));
 
 1994   return cached_bracketing_nodes[em_vers][child][child_node];
 
 1998 const std::vector<std::pair<dof_id_type, dof_id_type>>
 
 2000                        unsigned int child_node)
 const 
 2002   std::vector<std::pair<dof_id_type, dof_id_type>> returnval;
 
 2004   const std::vector<std::pair<unsigned char, unsigned char>> & pbc =
 
 2007   for (
const auto & pb : pbc)
 
 2009       const unsigned short n_n = this->
n_nodes();
 
 2010       if (pb.first < n_n && pb.second < n_n)
 
 2011         returnval.push_back(std::make_pair(this->
node_id(pb.first),
 
 2012                                            this->node_id(pb.second)));
 
 2017           libmesh_assert_not_equal_to
 
 2020           libmesh_assert_equal_to
 
 2029           std::unique_ptr<Elem> full_elem = 
Elem::build(full_type);
 
 2039           for (
unsigned int c=0; c <= child; ++c)
 
 2042                 if (c == child && n == child_node)
 
 2045                 if (pb.first == full_elem->as_parent_node(c,n))
 
 2054                 if (pb.second == full_elem->as_parent_node(c,n))
 
 2083             returnval.push_back(std::make_pair(pt1, pt2));
 
 2089 #endif // #ifdef LIBMESH_ENABLE_AMR 
 2104                       << 
"WARNING: Resizing bounding box to match user-specified tolerance!\n" 
 2105                       << 
"In the future, calls to Elem::contains_point() with tol > TOLERANCE\n" 
 2106                       << 
"will be more optimized, but should not be used\n" 
 2107                       << 
"to search for points 'close to' elements!\n" 
 2108                       << 
"Instead, use Elem::close_to_point() for this purpose.\n" 
 2133   libmesh_assert_greater (box_tol, 0.);
 
 2134   libmesh_assert_greater (map_tol, 0.);
 
 2144         point_above_min_z = 
false,
 
 2145         point_below_max_z = 
false,
 
 2148         point_above_min_y = 
false,
 
 2149         point_below_max_y = 
false,
 
 2151         point_above_min_x = 
false,
 
 2152         point_below_max_x = 
false;
 
 2159           point_above_min_x = point_above_min_x || (n(0) - my_hmax*box_tol <= p(0));
 
 2160           point_below_max_x = point_below_max_x || (n(0) + my_hmax*box_tol >= p(0));
 
 2162           point_above_min_y = point_above_min_y || (n(1) - my_hmax*box_tol <= p(1));
 
 2163           point_below_max_y = point_below_max_y || (n(1) + my_hmax*box_tol >= p(1));
 
 2166           point_above_min_z = point_above_min_z || (n(2) - my_hmax*box_tol <= p(2));
 
 2167           point_below_max_z = point_below_max_z || (n(2) + my_hmax*box_tol >= p(2));
 
 2173           !point_above_min_z ||
 
 2174           !point_below_max_z ||
 
 2177           !point_above_min_y ||
 
 2178           !point_below_max_y ||
 
 2180           !point_above_min_x ||
 
 2200   if (this->
dim() < 3)
 
 2213       if (dist > this->
hmax() * map_tol)
 
 2235   std::ostringstream oss;
 
 2237   oss << 
"  Elem Information"                                      << 
'\n' 
 2245 #ifdef LIBMESH_ENABLE_UNIQUE_ID 
 2246   oss << 
", unique_id()=";
 
 2253   oss << 
", processor_id()=" << this->
processor_id()               << 
'\n';
 
 2256       << 
"   dim()="     << this->
dim()                            << 
'\n' 
 2257       << 
"   n_nodes()=" << this->
n_nodes()                        << 
'\n';
 
 2260     oss << 
"    " << n << this->
node_ref(n);
 
 2262   oss << 
"   n_sides()=" << this->
n_sides()                        << 
'\n';
 
 2266       oss << 
"    neighbor(" << s << 
")=";
 
 2273 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 
 2277     oss << 
"   hmin()=" << this->
hmin()
 
 2278         << 
", hmax()=" << this->
hmax()                             << 
'\n' 
 2279         << 
"   volume()=" << this->
volume()                        << 
'\n';
 
 2280 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 
 2283     oss << 
"   active()=" << this->
active()
 
 2284       << 
", ancestor()=" << this->
ancestor()
 
 2285       << 
", subactive()=" << this->
subactive()
 
 2289     oss << this->
parent()->
id() << 
'\n';
 
 2292   oss << 
"   level()=" << this->
level()
 
 2293       << 
", p_level()=" << this->
p_level()                         << 
'\n' 
 2294 #ifdef LIBMESH_ENABLE_AMR 
 2298 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 
 2299       << 
"   infinite()=" << this->
infinite()    << 
'\n';
 
 2301     oss << 
"   origin()=" << this->
origin()    << 
'\n' 
 2309         oss << 
'(' << s << 
'/' << v << 
'/' << this->
dof_number(s,v,c) << 
") ";
 
 2324       if (current_neighbor && current_neighbor != 
remote_elem)
 
 2329           if (current_neighbor->
level() == this->
level())
 
 2332               libmesh_assert_less (w_n_a_i, current_neighbor->
n_neighbors());
 
 2352                                                        const unsigned int)
 const 
 2360 std::pair<unsigned short int, unsigned short int>
 
 2364   return std::pair<unsigned short int, unsigned short int>(0,0);
 
 2407 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 
 2433                                              const bool full_ordered)
 
 2542 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 
 2591         libmesh_error_msg(
"No second order equivalent element type for et =  " 
 2629   const std::vector<Real> & JxW = fe->get_JxW();
 
 2635   fe->attach_quadrature_rule(&qrule);
 
 2640   for (
auto jxw : JxW)
 
 2654   unsigned int n_points = this->
n_nodes();
 
 2655   for (
unsigned int p=0; p != n_points; ++p)
 
 2656     for (
unsigned d=0; d<LIBMESH_DIM; ++d)
 
 2659         if (pmin(d) > pt(d))
 
 2662         if (pmax(d) < pt(d))
 
 2672                                unsigned int n)
 const 
 2674 #ifdef LIBMESH_ENABLE_AMR 
 2676   unsigned int my_n_vertices = this->
n_vertices();
 
 2677   for (
unsigned int n_parent = 0; n_parent != my_n_vertices;
 
 2687   libmesh_error_msg(
"ERROR: AMR disabled, how did we get here?");
 
 2698   libmesh_not_implemented();
 
 2704                                  const unsigned int )
 const 
 2707   libmesh_not_implemented();