Skip to content

Commit

Permalink
parallel::CellWeights: Capture values, not references.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcfehling committed Feb 11, 2020
1 parent 6978799 commit dd1dd95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/distributed/cell_weights.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ namespace parallel
CellWeights<dim, spacedim>::ndofs_weighting(
const std::pair<float, float> &coefficients)
{
return [&coefficients](
return [coefficients](
const typename hp::DoFHandler<dim, spacedim>::cell_iterator &,
const FiniteElement<dim, spacedim> &future_fe) -> unsigned int {
const float result =
Expand All @@ -101,7 +101,7 @@ namespace parallel
CellWeights<dim, spacedim>::ndofs_weighting(
const std::vector<std::pair<float, float>> &coefficients)
{
return [&coefficients](
return [coefficients](
const typename hp::DoFHandler<dim, spacedim>::cell_iterator &,
const FiniteElement<dim, spacedim> &future_fe) -> unsigned int {
float result = 0;
Expand Down Expand Up @@ -139,7 +139,7 @@ namespace parallel
ExcMessage(
"parallel::CellWeights requires a parallel::TriangulationBase object."));

return [&dof_handler, tria, &weighting_function](
return [&dof_handler, tria, weighting_function](
const typename Triangulation<dim, spacedim>::cell_iterator &cell,
const typename Triangulation<dim, spacedim>::CellStatus status)
-> unsigned int {
Expand Down

0 comments on commit dd1dd95

Please sign in to comment.