201 {
202
205
206
207 System & system =
_es->get_system(
"SimpleSystem");
209 const std::vector<dof_id_type> & send_list = dof_map.
get_send_list();
210
212
213
214
215
217 auto side_neighbors_found = [&]() -> bool
218 {
219 for (
const auto & elem :
_mesh->element_ptr_range())
220 for (auto s : elem->side_index_range())
221 {
223 if (std::distance(range.first, range.second) == 5)
224 {
225 beg = range.first;
226 end = range.second;
227 return true;
228 }
229 }
230
231
232
233 return false;
234 }();
235
236
237 CPPUNIT_ASSERT(side_neighbors_found);
238
239
240
241
242 for (auto it_e = beg; it_e != end; ++it_e)
243 for (auto it_f = std::next(it_e); it_f != end; ++it_f)
244 {
245
246 auto check_dofs = [&](
const Elem * elem)
247 {
248 std::vector<dof_id_type> dof_indices;
250
251 for (const auto & dof : dof_indices)
252 {
254 bool is_in_send_list = (
Utility::binary_find(send_list.begin(), send_list.end(), dof) != send_list.end());
255 CPPUNIT_ASSERT(is_local || is_in_send_list);
256 }
257 };
258
259 const Elem * elem_e = *it_e;
260 const Elem * elem_f = *it_f;
261
263 check_dofs(elem_f);
264
266 check_dofs(elem_e);
267 }
268 }
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...