From eab549f6c93135c761dc8e0dd772ec9542a3fd1f Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 20 Feb 2019 15:53:31 +0100 Subject: [PATCH] Fix linear operator --- include/deal.II/lac/linear_operator.h | 2 +- include/deal.II/lac/read_write_vector.templates.h | 4 ++-- source/base/utilities.cc | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/deal.II/lac/linear_operator.h b/include/deal.II/lac/linear_operator.h index b8e118fe11..2947a092d4 100644 --- a/include/deal.II/lac/linear_operator.h +++ b/include/deal.II/lac/linear_operator.h @@ -856,7 +856,7 @@ template < LinearOperator identity_operator(const std::function &reinit_vector) { - LinearOperator return_op((Payload())); + LinearOperator return_op{Payload()}; return_op.reinit_range_vector = reinit_vector; return_op.reinit_domain_vector = reinit_vector; diff --git a/include/deal.II/lac/read_write_vector.templates.h b/include/deal.II/lac/read_write_vector.templates.h index cfbbc7db89..c2854d9af2 100644 --- a/include/deal.II/lac/read_write_vector.templates.h +++ b/include/deal.II/lac/read_write_vector.templates.h @@ -874,7 +874,7 @@ namespace LinearAlgebra for (unsigned int i = 0; i < n_elements; ++i) { Assert( - std::imag(new_values[i]) == 0., + std::imag(tmp[i]) == 0., ExcMessage( "VectorOperation::min is not defined if there is an imaginary part!)")); Assert( @@ -898,7 +898,7 @@ namespace LinearAlgebra for (unsigned int i = 0; i < n_elements; ++i) { Assert( - std::imag(new_values[i]) == 0., + std::imag(tmp[i]) == 0., ExcMessage( "VectorOperation::max is not defined if there is an imaginary part!)")); Assert( diff --git a/source/base/utilities.cc b/source/base/utilities.cc index d5f120192b..c09874105d 100644 --- a/source/base/utilities.cc +++ b/source/base/utilities.cc @@ -60,6 +60,7 @@ # include # include +# include # endif # include # include -- 2.39.5