and update a test to check that it is correct
for (unsigned int l=0; l<n_levels; ++l)
{
refinement_edge_boundary_indices_old[l].resize(refinement_edge_indices[l].size());
- for (types::global_dof_index idx=0; idx<refinement_edge_indices[l].size(); ++idx)
- refinement_edge_boundary_indices_old[l][idx] = this->is_boundary_index(l, idx);
+ for (IndexSet::ElementIterator it = refinement_edge_indices[l].begin();
+ it != refinement_edge_indices[l].end();
+ ++it)
+ refinement_edge_boundary_indices_old[l][*it] = this->is_boundary_index(l, *it);
}
}
deallog << "get_boundary_indices:" << std::endl;
bi.print(deallog);
+ {
+ // check that refinement_edge_boundary_indices (deprecated) is really
+ // the intersection of the sets above:
+ IndexSet intersect = rei & bi;
+ std::vector<bool> ref = mg_constrained_dofs.get_refinement_edge_boundary_indices()[level];
+
+ unsigned int idx = 0;
+ for (std::vector<bool>::iterator it = ref.begin(); it != ref.end(); ++it, ++idx)
+ {
+ if ((*it == true) != intersect.is_element(idx))
+ deallog << "mismatch idx=" << idx << " "
+ << (*it == true) << " " << intersect.is_element(idx) << std::endl;
+ }
+ }
+
+
IndexSet relevant;
DoFTools::extract_locally_relevant_mg_dofs (dofh,
relevant, level);
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams