61 CPPUNIT_ASSERT_EQUAL(n_components_orig,
dof_id_type(1));
67 for (
const auto & elem :
mesh.element_ptr_range())
69 const Point c = elem->vertex_average();
71 if (std::abs(c(0) - 0.5) < 0.2)
80 CPPUNIT_ASSERT_EQUAL(n_components_broken,
dof_id_type(2));
86 for (
const auto & elem :
mesh.element_ptr_range())
87 for (
const auto & node : elem->node_ref_range())
89 if (node(0) ==
Real(0))
90 left_node = node.id();
91 if (node(0) ==
Real(1))
92 right_node = node.id();
115 matrix->set(i,i-1,1);
117 if (left_node > right_node)
118 matrix->set(right_node, left_node-1, 1);
120 matrix->set(right_node, left_node, 1);
130 CPPUNIT_ASSERT_EQUAL(n_components_constrained,
dof_id_type(1));
libMesh::Parallel::Communicator * TestCommWorld
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly ecreated (or read) mesh for use.
processor_id_type rank() const
void copy_constraint_rows(const MeshBase &other_mesh)
Copy the constraints from the other mesh to this mesh.
const Parallel::Communicator & comm() const
uint8_t processor_id_type
void allow_remote_element_removal(bool allow)
If false is passed in then this mesh will no longer have remote elements deleted when being prepared ...
const dof_id_type n_nodes
virtual void delete_elem(Elem *e)=0
Removes element e from the mesh.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void max(const T &r, T &o, Request &req) const
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...
virtual dof_id_type max_node_id() const =0
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
A Point defines a location in LIBMESH_DIM dimensional Real space.
virtual dof_id_type n_nodes() const =0