if (locally_relevant_constraints.empty())
return;
- for (auto &entry : locally_relevant_constraints)
+ for (ConstraintType &entry : locally_relevant_constraints)
std::sort(entry.entries.begin(),
entry.entries.end(),
[](const auto &l1, const auto &l2) {
return l1.index < l2.index;
});
- auto equal_with_tol = [](const number d, const number e) {
+ const auto equal_with_tol = [](const number d, const number e) {
if (std::abs(std::real(d - e)) <
std::sqrt(
std::numeric_limits<
return false;
};
- auto read_ptr = locally_relevant_constraints.begin();
- auto write_ptr = locally_relevant_constraints.begin();
+ typename std::vector<ConstraintType>::iterator read_ptr =
+ locally_relevant_constraints.begin();
+ typename std::vector<ConstraintType>::iterator write_ptr =
+ locally_relevant_constraints.begin();
// go through sorted locally relevant constraints and look out for
// duplicates (same constrained index, same entries) or cases that need
// to be augmented (same index, different entries)
}
else // equal global dof index
{
- auto &a = *write_ptr;
- const auto &b = *read_ptr;
+ ConstraintType &a = *write_ptr;
+ const ConstraintType &b = *read_ptr;
Assert(a.index == b.index, ExcInternalError());
if (!equal_with_tol(a.inhomogeneity, b.inhomogeneity) &&
locally_owned_dofs.is_element(b.index))
a.inhomogeneity = b.inhomogeneity;
}
- auto &av = a.entries;
- const auto &bv = b.entries;
+ typename ConstraintType::Entries &av = a.entries;
+ const typename ConstraintType::Entries &bv = b.entries;
// check if entries vectors are equal
bool vectors_are_equal = (av.size() == bv.size());
for (unsigned int i = 0; vectors_are_equal && i < av.size(); ++i)
// second entry
if (!vectors_are_equal)
{
- typename dealii::AffineConstraints<
- number>::ConstraintLine::Entries cv;
+ typename ConstraintType::Entries cv;
cv.reserve(av.size() + bv.size());
unsigned int i = 0;
consensus_algorithm.run(constrained_indices_process, mpi_communicator);
// step 2: collect all locally owned constraints
- const auto constrained_indices_by_ranks =
+ const std::map<unsigned int, IndexSet> constrained_indices_by_ranks =
constrained_indices_process.get_requesters();
{
if (constraints_in.is_inhomogeneously_constrained(index))
entry.inhomogeneity = constraints_in.get_inhomogeneity(index);
- if (const auto constraints =
- constraints_in.get_constraint_entries(index))
+ if (const std::vector<std::pair<types::global_dof_index, number>>
+ *constraints = constraints_in.get_constraint_entries(index))
entry.entries = *constraints;
if (constrained_indices_owners[i] == my_rank)
std::map<unsigned int, std::vector<char>> send_data;
- for (const auto &i : send_data_temp)
+ for (const typename std::map<unsigned int,
+ std::vector<ConstraintType>>::value_type &i :
+ send_data_temp)
send_data[i.first] = Utilities::pack(i.second, false);
std::vector<MPI_Request> requests;
requests.reserve(send_data.size());
// ... send data
- for (const auto &i : send_data)
+ for (const std::map<unsigned int, std::vector<char>>::value_type &i :
+ send_data)
{
if (i.first == my_rank)
continue;
// ... receive data
unsigned int n_rec_ranks = 0;
- for (const auto &i : constrained_indices_by_ranks)
+ for (const std::map<unsigned int, IndexSet>::value_type &i :
+ constrained_indices_by_ranks)
if (i.first != my_rank)
++n_rec_ranks;
requests.reserve(send_data.size());
// ... send data
- for (const auto &rank_and_indices : locally_relevant_dofs_by_ranks)
+ for (const std::map<unsigned int, IndexSet>::value_type
+ &rank_and_indices : locally_relevant_dofs_by_ranks)
{
Assert(rank_and_indices.first != my_rank, ExcInternalError());
std::vector<ConstraintType> data;
- for (const auto index : rank_and_indices.second)
+ for (const types::global_dof_index index : rank_and_indices.second)
{
// note: at this stage locally_relevant_constraints still
// contains only locally owned constraints
- const auto ptr =
+ const typename std::vector<ConstraintType>::iterator ptr =
std::find_if(locally_relevant_constraints.begin(),
locally_relevant_constraints.end(),
[index](const auto &a) {
MPI_STATUS_IGNORE);
AssertThrowMPI(ierr);
- const auto received_locally_relevant_constrain =
- Utilities::unpack<std::vector<ConstraintType>>(buffer, false);
+ const std::vector<ConstraintType>
+ received_locally_relevant_constrain =
+ Utilities::unpack<std::vector<ConstraintType>>(buffer, false);
for (const auto &locally_relevant_constrain :
received_locally_relevant_constrain)