203 {
204
207
208
209 System & system =
_es->get_system(
"SimpleSystem");
211 const std::vector<dof_id_type> & send_list = dof_map.
get_send_list();
212
214
215
216
217
219 auto side_neighbors_found = [&]() -> bool
220 {
221 for (
const auto & elem :
_mesh->element_ptr_range())
222 for (auto s : elem->side_index_range())
223 {
225 if (std::distance(range.first, range.second) == 5)
226 {
227 beg = range.first;
228 end = range.second;
229 return true;
230 }
231 }
232
233
234
235 return false;
236 }();
237
238
239 CPPUNIT_ASSERT(side_neighbors_found);
240
241
242
243
244 for (auto it_e = beg; it_e != end; ++it_e)
245 for (auto it_f = std::next(it_e); it_f != end; ++it_f)
246 {
247
248 auto check_dofs = [&](
const Elem * elem)
249 {
250 std::vector<dof_id_type> dof_indices;
252
253 for (const auto & dof : dof_indices)
254 {
256 bool is_in_send_list = (
Utility::binary_find(send_list.begin(), send_list.end(), dof) != send_list.end());
257 CPPUNIT_ASSERT(is_local || is_in_send_list);
258 }
259 };
260
261 const Elem * elem_e = *it_e;
262 const Elem * elem_f = *it_f;
263
265 check_dofs(elem_f);
266
268 check_dofs(elem_e);
269 }
270 }
void read_mesh(const std::string &mesh_filename)
dof_id_type first_dof(const processor_id_type proc) const
dof_id_type end_dof(const processor_id_type proc) const
This class handles the numbering of degrees of freedom on a mesh.
const std::vector< dof_id_type > & get_send_list() const
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
processor_id_type processor_id() const
This is the base class from which all geometric element types are derived.
Manages consistently variables, degrees of freedom, and coefficient vectors.
ForwardIterator binary_find(ForwardIterator first, ForwardIterator last, const T &value)
The STL provides std::binary_search() which returns true or false depending on whether the searched-f...