Skip to content

Commit

Permalink
Remove one use of make_array_view(Tensor &).
Browse files Browse the repository at this point in the history
  • Loading branch information
drwells committed Aug 20, 2021
1 parent 1d21902 commit 8adc8a7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions include/deal.II/base/mpi.templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <deal.II/base/config.h>

#include <deal.II/base/array_view.h>
#include <deal.II/base/exceptions.h>
#include <deal.II/base/mpi.h>
#include <deal.II/base/symmetric_tensor.h>
Expand Down Expand Up @@ -326,9 +327,10 @@ namespace Utilities
sum(const Tensor<rank, dim, Number> &local,
const MPI_Comm & mpi_communicator)
{
Tensor<rank, dim, Number> sums;
sum(local, mpi_communicator, sums);
return sums;
auto array = local.to_array();
decltype(array) result;
sum(ArrayView<const Number>(array), mpi_communicator, ArrayView<Number>(result));
return Tensor<rank, dim, Number>(ArrayView<const Number>(result));
}


Expand Down

0 comments on commit 8adc8a7

Please sign in to comment.