FETools::compute_embedding_matrices(FE_DGQ<dim>(this->degree),
isotropic_matrices,
true);
- this_nonconst.prolongation[refinement_case - 1].swap(
- isotropic_matrices.back());
+ this_nonconst.prolongation[refinement_case - 1] =
+ std::move(isotropic_matrices.back());
}
else
{
FETools::compute_projection_matrices(FE_DGQ<dim>(this->degree),
isotropic_matrices,
true);
- this_nonconst.restriction[refinement_case - 1].swap(
- isotropic_matrices.back());
+ this_nonconst.restriction[refinement_case - 1] =
+ std::move(isotropic_matrices.back());
}
else
{
}
# endif
- // swap matrices
- prolongate.swap(const_cast<FullMatrix<double> &>(
- this->prolongation[refinement_case - 1][child]));
+ // move result into place
+ const_cast<FullMatrix<double> &>(
+ this->prolongation[refinement_case - 1][child]) = std::move(prolongate);
}
// finally return the matrix
RefinementCase<dim>(refinement_case));
}
- // swap the just computed restriction matrix into the
- // element of the vector stored in the base class
- my_restriction.swap(const_cast<FullMatrix<double> &>(
- this->restriction[refinement_case - 1][child]));
+ // move result into place
+ const_cast<FullMatrix<double> &>(
+ this->restriction[refinement_case - 1][child]) =
+ std::move(my_restriction);
}
return this->restriction[refinement_case - 1][child];
FullMatrix<double>(this->n_dofs_per_cell(),
this->n_dofs_per_cell()));
FETools::compute_embedding_matrices(*this, isotropic_matrices, true);
- this_nonconst.prolongation[refinement_case - 1].swap(
- isotropic_matrices.back());
+ this_nonconst.prolongation[refinement_case - 1] =
+ std::move(isotropic_matrices.back());
}
else
{
FullMatrix<double>(this->n_dofs_per_cell(),
this->n_dofs_per_cell()));
FETools::compute_projection_matrices(*this, isotropic_matrices, true);
- this_nonconst.restriction[refinement_case - 1].swap(
- isotropic_matrices.back());
+ this_nonconst.restriction[refinement_case - 1] =
+ std::move(isotropic_matrices.back());
}
else
{
FETools::compute_embedding_matrices(*this, isotropic_matrices, true);
- this_nonconst.prolongation[refinement_case - 1].swap(
- isotropic_matrices.back());
+ this_nonconst.prolongation[refinement_case - 1] =
+ std::move(isotropic_matrices.back());
}
// finally return the matrix
FETools::compute_projection_matrices(*this, isotropic_matrices, true);
- this_nonconst.restriction[refinement_case - 1].swap(
- isotropic_matrices.back());
+ this_nonconst.restriction[refinement_case - 1] =
+ std::move(isotropic_matrices.back());
}
// finally return the matrix
for (unsigned int r = 0; r < comp; ++r)
for (unsigned int c = 0; c < this->n_dofs_per_cell(); ++c)
new_constant_modes(r, c) = constant_modes(r, c);
- constant_modes.swap(new_constant_modes);
+
+ constant_modes = std::move(new_constant_modes);
}
// next, fill the constant modes from the individual components as well