From: Daniel Arndt Date: Thu, 15 Aug 2019 04:56:10 +0000 (-0400) Subject: Pass MatrixFree::AdditionalData by reference X-Git-Tag: v9.2.0-rc1~1236^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8580%2Fhead;p=dealii.git Pass MatrixFree::AdditionalData by reference --- diff --git a/include/deal.II/matrix_free/cuda_matrix_free.h b/include/deal.II/matrix_free/cuda_matrix_free.h index d1e07eeaa0..4038cd3f75 100644 --- a/include/deal.II/matrix_free/cuda_matrix_free.h +++ b/include/deal.II/matrix_free/cuda_matrix_free.h @@ -175,7 +175,7 @@ namespace CUDAWrappers const DoFHandler & dof_handler, const AffineConstraints &constraints, const Quadrature<1> & quad, - const AdditionalData additional_data = AdditionalData()); + const AdditionalData & additional_data = AdditionalData()); /** * Initializes the data structures. Same as above but using a Q1 mapping. @@ -184,7 +184,7 @@ namespace CUDAWrappers reinit(const DoFHandler & dof_handler, const AffineConstraints &constraints, const Quadrature<1> & quad, - const AdditionalData AdditionalData = AdditionalData()); + const AdditionalData & AdditionalData = AdditionalData()); /** * Return the Data structure associated with @p color. diff --git a/include/deal.II/matrix_free/cuda_matrix_free.templates.h b/include/deal.II/matrix_free/cuda_matrix_free.templates.h index 561f5b1861..b993716d04 100644 --- a/include/deal.II/matrix_free/cuda_matrix_free.templates.h +++ b/include/deal.II/matrix_free/cuda_matrix_free.templates.h @@ -540,7 +540,7 @@ namespace CUDAWrappers const DoFHandler & dof_handler, const AffineConstraints &constraints, const Quadrature<1> & quad, - const AdditionalData additional_data) + const AdditionalData &additional_data) { const auto &triangulation = dof_handler.get_triangulation(); if (const auto parallel_triangulation = @@ -564,7 +564,7 @@ namespace CUDAWrappers MatrixFree::reinit(const DoFHandler & dof_handler, const AffineConstraints &constraints, const Quadrature<1> & quad, - const AdditionalData additional_data) + const AdditionalData &additional_data) { reinit(StaticMappingQ1::mapping, dof_handler, diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index 9749a4c319..87ed1542fa 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -501,7 +501,7 @@ public: const DoFHandlerType & dof_handler, const AffineConstraints &constraint, const QuadratureType & quad, - const AdditionalData additional_data = AdditionalData()); + const AdditionalData & additional_data = AdditionalData()); /** * Initializes the data structures. Same as above, but using a $Q_1$ @@ -512,7 +512,7 @@ public: reinit(const DoFHandlerType & dof_handler, const AffineConstraints &constraint, const QuadratureType & quad, - const AdditionalData additional_data = AdditionalData()); + const AdditionalData & additional_data = AdditionalData()); /** * Same as above. @@ -528,7 +528,7 @@ public: const AffineConstraints &constraint, const IndexSet & locally_owned_dofs, const QuadratureType & quad, - const AdditionalData additional_data = AdditionalData()); + const AdditionalData & additional_data = AdditionalData()); /** * Extracts the information needed to perform loops over cells. The @@ -557,7 +557,7 @@ public: const std::vector & dof_handler, const std::vector *> &constraint, const std::vector & quad, - const AdditionalData additional_data = AdditionalData()); + const AdditionalData &additional_data = AdditionalData()); /** * Initializes the data structures. Same as above, but using a $Q_1$ @@ -568,7 +568,7 @@ public: reinit(const std::vector & dof_handler, const std::vector *> &constraint, const std::vector & quad, - const AdditionalData additional_data = AdditionalData()); + const AdditionalData &additional_data = AdditionalData()); /** * Same as above. @@ -584,7 +584,7 @@ public: const std::vector *> &constraint, const std::vector & locally_owned_set, const std::vector &quad, - const AdditionalData additional_data = AdditionalData()); + const AdditionalData & additional_data = AdditionalData()); /** * Initializes the data structures. Same as before, but now the index set @@ -599,7 +599,7 @@ public: const std::vector & dof_handler, const std::vector *> &constraint, const QuadratureType & quad, - const AdditionalData additional_data = AdditionalData()); + const AdditionalData &additional_data = AdditionalData()); /** * Initializes the data structures. Same as above, but using a $Q_1$ @@ -610,7 +610,7 @@ public: reinit(const std::vector & dof_handler, const std::vector *> &constraint, const QuadratureType & quad, - const AdditionalData additional_data = AdditionalData()); + const AdditionalData &additional_data = AdditionalData()); /** * Copy function. Creates a deep copy of all data structures. It is usually @@ -2458,7 +2458,7 @@ MatrixFree::reinit( const AffineConstraints &constraints_in, const QuadratureType & quad, const typename MatrixFree::AdditionalData - additional_data) + &additional_data) { std::vector dof_handlers; std::vector *> constraints; @@ -2494,7 +2494,7 @@ MatrixFree::reinit( const AffineConstraints &constraints_in, const QuadratureType & quad, const typename MatrixFree::AdditionalData - additional_data) + &additional_data) { std::vector dof_handlers; std::vector *> constraints; @@ -2527,7 +2527,7 @@ MatrixFree::reinit( const std::vector *> &constraint, const std::vector & quad, const typename MatrixFree::AdditionalData - additional_data) + &additional_data) { std::vector locally_owned_set = internal::MatrixFreeImplementation::extract_locally_owned_index_sets( @@ -2553,7 +2553,7 @@ MatrixFree::reinit( const std::vector *> &constraint, const QuadratureType & quad, const typename MatrixFree::AdditionalData - additional_data) + &additional_data) { std::vector locally_owned_set = internal::MatrixFreeImplementation::extract_locally_owned_index_sets( @@ -2579,7 +2579,7 @@ MatrixFree::reinit( const std::vector *> &constraint, const QuadratureType & quad, const typename MatrixFree::AdditionalData - additional_data) + &additional_data) { std::vector locally_owned_set = internal::MatrixFreeImplementation::extract_locally_owned_index_sets( @@ -2605,7 +2605,7 @@ MatrixFree::reinit( const std::vector *> &constraint, const std::vector & quad, const typename MatrixFree::AdditionalData - additional_data) + &additional_data) { std::vector locally_owned_set = internal::MatrixFreeImplementation::extract_locally_owned_index_sets( @@ -2633,7 +2633,7 @@ MatrixFree::reinit( const std::vector & locally_owned_set, const std::vector & quad, const typename MatrixFree::AdditionalData - additional_data) + &additional_data) { // find out whether we use a hp Quadrature or a standard quadrature std::vector> quad_hp;