45 {
47
48
49
51
53 n_elem,
54 0.,
55 1.,
56 elem_type);
57
60
61 CPPUNIT_ASSERT_EQUAL(n_components_orig,
dof_id_type(1));
62
63
64 if (n_elem < 3)
65 return;
66
67 for (
const auto & elem :
mesh.element_ptr_range())
68 {
69 const Point c = elem->vertex_average();
70
71 if (std::abs(c(0) - 0.5) < 0.2)
73 }
74
76
79
80 CPPUNIT_ASSERT_EQUAL(n_components_broken,
dof_id_type(2));
81
82
84
86 for (
const auto & elem :
mesh.element_ptr_range())
87 for (const auto & node : elem->node_ref_range())
88 {
89 if (node(0) ==
Real(0))
90 left_node = node.id();
91 if (node(0) ==
Real(1))
92 right_node = node.id();
93 }
94
97
100
106 0);
107
108 if (!my_rank)
109 {
111 {
112 if (i < right_node)
113 matrix->set(i,i,1);
114 if (i > right_node)
115 matrix->set(i,i-1,1);
116 }
117 if (left_node > right_node)
118 matrix->set(right_node, left_node-1, 1);
119 else
120 matrix->set(right_node, left_node, 1);
121 }
122
123 matrix->close();
124
126
129
130 CPPUNIT_ASSERT_EQUAL(n_components_constrained,
dof_id_type(1));
131 }
void max(const T &r, T &o, Request &req) const
processor_id_type rank() const
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 ...
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
Prepare a newly created (or read) mesh for use.
virtual dof_id_type n_nodes() const =0
virtual void delete_elem(Elem *e)=0
Removes element e from the mesh.
virtual dof_id_type max_node_id() const =0
void copy_constraint_rows(const MeshBase &other_mesh)
Copy the constraints from the other mesh to this mesh.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
const Parallel::Communicator & comm() const
A Point defines a location in LIBMESH_DIM dimensional Real space.
static std::unique_ptr< SparseMatrix< T > > build(const Parallel::Communicator &comm, const SolverPackage solver_package=libMesh::default_solver_package(), const MatrixBuildType matrix_build_type=MatrixBuildType::AUTOMATIC)
Builds a SparseMatrix<T> using the linear solver package specified by solver_package.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
uint8_t processor_id_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 dof_id_type n_nodes