]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove most new in folder include/deal.II/matrix_free/ 9499/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 8 Feb 2020 09:42:07 +0000 (10:42 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sat, 8 Feb 2020 09:42:07 +0000 (10:42 +0100)
include/deal.II/matrix_free/fe_evaluation.h
include/deal.II/matrix_free/mapping_info.templates.h
include/deal.II/matrix_free/matrix_free.templates.h
include/deal.II/matrix_free/operators.h

index e0531840925c308f420f3c8514af8d7b6ff72da8..ae16502ebc46bfd2a117a779dfce5566625818f4 100644 (file)
@@ -3233,12 +3233,12 @@ inline FEEvaluationBase<dim,
   // Create deep copy of mapped geometry for use in parallel...
   if (other.mapped_geometry.get() != nullptr)
     {
-      mapped_geometry.reset(
-        new internal::MatrixFreeFunctions::
-          MappingDataOnTheFly<dim, Number, VectorizedArrayType>(
-            other.mapped_geometry->get_fe_values().get_mapping(),
-            other.mapped_geometry->get_quadrature(),
-            other.mapped_geometry->get_fe_values().get_update_flags()));
+      mapped_geometry = std::make_shared<
+        internal::MatrixFreeFunctions::
+          MappingDataOnTheFly<dim, Number, VectorizedArrayType>>(
+        other.mapped_geometry->get_fe_values().get_mapping(),
+        other.mapped_geometry->get_quadrature(),
+        other.mapped_geometry->get_fe_values().get_update_flags());
       mapping_data = &mapped_geometry->get_data_storage();
       cell         = 0;
 
@@ -3311,12 +3311,12 @@ operator=(const FEEvaluationBase<dim,
   // Create deep copy of mapped geometry for use in parallel...
   if (other.mapped_geometry.get() != nullptr)
     {
-      mapped_geometry.reset(
-        new internal::MatrixFreeFunctions::
-          MappingDataOnTheFly<dim, Number, VectorizedArrayType>(
-            other.mapped_geometry->get_fe_values().get_mapping(),
-            other.mapped_geometry->get_quadrature(),
-            other.mapped_geometry->get_fe_values().get_update_flags()));
+      mapped_geometry = std::make_shared<
+        internal::MatrixFreeFunctions::
+          MappingDataOnTheFly<dim, Number, VectorizedArrayType>>(
+        other.mapped_geometry->get_fe_values().get_mapping(),
+        other.mapped_geometry->get_quadrature(),
+        other.mapped_geometry->get_fe_values().get_update_flags());
       cell         = 0;
       mapping_data = &mapped_geometry->get_data_storage();
       jacobian     = mapped_geometry->get_data_storage().jacobians[0].begin();
index f61e09d0ab81411fcf19b6f1e1d0f3686d9b0b58..307abf43486a200299a73661209f972bc77484ff 100644 (file)
@@ -674,11 +674,14 @@ namespace internal
               const unsigned int n_q_points =
                 mapping_info.cell_data[my_q].descriptor[fe_index].n_q_points;
               if (fe_values[my_q][fe_index].get() == nullptr)
-                fe_values[my_q][fe_index].reset(new dealii::FEValues<dim>(
-                  mapping,
-                  dummy_fe,
-                  mapping_info.cell_data[my_q].descriptor[fe_index].quadrature,
-                  update_flags_feval));
+                fe_values[my_q][fe_index] =
+                  std::make_shared<dealii::FEValues<dim>>(
+                    mapping,
+                    dummy_fe,
+                    mapping_info.cell_data[my_q]
+                      .descriptor[fe_index]
+                      .quadrature,
+                    update_flags_feval);
               dealii::FEValues<dim> &fe_val = *fe_values[my_q][fe_index];
               cell_data.resize(n_q_points);
 
@@ -1324,12 +1327,17 @@ namespace internal
 
               if (is_boundary_face &&
                   fe_boundary_face_values_container[my_q][0] == nullptr)
-                fe_boundary_face_values_container[my_q][0].reset(
-                  new FEFaceValues<dim>(
-                    mapping, dummy_fe, quadrature, update_flags_boundary));
+                fe_boundary_face_values_container[my_q][0] =
+                  std::make_shared<FEFaceValues<dim>>(mapping,
+                                                      dummy_fe,
+                                                      quadrature,
+                                                      update_flags_boundary);
               else if (fe_face_values_container[my_q][0] == nullptr)
-                fe_face_values_container[my_q][0].reset(new FEFaceValues<dim>(
-                  mapping, dummy_fe, quadrature, update_flags_inner));
+                fe_face_values_container[my_q][0] =
+                  std::make_shared<FEFaceValues<dim>>(mapping,
+                                                      dummy_fe,
+                                                      quadrature,
+                                                      update_flags_inner);
 
               FEFaceValues<dim> &fe_face_values =
                 is_boundary_face ? *fe_boundary_face_values_container[my_q][0] :
@@ -1471,11 +1479,12 @@ namespace internal
                       else
                         {
                           if (fe_subface_values_container[my_q][0] == nullptr)
-                            fe_subface_values_container[my_q][0].reset(
-                              new FESubfaceValues<dim>(mapping,
-                                                       dummy_fe,
-                                                       quadrature,
-                                                       update_flags_inner));
+                            fe_subface_values_container[my_q][0] =
+                              std::make_shared<FESubfaceValues<dim>>(
+                                mapping,
+                                dummy_fe,
+                                quadrature,
+                                update_flags_inner);
                           fe_subface_values_container[my_q][0]->reinit(
                             cell_it,
                             faces[face].exterior_face_no,
@@ -2017,19 +2026,19 @@ namespace internal
           for (const unsigned int face : GeometryInfo<dim>::face_indices())
             {
               if (fe_face_values[my_q][fe_index].get() == nullptr)
-                fe_face_values[my_q][fe_index].reset(
-                  new dealii::FEFaceValues<dim>(
+                fe_face_values[my_q][fe_index] =
+                  std::make_shared<dealii::FEFaceValues<dim>>(
                     mapping,
                     dummy_fe,
                     face_data_by_cells[my_q].descriptor[fe_index].quadrature,
-                    update_flags));
+                    update_flags);
               if (fe_face_values_neigh[my_q][fe_index].get() == nullptr)
-                fe_face_values_neigh[my_q][fe_index].reset(
-                  new dealii::FEFaceValues<dim>(
+                fe_face_values_neigh[my_q][fe_index] =
+                  std::make_shared<dealii::FEFaceValues<dim>>(
                     mapping,
                     dummy_fe,
                     face_data_by_cells[my_q].descriptor[fe_index].quadrature,
-                    update_flags));
+                    update_flags);
               dealii::FEFaceValues<dim> &fe_val =
                 *fe_face_values[my_q][fe_index];
               dealii::FEFaceValues<dim> &fe_val_neigh =
index 6505aeb3e8979733cdcd9387c7975b02ce07edca..3c98ada2a25adeec69bf38d5973b8521a0b2c6b3 100644 (file)
@@ -988,9 +988,9 @@ MatrixFree<dim, Number, VectorizedArrayType>::initialize_indices(
 
       // set locally owned range for each component
       Assert(locally_owned_set[no].is_contiguous(), ExcNotImplemented());
-      dof_info[no].vector_partitioner.reset(
-        new Utilities::MPI::Partitioner(locally_owned_set[no],
-                                        task_info.communicator));
+      dof_info[no].vector_partitioner =
+        std::make_shared<Utilities::MPI::Partitioner>(locally_owned_set[no],
+                                                      task_info.communicator);
 
       // initialize the arrays for indices
       const unsigned int n_components_total =
@@ -1618,9 +1618,9 @@ MatrixFree<dim, Number, VectorizedArrayType>::initialize_indices(
               di.vector_partitioner_face_variants[0] = di.vector_partitioner;
             else
               {
-                di.vector_partitioner_face_variants[0].reset(
-                  new Utilities::MPI::Partitioner(part.locally_owned_range(),
-                                                  part.get_mpi_communicator()));
+                di.vector_partitioner_face_variants[0] =
+                  std::make_shared<Utilities::MPI::Partitioner>(
+                    part.locally_owned_range(), part.get_mpi_communicator());
                 const_cast<Utilities::MPI::Partitioner *>(
                   di.vector_partitioner_face_variants[0].get())
                   ->set_ghost_indices(compressed_set, part.ghost_indices());
@@ -1789,10 +1789,10 @@ MatrixFree<dim, Number, VectorizedArrayType>::initialize_indices(
                     vector_partitioner_values = di.vector_partitioner;
                   else
                     {
-                      vector_partitioner_values.reset(
-                        new Utilities::MPI::Partitioner(
+                      vector_partitioner_values =
+                        std::make_shared<Utilities::MPI::Partitioner>(
                           part.locally_owned_range(),
-                          part.get_mpi_communicator()));
+                          part.get_mpi_communicator());
                       const_cast<Utilities::MPI::Partitioner *>(
                         vector_partitioner_values.get())
                         ->set_ghost_indices(compressed_set,
@@ -1901,10 +1901,10 @@ MatrixFree<dim, Number, VectorizedArrayType>::initialize_indices(
                     vector_partitioner_gradients = di.vector_partitioner;
                   else
                     {
-                      vector_partitioner_gradients.reset(
-                        new Utilities::MPI::Partitioner(
+                      vector_partitioner_gradients =
+                        std::make_shared<Utilities::MPI::Partitioner>(
                           part.locally_owned_range(),
-                          part.get_mpi_communicator()));
+                          part.get_mpi_communicator());
                       const_cast<Utilities::MPI::Partitioner *>(
                         vector_partitioner_gradients.get())
                         ->set_ghost_indices(compressed_set,
@@ -1936,12 +1936,12 @@ MatrixFree<dim, Number, VectorizedArrayType>::initialize_indices(
             }
           else
             {
-              di.vector_partitioner_face_variants[3].reset(
-                new Utilities::MPI::Partitioner(part.locally_owned_range(),
-                                                part.get_mpi_communicator()));
-              di.vector_partitioner_face_variants[4].reset(
-                new Utilities::MPI::Partitioner(part.locally_owned_range(),
-                                                part.get_mpi_communicator()));
+              di.vector_partitioner_face_variants[3] =
+                std::make_shared<Utilities::MPI::Partitioner>(
+                  part.locally_owned_range(), part.get_mpi_communicator());
+              di.vector_partitioner_face_variants[4] =
+                std::make_shared<Utilities::MPI::Partitioner>(
+                  part.locally_owned_range(), part.get_mpi_communicator());
             }
         }
     }
index 9d71deab6d537b2774967058116a546308e79d08..5f93f4ed2f5a992dc9d37563412a0f89fde1ab7e 100644 (file)
@@ -1789,8 +1789,9 @@ namespace MatrixFreeOperators
     Assert((Base<dim, VectorType, VectorizedArrayType>::data.get() != nullptr),
            ExcNotInitialized());
 
-    this->inverse_diagonal_entries.reset(new DiagonalMatrix<VectorType>());
-    this->diagonal_entries.reset(new DiagonalMatrix<VectorType>());
+    this->inverse_diagonal_entries =
+      std::make_shared<DiagonalMatrix<VectorType>>();
+    this->diagonal_entries = std::make_shared<DiagonalMatrix<VectorType>>();
     VectorType &inverse_diagonal_vector =
       this->inverse_diagonal_entries->get_vector();
     VectorType &diagonal_vector = this->diagonal_entries->get_vector();
@@ -1977,8 +1978,9 @@ namespace MatrixFreeOperators
     Assert((Base<dim, VectorType, VectorizedArrayType>::data.get() != nullptr),
            ExcNotInitialized());
 
-    this->inverse_diagonal_entries.reset(new DiagonalMatrix<VectorType>());
-    this->diagonal_entries.reset(new DiagonalMatrix<VectorType>());
+    this->inverse_diagonal_entries =
+      std::make_shared<DiagonalMatrix<VectorType>>();
+    this->diagonal_entries = std::make_shared<DiagonalMatrix<VectorType>>();
     VectorType &inverse_diagonal_vector =
       this->inverse_diagonal_entries->get_vector();
     VectorType &diagonal_vector = this->diagonal_entries->get_vector();

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.