]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use nullptr instead of 0.
authorDavid Wells <wellsd2@rpi.edu>
Wed, 2 May 2018 19:12:40 +0000 (15:12 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Wed, 2 May 2018 19:12:40 +0000 (15:12 -0400)
include/deal.II/matrix_free/mapping_info.templates.h
include/deal.II/matrix_free/matrix_free.h
include/deal.II/matrix_free/matrix_free.templates.h
source/grid/grid_in.cc
source/lac/petsc_solver.cc
source/matrix_free/task_info.cc
source/non_matching/coupling.cc

index f68b58acf8fa306dca74d4f6eaa86dd8c954fb3e..e27f3730edf7f85ddcc13f4332ea77ed22a647d7 100644 (file)
@@ -1190,11 +1190,11 @@ namespace internal
                 faces[face].cells_exterior[0] == numbers::invalid_unsigned_int;
 
               if (is_boundary_face &&
-                  fe_boundary_face_values_container[my_q][0].get() == 0)
+                  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));
-              else if (fe_face_values_container[my_q][0].get() == 0)
+              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));
@@ -1306,7 +1306,7 @@ namespace internal
                       cell_it (&tria, cells[faces[face].cells_exterior[v]].first,
                                cells[faces[face].cells_exterior[v]].second);
 
-                      const FEValuesBase<dim> *actual_fe_face_values = 0;
+                      const FEValuesBase<dim> *actual_fe_face_values = nullptr;
                       if (faces[face].subface_index >=
                           GeometryInfo<dim>::max_children_per_cell)
                         {
@@ -1315,7 +1315,7 @@ namespace internal
                         }
                       else
                         {
-                          if (fe_subface_values_container[my_q][0].get() == 0)
+                          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));
index dc35f09d7d2afa6af3876fd098f5a937cd8fe948..f6519b45d67ab61d10e2da603e66b6070da70274 100644 (file)
@@ -2638,7 +2638,7 @@ namespace internal
            this->requests[component_in_block_vector]);
 
           matrix_free.release_scratch_data_non_threadsafe(tmp_data[component_in_block_vector]);
-          tmp_data[component_in_block_vector] = 0;
+          tmp_data[component_in_block_vector] = nullptr;
 #endif
         }
     }
@@ -2717,7 +2717,7 @@ namespace internal
            this->requests[component_in_block_vector]);
 
           matrix_free.release_scratch_data_non_threadsafe(tmp_data[component_in_block_vector]);
-          tmp_data[component_in_block_vector] = 0;
+          tmp_data[component_in_block_vector] = nullptr;
 #endif
         }
     }
index dca6f90436d53b42fc85de0ed3957f5bfc0bb007..7bda30fd676cf5b0bb7fb2a301c6ad4b7b545328 100644 (file)
@@ -150,7 +150,7 @@ MatrixFree<dim,Number>::get_cell_iterator(const unsigned int macro_cell_number,
   AssertIndexRange (macro_cell_number, task_info.cell_partition_data.back());
   AssertIndexRange (vector_number, n_components_filled(macro_cell_number));
 
-  const DoFHandler<dim> *dofh = 0;
+  const DoFHandler<dim> *dofh = nullptr;
   if (dof_handlers.active_dof_handler == DoFHandlers::usual)
     {
       AssertDimension (dof_handlers.dof_handler.size(),
index f7ad20c1414c0b3bcb3cfe80890459ac71d6557c..a13e19e53180e1dc6ab21c124f76a6d1147291ba 100644 (file)
@@ -1640,7 +1640,7 @@ void GridIn<2>::read_netcdf (const std::string &filename)
 #else
   const unsigned int dim=2;
   const unsigned int spacedim=2;
-  Assert (tria != 0, ExcNoTriangulationSelected());
+  Assert (tria != nullptr, ExcNoTriangulationSelected());
   // this function assumes the TAU
   // grid format.
   //
@@ -1877,7 +1877,7 @@ void GridIn<3>::read_netcdf (const std::string &filename)
 #else
   const unsigned int dim=3;
   const unsigned int spacedim=3;
-  Assert (tria != 0, ExcNoTriangulationSelected());
+  Assert (tria != nullptr, ExcNoTriangulationSelected());
   // this function assumes the TAU
   // grid format.
 
index 5774b3c75798574b3403560621f2d07796bb3d46..32549c019fed15c5660577c9eb6c839839cd5a47 100644 (file)
@@ -697,7 +697,7 @@ namespace PETScWrappers
     /**
      * creating a solver object if this is necessary
      */
-    if (solver_data.get() == 0)
+    if (solver_data == nullptr)
       {
         solver_data = std_cxx14::make_unique<SolverDataMUMPS >();
 
index 8ef9e0b814935977e26a9b0db477ecf0fe6c1436..aac1c06235edba0122fd3378ef5d4420dbb76103 100644 (file)
@@ -75,8 +75,8 @@ namespace internal
 
         void operator() () const
         {
-          MFWorkerInterface *used_worker = worker != 0 ? worker : *worker_pointer;
-          Assert(used_worker != 0, ExcInternalError());
+          MFWorkerInterface *used_worker = worker != nullptr ? worker : *worker_pointer;
+          Assert(used_worker != nullptr, ExcInternalError());
           used_worker->cell(std::make_pair(task_info.cell_partition_data[partition],
                                            task_info.cell_partition_data[partition+1]));
 
@@ -305,7 +305,7 @@ namespace internal
           worker.vector_update_ghosts_finish();
         else
           worker.vector_compress_start();
-        return 0;
+        return nullptr;
       }
 
     private:
index bd4ae01cc61feb971de2d97dc72b316cf0120f25..681925ebb39e4a0ea6f755d76d2108a35a0824b3 100644 (file)
@@ -58,7 +58,7 @@ namespace NonMatching
     AssertDimension(sparsity.n_cols(), immersed_dh.n_dofs());
     static_assert(dim1 <= dim0, "This function can only work if dim1 <= dim0");
     Assert((dynamic_cast<const parallel::distributed::Triangulation<dim1,spacedim> *>
-            (&immersed_dh.get_triangulation()) == 0), ExcNotImplemented());
+            (&immersed_dh.get_triangulation()) == nullptr), ExcNotImplemented());
 
     const auto &space_fe = space_dh.get_fe();
     const auto &immersed_fe = immersed_dh.get_fe();
@@ -158,7 +158,7 @@ namespace NonMatching
     AssertDimension(matrix.n(), immersed_dh.n_dofs());
     static_assert(dim1 <= dim0, "This function can only work if dim1 <= dim0");
     Assert((dynamic_cast<const parallel::distributed::Triangulation<dim1,spacedim>*>
-            (&immersed_dh.get_triangulation()) == 0), ExcNotImplemented());
+            (&immersed_dh.get_triangulation()) == nullptr), ExcNotImplemented());
 
     const auto &space_fe = space_dh.get_fe();
     const auto &immersed_fe = immersed_dh.get_fe();

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.