]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Pass MatrixFree::AdditionalData by reference 8580/head
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 15 Aug 2019 04:56:10 +0000 (00:56 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 15 Aug 2019 04:56:10 +0000 (00:56 -0400)
include/deal.II/matrix_free/cuda_matrix_free.h
include/deal.II/matrix_free/cuda_matrix_free.templates.h
include/deal.II/matrix_free/matrix_free.h

index d1e07eeaa080d6475415b32b39373504ea11d6d7..4038cd3f7514067483e23d8b51969d0d36fadf17 100644 (file)
@@ -175,7 +175,7 @@ namespace CUDAWrappers
            const DoFHandler<dim> &          dof_handler,
            const AffineConstraints<Number> &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<dim> &          dof_handler,
            const AffineConstraints<Number> &constraints,
            const Quadrature<1> &            quad,
-           const AdditionalData             AdditionalData = AdditionalData());
+           const AdditionalData &           AdditionalData = AdditionalData());
 
     /**
      * Return the Data structure associated with @p color.
index 561f5b18619a7eab7b4f9a69b738afe69d1c01f3..b993716d040da07bee025049c911d8a9942b923d 100644 (file)
@@ -540,7 +540,7 @@ namespace CUDAWrappers
                                   const DoFHandler<dim> &          dof_handler,
                                   const AffineConstraints<Number> &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<dim, Number>::reinit(const DoFHandler<dim> &          dof_handler,
                                   const AffineConstraints<Number> &constraints,
                                   const Quadrature<1> &            quad,
-                                  const AdditionalData additional_data)
+                                  const AdditionalData &additional_data)
   {
     reinit(StaticMappingQ1<dim>::mapping,
            dof_handler,
index 9749a4c3190a819ddcdd197d64ffa3c9931f04e1..87ed1542fa4be7276eb0780af1a9e3c402ebeb72 100644 (file)
@@ -501,7 +501,7 @@ public:
          const DoFHandlerType &            dof_handler,
          const AffineConstraints<number2> &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<number2> &constraint,
          const QuadratureType &            quad,
-         const AdditionalData              additional_data = AdditionalData());
+         const AdditionalData &            additional_data = AdditionalData());
 
   /**
    * Same as above.
@@ -528,7 +528,7 @@ public:
          const AffineConstraints<number2> &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<const DoFHandlerType *> &            dof_handler,
          const std::vector<const AffineConstraints<number2> *> &constraint,
          const std::vector<QuadratureType> &                    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<const DoFHandlerType *> &            dof_handler,
          const std::vector<const AffineConstraints<number2> *> &constraint,
          const std::vector<QuadratureType> &                    quad,
-         const AdditionalData additional_data = AdditionalData());
+         const AdditionalData &additional_data = AdditionalData());
 
   /**
    * Same as above.
@@ -584,7 +584,7 @@ public:
          const std::vector<const AffineConstraints<number2> *> &constraint,
          const std::vector<IndexSet> &      locally_owned_set,
          const std::vector<QuadratureType> &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<const DoFHandlerType *> &            dof_handler,
          const std::vector<const AffineConstraints<number2> *> &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<const DoFHandlerType *> &            dof_handler,
          const std::vector<const AffineConstraints<number2> *> &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<dim, Number, VectorizedArrayType>::reinit(
   const AffineConstraints<number2> &constraints_in,
   const QuadratureType &            quad,
   const typename MatrixFree<dim, Number, VectorizedArrayType>::AdditionalData
-    additional_data)
+    &additional_data)
 {
   std::vector<const DoFHandlerType *>             dof_handlers;
   std::vector<const AffineConstraints<number2> *> constraints;
@@ -2494,7 +2494,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::reinit(
   const AffineConstraints<number2> &constraints_in,
   const QuadratureType &            quad,
   const typename MatrixFree<dim, Number, VectorizedArrayType>::AdditionalData
-    additional_data)
+    &additional_data)
 {
   std::vector<const DoFHandlerType *>             dof_handlers;
   std::vector<const AffineConstraints<number2> *> constraints;
@@ -2527,7 +2527,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::reinit(
   const std::vector<const AffineConstraints<number2> *> &constraint,
   const std::vector<QuadratureType> &                    quad,
   const typename MatrixFree<dim, Number, VectorizedArrayType>::AdditionalData
-    additional_data)
+    &additional_data)
 {
   std::vector<IndexSet> locally_owned_set =
     internal::MatrixFreeImplementation::extract_locally_owned_index_sets(
@@ -2553,7 +2553,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::reinit(
   const std::vector<const AffineConstraints<number2> *> &constraint,
   const QuadratureType &                                 quad,
   const typename MatrixFree<dim, Number, VectorizedArrayType>::AdditionalData
-    additional_data)
+    &additional_data)
 {
   std::vector<IndexSet> locally_owned_set =
     internal::MatrixFreeImplementation::extract_locally_owned_index_sets(
@@ -2579,7 +2579,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::reinit(
   const std::vector<const AffineConstraints<number2> *> &constraint,
   const QuadratureType &                                 quad,
   const typename MatrixFree<dim, Number, VectorizedArrayType>::AdditionalData
-    additional_data)
+    &additional_data)
 {
   std::vector<IndexSet> locally_owned_set =
     internal::MatrixFreeImplementation::extract_locally_owned_index_sets(
@@ -2605,7 +2605,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::reinit(
   const std::vector<const AffineConstraints<number2> *> &constraint,
   const std::vector<QuadratureType> &                    quad,
   const typename MatrixFree<dim, Number, VectorizedArrayType>::AdditionalData
-    additional_data)
+    &additional_data)
 {
   std::vector<IndexSet> locally_owned_set =
     internal::MatrixFreeImplementation::extract_locally_owned_index_sets(
@@ -2633,7 +2633,7 @@ MatrixFree<dim, Number, VectorizedArrayType>::reinit(
   const std::vector<IndexSet> &                          locally_owned_set,
   const std::vector<QuadratureType> &                    quad,
   const typename MatrixFree<dim, Number, VectorizedArrayType>::AdditionalData
-    additional_data)
+    &additional_data)
 {
   // find out whether we use a hp Quadrature or a standard quadrature
   std::vector<hp::QCollection<1>> quad_hp;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.