]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rename SmartPointer -> ObserverPointer.
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 9 Sep 2024 17:46:48 +0000 (11:46 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 12 Sep 2024 16:37:43 +0000 (10:37 -0600)
141 files changed:
doc/doxygen/headers/instantiations.h
doc/doxygen/headers/memory.h
doc/news/3.4.0-vs-4.0.0.h
doc/news/5.1.0-vs-5.2.0.h
doc/news/5.2.0-vs-6.0.0.h
doc/news/9.0.1-vs-9.1.0.h
doc/news/changes/minor/20240725Bangerth
examples/step-13/step-13.cc
examples/step-14/step-14.cc
examples/step-21/step-21.cc
examples/step-22/doc/results.dox
examples/step-22/step-22.cc
examples/step-31/step-31.cc
examples/step-32/step-32.cc
examples/step-39/step-39.cc
examples/step-43/step-43.cc
examples/step-45/step-45.cc
examples/step-55/step-55.cc
examples/step-59/step-59.cc
examples/step-69/step-69.cc
examples/step-7/step-7.cc
include/deal.II/algorithms/newton.h
include/deal.II/algorithms/theta_timestepping.h
include/deal.II/base/function_restriction.h
include/deal.II/base/logstream.h
include/deal.II/base/mpi_remote_point_evaluation.h
include/deal.II/base/quadrature_point_data.h
include/deal.II/base/smartpointer.h
include/deal.II/base/subscriptor.h
include/deal.II/distributed/cell_data_transfer.h
include/deal.II/distributed/fully_distributed_tria.h
include/deal.II/distributed/shared_tria.h
include/deal.II/distributed/tria.h
include/deal.II/dofs/dof_handler.h
include/deal.II/dofs/dof_handler_policy.h
include/deal.II/fe/fe_coupling_values.h
include/deal.II/fe/fe_series.h
include/deal.II/fe/fe_values_base.h
include/deal.II/fe/fe_values_views.h
include/deal.II/fe/mapping_fe_field.h
include/deal.II/fe/mapping_manifold.h
include/deal.II/fe/mapping_q1_eulerian.h
include/deal.II/fe/mapping_q_eulerian.h
include/deal.II/grid/composition_manifold.h
include/deal.II/grid/grid_in.h
include/deal.II/grid/grid_tools_cache.h
include/deal.II/grid/intergrid_map.h
include/deal.II/grid/manifold_lib.h
include/deal.II/grid/persistent_tria.h
include/deal.II/hp/fe_values.h
include/deal.II/lac/block_matrix_base.h
include/deal.II/lac/block_sparse_matrix.h
include/deal.II/lac/chunk_sparse_matrix.h
include/deal.II/lac/lapack_full_matrix.h
include/deal.II/lac/petsc_snes.h
include/deal.II/lac/petsc_solver.h
include/deal.II/lac/petsc_ts.h
include/deal.II/lac/precondition.h
include/deal.II/lac/precondition_block.h
include/deal.II/lac/precondition_selector.h
include/deal.II/lac/relaxation_block.h
include/deal.II/lac/solver_selector.h
include/deal.II/lac/sparse_matrix.h
include/deal.II/lac/sparse_vanka.h
include/deal.II/lac/sparse_vanka.templates.h
include/deal.II/matrix_free/fe_point_evaluation.h
include/deal.II/matrix_free/fe_remote_evaluation.h
include/deal.II/matrix_free/mapping_info.h
include/deal.II/matrix_free/matrix_free.h
include/deal.II/matrix_free/matrix_free.templates.h
include/deal.II/matrix_free/operators.h
include/deal.II/matrix_free/tools.h
include/deal.II/meshworker/assembler.h
include/deal.II/meshworker/dof_info.h
include/deal.II/meshworker/integration_info.h
include/deal.II/meshworker/scratch_data.h
include/deal.II/meshworker/simple.h
include/deal.II/meshworker/vector_selector.templates.h
include/deal.II/multigrid/mg_block_smoother.h
include/deal.II/multigrid/mg_coarse.h
include/deal.II/multigrid/mg_matrix.h
include/deal.II/multigrid/mg_transfer.h
include/deal.II/multigrid/mg_transfer_block.h
include/deal.II/multigrid/mg_transfer_component.h
include/deal.II/multigrid/mg_transfer_global_coarsening.h
include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h
include/deal.II/multigrid/multigrid.h
include/deal.II/non_matching/fe_values.h
include/deal.II/non_matching/mapping_info.h
include/deal.II/non_matching/mesh_classifier.h
include/deal.II/non_matching/quadrature_generator.h
include/deal.II/numerics/cell_data_transfer.h
include/deal.II/numerics/data_out_dof_data.h
include/deal.II/numerics/data_out_dof_data.templates.h
include/deal.II/numerics/data_out_resample.h
include/deal.II/numerics/data_out_stack.h
include/deal.II/numerics/dof_output_operator.h
include/deal.II/numerics/fe_field_function.h
include/deal.II/numerics/point_value_history.h
include/deal.II/numerics/solution_transfer.h
include/deal.II/numerics/time_dependent.h
include/deal.II/particles/particle_handler.h
source/base/subscriptor.cc
source/multigrid/mg_level_global_transfer.cc
source/non_matching/mesh_classifier.cc
source/non_matching/quadrature_generator.cc
source/numerics/time_dependent.cc
tests/algorithms/newton_01.cc
tests/algorithms/newton_02.cc
tests/algorithms/theta_01.cc
tests/base/assign_subscriptor.cc
tests/base/reference.cc
tests/base/smart_pointer_01.cc
tests/bits/joa_1.cc
tests/bits/sparse_lu_decomposition_1.cc
tests/bits/step-13.cc
tests/bits/step-14.cc
tests/bits/step-7.cc
tests/codim_one/bem_integration.cc
tests/dofs/dof_handler_redistributed_dofs_01.cc
tests/dofs/dof_handler_redistributed_dofs_02.cc
tests/fe/fe_conformity_test.h
tests/fe/fe_q_dg0.cc
tests/hp/step-13.cc
tests/hp/step-7.cc
tests/matrix_free/parallel_multigrid_adaptive_01.cc
tests/matrix_free/parallel_multigrid_adaptive_03.cc
tests/matrix_free/parallel_multigrid_adaptive_05.cc
tests/mpi/muelu_periodicity.cc
tests/mpi/periodicity_02.cc
tests/mpi/periodicity_03.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_01.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_03.cc
tests/multigrid-global-coarsening/parallel_multigrid_adaptive_05.cc
tests/non_matching/fe_immersed_surface_values.cc
tests/performance/instrumentation_step_22.cc
tests/performance/timing_mg_glob_coarsen.cc
tests/performance/timing_step_22.cc
tests/simplex/step-07.cc
tests/simplex/step-31.cc
tests/simplex/step-55.cc

index ebf752bf82c2d82b4a3eeae0e905d055cacfd3a7..d3597a98871db08984b84599a0c76759dbb4dc97 100644 (file)
  *
  * These are the classes, where no reasonable predetermined set of instances
  * exists. Therefore, all member definitions are included in the header file
- * and are instantiated wherever needed.  An example would be the SmartPointer
+ * and are instantiated wherever needed.  An example would be the ObserverPointer
  * class template that can be used with virtually any template argument.
  */
index a15d117a5c053fefcdb329d0326f5b475bb7fc0b..af44b75f58157ab8af3b874f15fae5c07f6b2eb4 100644 (file)
@@ -17,8 +17,8 @@
  * @defgroup memory Memory handling
  *
  * This group has some basic classes and namespaces for memory
- * handling. The Subscriptor and SmartPointer classes are used for
- * counted memory handling, i.e. whenever a SmartPointer is set to
+ * handling. The Subscriptor and ObserverPointer classes are used for
+ * counted memory handling, i.e. whenever a ObserverPointer is set to
  * point to an object, it increases a counter in that object; when the
  * pointer is set to point elsewhere, it decreases it again. This way,
  * one always knows how many users of an object there still are. While
index a1913df9fdc419c0e3bed00aa6922a4444056ea4..ae7ddd18e6d66aa09dcf2b7a2b99b70eff04307b 100644 (file)
@@ -385,7 +385,7 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 
   <li> <p>
        Fixed: The <code>Subscriptor</code> uses a counter to
-       count how many <code>SmartPointer</code> objects subscribe
+       count how many <code>ObserverPointer</code> objects subscribe
        to the pointed-to object. This counter needs to be a volatile variable
        in multithreaded mode, to avoid false compiler optimizations based on
        the assumption that the variable cannot change between two subsequent
index dffcaa9eefe24b7e12f7c4182024ae1e41450938..c690a9e4e493981397ce072f18ae2355503ab9d9 100644 (file)
@@ -494,7 +494,7 @@ inconvenience this causes.
        New: Class <code>Subscriptor</code> receives a
        text argument allowing to identify the violating pointer more
        easily. The additional feature is being incorporated into <code
-       class="class">SmartPointer</code> constructors throughout the
+       class="class">ObserverPointer</code> constructors throughout the
        library.
        <br>
        (GK, 2005/03/16)
index 46ee07061ce81ad57886f1592a1503ecc9b3e30a..1faa2fe8a1603cfd4d575087ca3c7ddee9388000 100644 (file)
@@ -552,7 +552,7 @@ inconvenience this causes.
        (WB 2006/08/02)
        </p>
 
-  <li> <p> Changed: When there is still a <code>SmartPointer</code> object
+  <li> <p> Changed: When there is still a <code>ObserverPointer</code> object
        pointing to another object at the time it is destroyed, this would cause
        the program to be aborted. However, there are cases where this is not
        desirable, for example here:
index f46900ce49cb5622478900e1690ef73dda08ec0f..25ee0ee089a2135aa53bc684050afb4081f453a2 100644 (file)
@@ -684,7 +684,7 @@ inconvenience this causes.
  </li>
 
  <li>
-  Changed: SmartPointer and Subscriptor use a `std::string`
+  Changed: ObserverPointer and Subscriptor use a `std::string`
   instead of a `const char *` for subscriber identification. As a result,
   subscriber strings are no longer compared by their memory address but instead
   by their content.
@@ -1287,10 +1287,10 @@ inconvenience this causes.
  </li>
 
  <li>
-  Changed: The class Subscriptor and SmartPointer check for dangling pointers and
+  Changed: The class Subscriptor and ObserverPointer check for dangling pointers and
   use-after-move. The destructor of Subscriptor doesn't signal an error when there
   is still an object subscribed to it. Instead, validity is checked when
-  dereferencing the SmartPointer object.
+  dereferencing the ObserverPointer object.
   <br>
   (Daniel Arndt, 2018/11/02)
  </li>
index bb22192d5d703a07588e4d11c6cee3549865dea9..2d46cb94a198a7d4e962041b6bb5cc000999b7a2 100644 (file)
@@ -1,6 +1,6 @@
-Deprecated: SmartPointer is clearly documented as not owning the
-object it points to. Yet, SmartPointer::clear() deletes the object
-pointed to, thereby assuming that the SmartPointer object actually
+Deprecated: ObserverPointer is clearly documented as not owning the
+object it points to. Yet, ObserverPointer::clear() deletes the object
+pointed to, thereby assuming that the ObserverPointer object actually
 owns the object. This must surely be confusing. As a consequence the
 function is now deprecated.
 <br>
index b20b827c6a691fcf98028a508ef7598f36180c0e..a57da8fd55d92e47ab3140db146c7c94c43bed9d 100644 (file)
@@ -469,7 +469,7 @@ namespace Step13
     // a triangulation in the constructor and storing it henceforth. Since
     // this triangulation will be used throughout all computations, we have to
     // make sure that the triangulation is valid until it is last used. We
-    // do this by keeping a <code>SmartPointer</code> to this triangulation,
+    // do this by keeping a <code>ObserverPointer</code> to this triangulation,
     // as explained in step-7.
     //
     // Note that while the pointer itself is declared constant
@@ -496,7 +496,7 @@ namespace Step13
       virtual unsigned int n_dofs() const                           = 0;
 
     protected:
-      const SmartPointer<Triangulation<dim>> triangulation;
+      const ObserverPointer<Triangulation<dim>> triangulation;
     };
 
 
@@ -568,11 +568,11 @@ namespace Step13
       // member variables, of which the use should be clear from the previous
       // examples:
     protected:
-      const SmartPointer<const FiniteElement<dim>> fe;
-      const SmartPointer<const Quadrature<dim>>    quadrature;
-      DoFHandler<dim>                              dof_handler;
-      Vector<double>                               solution;
-      const SmartPointer<const Function<dim>>      boundary_values;
+      const ObserverPointer<const FiniteElement<dim>> fe;
+      const ObserverPointer<const Quadrature<dim>>    quadrature;
+      DoFHandler<dim>                                 dof_handler;
+      Vector<double>                                  solution;
+      const ObserverPointer<const Function<dim>>      boundary_values;
 
       // Then we declare an abstract function that will be used to assemble
       // the right hand side. As explained above, there are various cases for
@@ -996,7 +996,7 @@ namespace Step13
     // constructor takes the same data as does that of the underlying class
     // (to which it passes all information) except for one function object
     // that denotes the right hand side of the problem. A pointer to this
-    // object is stored (again as a <code>SmartPointer</code>, in order to
+    // object is stored (again as a <code>ObserverPointer</code>, in order to
     // make sure that the function object is not deleted as long as it is
     // still used by this class).
     //
@@ -1013,7 +1013,7 @@ namespace Step13
                    const Function<dim>      &boundary_values);
 
     protected:
-      const SmartPointer<const Function<dim>> rhs_function;
+      const ObserverPointer<const Function<dim>> rhs_function;
       virtual void assemble_rhs(Vector<double> &rhs) const override;
     };
 
index e4aba7f6c43703d373acc0ce14bede1ff9cc01be..bf57bc6b015c7e5f4213147704c480d10bd59a06 100644 (file)
@@ -355,7 +355,7 @@ namespace Step14
       virtual void output_solution() const = 0;
 
     protected:
-      const SmartPointer<Triangulation<dim>> triangulation;
+      const ObserverPointer<Triangulation<dim>> triangulation;
 
       unsigned int refinement_cycle;
     };
@@ -399,12 +399,12 @@ namespace Step14
       virtual unsigned int n_dofs() const override;
 
     protected:
-      const SmartPointer<const FiniteElement<dim>>  fe;
-      const SmartPointer<const Quadrature<dim>>     quadrature;
-      const SmartPointer<const Quadrature<dim - 1>> face_quadrature;
-      DoFHandler<dim>                               dof_handler;
-      Vector<double>                                solution;
-      const SmartPointer<const Function<dim>>       boundary_values;
+      const ObserverPointer<const FiniteElement<dim>>  fe;
+      const ObserverPointer<const Quadrature<dim>>     quadrature;
+      const ObserverPointer<const Quadrature<dim - 1>> face_quadrature;
+      DoFHandler<dim>                                  dof_handler;
+      Vector<double>                                   solution;
+      const ObserverPointer<const Function<dim>>       boundary_values;
 
       virtual void assemble_rhs(Vector<double> &rhs) const = 0;
 
@@ -709,7 +709,7 @@ namespace Step14
       virtual void output_solution() const override;
 
     protected:
-      const SmartPointer<const Function<dim>> rhs_function;
+      const ObserverPointer<const Function<dim>> rhs_function;
       virtual void assemble_rhs(Vector<double> &rhs) const override;
     };
 
@@ -913,7 +913,7 @@ namespace Step14
       virtual void refine_grid() override;
 
     private:
-      const SmartPointer<const Function<dim>> weighting_function;
+      const ObserverPointer<const Function<dim>> weighting_function;
     };
 
 
@@ -1051,7 +1051,7 @@ namespace Step14
     // @sect4{The SetUpBase and SetUp classes}
 
     // Based on the above description, the <code>SetUpBase</code> class then
-    // looks as follows. To allow using the <code>SmartPointer</code> class
+    // looks as follows. To allow using the <code>ObserverPointer</code> class
     // with this class, we derived from the <code>Subscriptor</code> class.
     template <int dim>
     struct SetUpBase : public Subscriptor
@@ -1624,7 +1624,7 @@ namespace Step14
         const DualFunctional::DualFunctionalBase<dim> &dual_functional);
 
     protected:
-      const SmartPointer<const DualFunctional::DualFunctionalBase<dim>>
+      const ObserverPointer<const DualFunctional::DualFunctionalBase<dim>>
                    dual_functional;
       virtual void assemble_rhs(Vector<double> &rhs) const override;
 
@@ -1757,8 +1757,8 @@ namespace Step14
       // that will serve as the "scratch data" class of the WorkStream concept:
       struct CellData
       {
-        FEValues<dim>                           fe_values;
-        const SmartPointer<const Function<dim>> right_hand_side;
+        FEValues<dim>                              fe_values;
+        const ObserverPointer<const Function<dim>> right_hand_side;
 
         std::vector<double> cell_residual;
         std::vector<double> rhs_values;
index cea9403e911322ea1256c8764a8d46838c1e179b..589fd2f20e410f42def8cb8155a33cfab126659d 100644 (file)
@@ -428,7 +428,7 @@ namespace Step21
     }
 
   private:
-    const SmartPointer<const MatrixType> matrix;
+    const ObserverPointer<const MatrixType> matrix;
   };
 
 
@@ -452,8 +452,8 @@ namespace Step21
     }
 
   private:
-    const SmartPointer<const BlockSparseMatrix<double>>           system_matrix;
-    const SmartPointer<const InverseMatrix<SparseMatrix<double>>> m_inverse;
+    const ObserverPointer<const BlockSparseMatrix<double>> system_matrix;
+    const ObserverPointer<const InverseMatrix<SparseMatrix<double>>> m_inverse;
 
     mutable Vector<double> tmp1, tmp2;
   };
@@ -477,7 +477,7 @@ namespace Step21
     }
 
   private:
-    const SmartPointer<const BlockSparseMatrix<double>> system_matrix;
+    const ObserverPointer<const BlockSparseMatrix<double>> system_matrix;
 
     mutable Vector<double> tmp1, tmp2;
   };
index 30473dc2257e26373877292f45166bd19805f7c0..0aba8a21ad4750864dbfa0ea73bee5c0e386bb5e 100644 (file)
@@ -418,8 +418,8 @@ class BlockSchurPreconditioner : public Subscriptor
               const BlockVector<double> &src) const;
 
   private:
-    const SmartPointer<const BlockSparseMatrix<double> > system_matrix;
-    const SmartPointer<const InverseMatrix<SparseMatrix<double>,
+    const ObserverPointer<const BlockSparseMatrix<double> > system_matrix;
+    const ObserverPointer<const InverseMatrix<SparseMatrix<double>,
                        PreconditionerMp > > m_inverse;
     const PreconditionerA &a_preconditioner;
 
index 9fcfc2a36b063001f7b20b698f5e3732fa2fd81e..22634bd4cbbad214fdeeabecf3bb91f14c9e92ce 100644 (file)
@@ -288,8 +288,8 @@ namespace Step22
     void vmult(Vector<double> &dst, const Vector<double> &src) const;
 
   private:
-    const SmartPointer<const MatrixType>         matrix;
-    const SmartPointer<const PreconditionerType> preconditioner;
+    const ObserverPointer<const MatrixType>         matrix;
+    const ObserverPointer<const PreconditionerType> preconditioner;
   };
 
 
@@ -335,7 +335,7 @@ namespace Step22
   // consequence of the definition above, the declaration
   // <code>InverseMatrix</code> now contains the second template parameter for
   // a preconditioner class as above, which affects the
-  // <code>SmartPointer</code> object <code>m_inverse</code> as well.
+  // <code>ObserverPointer</code> object <code>m_inverse</code> as well.
   template <class PreconditionerType>
   class SchurComplement : public Subscriptor
   {
@@ -347,8 +347,8 @@ namespace Step22
     void vmult(Vector<double> &dst, const Vector<double> &src) const;
 
   private:
-    const SmartPointer<const BlockSparseMatrix<double>> system_matrix;
-    const SmartPointer<
+    const ObserverPointer<const BlockSparseMatrix<double>> system_matrix;
+    const ObserverPointer<
       const InverseMatrix<SparseMatrix<double>, PreconditionerType>>
       A_inverse;
 
index 3812ddb9a6dbea5c2b59314f551f85334959ba4c..4181ce8650396a0e3aeb244aa5e21f980fe4afe1 100644 (file)
@@ -253,8 +253,8 @@ namespace Step31
       void vmult(VectorType &dst, const VectorType &src) const;
 
     private:
-      const SmartPointer<const MatrixType> matrix;
-      const PreconditionerType            &preconditioner;
+      const ObserverPointer<const MatrixType> matrix;
+      const PreconditionerType               &preconditioner;
     };
 
 
@@ -355,10 +355,10 @@ namespace Step31
                  const TrilinosWrappers::MPI::BlockVector &src) const;
 
     private:
-      const SmartPointer<const TrilinosWrappers::BlockSparseMatrix>
+      const ObserverPointer<const TrilinosWrappers::BlockSparseMatrix>
         stokes_matrix;
-      const SmartPointer<const InverseMatrix<TrilinosWrappers::SparseMatrix,
-                                             PreconditionerTypeMp>>
+      const ObserverPointer<const InverseMatrix<TrilinosWrappers::SparseMatrix,
+                                                PreconditionerTypeMp>>
                                  m_inverse;
       const PreconditionerTypeA &a_preconditioner;
 
index e0db852efb072094b89fffa1161bd3090efde448..0b78838c35419dc5cdd41bcbb3993441aea17d94 100644 (file)
@@ -277,9 +277,9 @@ namespace Step32
       }
 
     private:
-      const SmartPointer<const TrilinosWrappers::BlockSparseMatrix>
+      const ObserverPointer<const TrilinosWrappers::BlockSparseMatrix>
         stokes_matrix;
-      const SmartPointer<const TrilinosWrappers::BlockSparseMatrix>
+      const ObserverPointer<const TrilinosWrappers::BlockSparseMatrix>
                                   stokes_preconditioner_matrix;
       const PreconditionerTypeMp &mp_preconditioner;
       const PreconditionerTypeA  &a_preconditioner;
index d7f2b54eefe2e7c84251a323d5dfceec76249dbb..47e4d05e56652e8eb3b47659d66cfacec0fca9ed 100644 (file)
@@ -620,7 +620,7 @@ namespace Step39
     mg_matrix_dg_down.clear_elements();
     // It is important to update the sparsity patterns after <tt>clear()</tt>
     // was called for the level matrices, since the matrices lock the sparsity
-    // pattern through the SmartPointer and Subscriptor mechanism.
+    // pattern through the ObserverPointer and Subscriptor mechanism.
     mg_sparsity.resize(0, n_levels - 1);
     mg_sparsity_dg_interface.resize(0, n_levels - 1);
 
index 2b82b6f765c958c47dcd635ca48efcd68af17a7d..036e32f792da25de54ee1316843cad768e53f5ef 100644 (file)
@@ -329,8 +329,8 @@ namespace Step43
       void vmult(VectorType &dst, const VectorType &src) const;
 
     private:
-      const SmartPointer<const MatrixType> matrix;
-      const PreconditionerType            &preconditioner;
+      const ObserverPointer<const MatrixType> matrix;
+      const PreconditionerType               &preconditioner;
     };
 
 
@@ -379,10 +379,10 @@ namespace Step43
                  const TrilinosWrappers::MPI::BlockVector &src) const;
 
     private:
-      const SmartPointer<const TrilinosWrappers::BlockSparseMatrix>
+      const ObserverPointer<const TrilinosWrappers::BlockSparseMatrix>
         darcy_matrix;
-      const SmartPointer<const InverseMatrix<TrilinosWrappers::SparseMatrix,
-                                             PreconditionerTypeMp>>
+      const ObserverPointer<const InverseMatrix<TrilinosWrappers::SparseMatrix,
+                                                PreconditionerTypeMp>>
                                  m_inverse;
       const PreconditionerTypeA &a_preconditioner;
 
index 52b599eaa5ca369aa65733634085f9c673a2404b..9cd59e495ad81a1e95a37226e2bca1e433e42ab6 100644 (file)
@@ -197,8 +197,8 @@ namespace Step45
                const TrilinosWrappers::MPI::Vector &src) const;
 
   private:
-    const SmartPointer<const MatrixType>         matrix;
-    const SmartPointer<const PreconditionerType> preconditioner;
+    const ObserverPointer<const MatrixType>         matrix;
+    const ObserverPointer<const PreconditionerType> preconditioner;
 
     mutable TrilinosWrappers::MPI::Vector tmp;
   };
@@ -248,8 +248,9 @@ namespace Step45
                const TrilinosWrappers::MPI::Vector &src) const;
 
   private:
-    const SmartPointer<const TrilinosWrappers::BlockSparseMatrix> system_matrix;
-    const SmartPointer<
+    const ObserverPointer<const TrilinosWrappers::BlockSparseMatrix>
+      system_matrix;
+    const ObserverPointer<
       const InverseMatrix<TrilinosWrappers::SparseMatrix, PreconditionerType>>
                                           A_inverse;
     mutable TrilinosWrappers::MPI::Vector tmp1, tmp2;
index 444d06be16bd73d3c6d30c5b3adc1aeacdc438ac..ec65240c803cea182933a76754fa6681b451910f 100644 (file)
@@ -106,8 +106,8 @@ namespace Step55
       void vmult(VectorType &dst, const VectorType &src) const;
 
     private:
-      const SmartPointer<const Matrix> matrix;
-      const Preconditioner            &preconditioner;
+      const ObserverPointer<const Matrix> matrix;
+      const Preconditioner               &preconditioner;
     };
 
 
index 570b76642ba8cccd2aff78d1dcb64e721fc74794..e6b128af1c0e55487d2e8522ff687aa78222eb6b 100644 (file)
@@ -149,7 +149,7 @@ namespace Step59
   // general-purpose class MatrixFreeOperators::Base. We derive the class from
   // the Subscriptor class to be able to use the operator within the Chebyshev
   // preconditioner because that preconditioner stores the underlying matrix
-  // via a SmartPointer.
+  // via a ObserverPointer.
   //
   // Given that we implement a complete matrix interface by hand, we need to
   // add an `initialize()` function, an `m()` function, a `vmult()` function,
index 40a31a377adb704a7b0b95e6f65f20e1ab764c7c..bae77776fb0c3fe9910218a6024b866f55b202a7 100644 (file)
@@ -239,7 +239,7 @@ namespace Step69
     const MPI_Comm mpi_communicator;
     TimerOutput   &computing_timer;
 
-    SmartPointer<const Discretization<dim>> discretization;
+    ObserverPointer<const Discretization<dim>> discretization;
   };
 
   // @sect4{The <code>ProblemDescription</code> class}
@@ -401,8 +401,8 @@ namespace Step69
     const MPI_Comm mpi_communicator;
     TimerOutput   &computing_timer;
 
-    SmartPointer<const OfflineData<dim>>   offline_data;
-    SmartPointer<const InitialValues<dim>> initial_values;
+    ObserverPointer<const OfflineData<dim>>   offline_data;
+    ObserverPointer<const InitialValues<dim>> initial_values;
 
     SparseMatrix<double> dij_matrix;
 
@@ -454,7 +454,7 @@ namespace Step69
     const MPI_Comm mpi_communicator;
     TimerOutput   &computing_timer;
 
-    SmartPointer<const OfflineData<dim>> offline_data;
+    ObserverPointer<const OfflineData<dim>> offline_data;
 
     Vector<double> r;
 
index 12bf1e4518b2b722787918e7c9c36f42db3a5aea..84fea14faa2f77777a5838a3ca4a9730b5df8c10 100644 (file)
@@ -44,7 +44,7 @@
 #include <deal.II/dofs/dof_renumbering.h>
 // Then we will show a little trick how we can make sure that objects are not
 // deleted while they are still in use. For this purpose, deal.II has the
-// SmartPointer helper class, which is declared in this file:
+// ObserverPointer helper class, which is declared in this file:
 #include <deal.II/base/smartpointer.h>
 // Next, we will want to use the function VectorTools::integrate_difference()
 // mentioned in the introduction, and we are going to use a ConvergenceTable
@@ -379,9 +379,9 @@ namespace Step7
     // subscribing class is expected to check the value stored in its
     // corresponding pointer before trying to access the object subscribed to.
     //
-    // This is exactly what the SmartPointer class is doing. It basically acts
-    // just like a pointer, i.e. it can be dereferenced, can be assigned to and
-    // from other pointers, and so on. On top of that it uses the mechanism
+    // This is exactly what the ObserverPointer class is doing. It basically
+    // acts just like a pointer, i.e. it can be dereferenced, can be assigned to
+    // and from other pointers, and so on. On top of that it uses the mechanism
     // described above to find out if the pointer this class is representing is
     // dangling when we try to dereference it. In that case an exception is
     // thrown.
@@ -389,9 +389,9 @@ namespace Step7
     // In the present example program, we want to protect the finite element
     // object from the situation that for some reason the finite element
     // pointed to is destroyed while still in use. We therefore use a
-    // SmartPointer to the finite element object; since the finite element
+    // ObserverPointer to the finite element object; since the finite element
     // object is actually never changed in our computations, we pass a const
-    // FiniteElement&lt;dim&gt; as template argument to the SmartPointer
+    // FiniteElement&lt;dim&gt; as template argument to the ObserverPointer
     // class. Note that the pointer so declared is assigned at construction
     // time of the solve object, and destroyed upon destruction, so the lock
     // on the destruction of the finite element object extends throughout the
@@ -399,7 +399,7 @@ namespace Step7
     Triangulation<dim> triangulation;
     DoFHandler<dim>    dof_handler;
 
-    SmartPointer<const FiniteElement<dim>> fe;
+    ObserverPointer<const FiniteElement<dim>> fe;
 
     AffineConstraints<double> hanging_node_constraints;
 
index e6de216bba168592be01f4e65fe995cb4bfbe3d5..bb1bb244b2cb1ec24d3cf4d70e69b27f1f98eac6 100644 (file)
@@ -123,18 +123,18 @@ namespace Algorithms
     /**
      * The operator computing the residual.
      */
-    SmartPointer<OperatorBase, Newton<VectorType>> residual;
+    ObserverPointer<OperatorBase, Newton<VectorType>> residual;
 
     /**
      * The operator applying the inverse derivative to the residual.
      */
-    SmartPointer<OperatorBase, Newton<VectorType>> inverse_derivative;
+    ObserverPointer<OperatorBase, Newton<VectorType>> inverse_derivative;
 
     /**
      * The operator handling the output in case the debug_vectors is true.
      * Call the initialize function first.
      */
-    SmartPointer<OutputOperator<VectorType>, Newton<VectorType>> data_out;
+    ObserverPointer<OutputOperator<VectorType>, Newton<VectorType>> data_out;
 
     /**
      * This flag is set by the function assemble(), indicating that the matrix
index 69a7dd2e59078f6376cbcaff43a489a7818ea670..104f6968a407ed95961a3530b0ed1b7ac80e721d 100644 (file)
@@ -129,7 +129,7 @@ namespace Algorithms
    * them <code>Implicit</code> and <code>Explicit</code>. They both share the
    * public interface of Operator, and additionally provide storage for the
    * matrices to be used and a pointer to TimestepData. Note that we do not
-   * use a SmartPointer here, since the TimestepData will be destroyed before
+   * use a ObserverPointer here, since the TimestepData will be destroyed before
    * the operator.
    *
    * @code
@@ -140,7 +140,7 @@ namespace Algorithms
    *   void operator()(AnyData &out, const AnyData &in);
    *
    * private:
-   *   SmartPointer<const FullMatrix<double>, Explicit> matrix;
+   *   ObserverPointer<const FullMatrix<double>, Explicit> matrix;
    *   FullMatrix<double>                               m;
    * };
    *
@@ -151,7 +151,7 @@ namespace Algorithms
    *   void operator()(AnyData &out, const AnyData &in);
    *
    * private:
-   *   SmartPointer<const FullMatrix<double>, Implicit> matrix;
+   *   ObserverPointer<const FullMatrix<double>, Implicit> matrix;
    *   FullMatrix<double>                               m;
    * };
    * @endcode
@@ -412,7 +412,7 @@ namespace Algorithms
      * vector, $M$ the @ref GlossMassMatrix "mass matrix", $F$ the operator in space and $c$ is the
      * adjusted time step size $(1-\theta) \Delta t$.
      */
-    SmartPointer<OperatorBase, ThetaTimestepping<VectorType>> op_explicit;
+    ObserverPointer<OperatorBase, ThetaTimestepping<VectorType>> op_explicit;
 
     /**
      * The operator solving the implicit part of the scheme. It will receive
@@ -424,12 +424,12 @@ namespace Algorithms
      * the input data, <i>M</i> the @ref GlossMassMatrix "mass matrix", <i>F</i> the operator in
      * space and <i>c</i> is the adjusted time step size $ \theta \Delta t$
      */
-    SmartPointer<OperatorBase, ThetaTimestepping<VectorType>> op_implicit;
+    ObserverPointer<OperatorBase, ThetaTimestepping<VectorType>> op_implicit;
 
     /**
      * The operator writing the output in each time step
      */
-    SmartPointer<OutputOperator<VectorType>, ThetaTimestepping<VectorType>>
+    ObserverPointer<OutputOperator<VectorType>, ThetaTimestepping<VectorType>>
       output;
   };
 
index b724944b5189756b542ac06e8a3cdf4741bc9b4c..3af56b723b70329b37f2972b021c77f72a3c27db 100644 (file)
@@ -74,7 +74,7 @@ namespace Functions
 
   private:
     // The higher-dimensional function that has been restricted.
-    const SmartPointer<const Function<dim + 1>> function;
+    const ObserverPointer<const Function<dim + 1>> function;
 
     // The (`dim + 1`)-coordinate direction that has been restricted.
     const unsigned int restricted_direction;
@@ -133,7 +133,7 @@ namespace Functions
 
   private:
     // The higher-dimensional function that has been restricted.
-    const SmartPointer<const Function<dim + 1>> function;
+    const ObserverPointer<const Function<dim + 1>> function;
 
     // The (`dim + 1`)-coordinate direction that is kept "open"
     const unsigned int open_direction;
index 762a5141d2e9ec1b85de4c7fceed523f95095014..c74deb3bf8eedcb536c7b383f641bd8249701121 100644 (file)
@@ -122,7 +122,7 @@ public:
      * A pointer to the LogStream object to which the prefix is
      * applied.
      */
-    SmartPointer<LogStream, LogStream::Prefix> stream;
+    ObserverPointer<LogStream, LogStream::Prefix> stream;
   };
 
 
index d1f844d3fc3db479961470c5bdf7e2e7f77d6c00..de557a0b209d53e921b3ccc8f2ca356742b1b2db 100644 (file)
@@ -438,12 +438,12 @@ namespace Utilities
       /**
        * Reference to the Triangulation object used during reinit().
        */
-      SmartPointer<const Triangulation<dim, spacedim>> tria;
+      ObserverPointer<const Triangulation<dim, spacedim>> tria;
 
       /**
        * Reference to the Mapping object used during reinit().
        */
-      SmartPointer<const Mapping<dim, spacedim>> mapping;
+      ObserverPointer<const Mapping<dim, spacedim>> mapping;
 
       /**
        * (One-to-one) relation of points and cells.
index 92ccf49adcc3289cde7c33d12191708884ece58b..a1fa0a48f5e4e143590b38bcff6f211b46ea519c 100644 (file)
@@ -91,7 +91,7 @@ public:
    * may reflect, for example, different constitutive models of continuum
    * mechanics in different parts of the domain.
    *
-   * @note The first time this method is called, it stores a SmartPointer to the
+   * @note The first time this method is called, it stores a ObserverPointer to the
    * Triangulation object that owns the cell. The future invocations of this
    * method expects the cell to be from the same stored triangulation.
    *
@@ -227,8 +227,8 @@ private:
    * Triangulation, we need to store a reference to that Triangulation within
    * the class.
    */
-  SmartPointer<const Triangulation<dimension, space_dimension>,
-               CellDataStorage<CellIteratorType, DataType>>
+  ObserverPointer<const Triangulation<dimension, space_dimension>,
+                  CellDataStorage<CellIteratorType, DataType>>
     tria;
 
   /**
index 98ce6566608d5b6b9959ed50b0ea16a6306fe33a..647d185efb7cd397ee1b08a6bda02f7bb492f61d 100644 (file)
@@ -48,9 +48,9 @@ DEAL_II_NAMESPACE_OPEN
  * object (which for this purpose needs to be derived from the Subscriptor
  * class), and ensuring that the pointed-to object's destructor triggers an
  * error if that use-count is larger than zero -- i.e., if there are still
- * observing SmartPointer objects pointing to it.
+ * observing ObserverPointer objects pointing to it.
  *
- * Conceptually, SmartPointer fills a gap between `std::unique_ptr` and
+ * Conceptually, ObserverPointer fills a gap between `std::unique_ptr` and
  * `std::shared_ptr`. While the former makes it clear that there is a unique
  * owner of an object (namely the scope in which the `std::unique_ptr` resides),
  * it does not allow other places in a code base to point to the object. In
@@ -58,74 +58,75 @@ DEAL_II_NAMESPACE_OPEN
  * but none of them is the "owner" of the object: They all are, and the last
  * one to stop pointing to the object is responsible for deleting it.
  *
- * SmartPointer utilizes semantics in which one place owns an object and others
- * can point to it. The owning place is responsible for destroying the object
- * when it is no longer needed, and as mentioned above, this will trigger an
- * error if other places are still pointing to it via SmartPointer pointers.
+ * ObserverPointer utilizes semantics in which one place owns an object and
+ * others can point to it. The owning place is responsible for destroying the
+ * object when it is no longer needed, and as mentioned above, this will trigger
+ * an error if other places are still pointing to it via ObserverPointer
+ * pointers.
  *
  * In practice, using this scheme, if you try to destroy an object to which
- * observers still point via SmartPointer objects, you will get an error that
+ * observers still point via ObserverPointer objects, you will get an error that
  * says that there are still observers of the object and that the object can
  * consequently not be destroyed without creating "dangling" pointers. This
  * is often not very helpful in *finding* where these pointers are. As a
  * consequence, this class also provides two ways to annotate the observer
  * count with information about what other places still observe an object.
- * First, when initializing a SmartPointer object with the address of the
+ * First, when initializing a ObserverPointer object with the address of the
  * object pointed to, you can also attach a string that describes the
  * observing location, and this string will then be shown in error messages
  * listing all remaining observers. Second, if no such string is provided,
  * the name second template argument `P` is used as the debug string. This
- * allows to encode the observer information in the type of the SmartPointer.
+ * allows to encode the observer information in the type of the ObserverPointer.
  *
- * @note Unlike `std::unique_ptr` and `std::shared_ptr`, SmartPointer does
+ * @note Unlike `std::unique_ptr` and `std::shared_ptr`, ObserverPointer does
  *   NOT implement any memory handling. In particular, deleting a
- *   SmartPointer does not delete the object because the semantics
+ *   ObserverPointer does not delete the object because the semantics
  *   of this class are that it only *observes* an object, but does not
  *   take over ownership. As a consequence, this is a sure way of creating
  *   a memory leak:
  *   @code
- *     SmartPointer<T> dont_do_this = new T;
+ *     ObserverPointer<T> dont_do_this = new T;
  *   @endcode
  *   This is because here, no variable "owns" the object pointed to, and
  *   the destruction of the `dont_do_this` pointer does not trigger the
  *   release of the memory pointed to.
  *
  * @note This class correctly handles `const`-ness of an object, i.e.,
- *   a `SmartPointer<const T>` really behaves as if it were a pointer
+ *   a `ObserverPointer<const T>` really behaves as if it were a pointer
  *   to a constant object (disallowing write access when dereferenced), while
- *   `SmartPointer<T>` is a mutable pointer.
+ *   `ObserverPointer<T>` is a mutable pointer.
  *
  * @dealiiConceptRequires{std::is_base_of_v<Subscriptor, T>}
  *
  * @ingroup memory
  */
 template <typename T, typename P = void>
-class SmartPointer
+class ObserverPointer
 {
 public:
   /**
    * Standard constructor for null pointer. The id of this pointer is set to
    * the name of the class P.
    */
-  SmartPointer();
+  ObserverPointer();
 
   /**
-   * Copy constructor for SmartPointer. We do not copy the object subscribed
+   * Copy constructor for ObserverPointer. We do not copy the object subscribed
    * to from <tt>tt</tt>, but subscribe ourselves to it again.
    */
   template <class Q>
-  SmartPointer(const SmartPointer<T, Q> &other);
+  ObserverPointer(const ObserverPointer<T, Q> &other);
 
   /**
-   * Copy constructor for SmartPointer. We do not copy the object subscribed
+   * Copy constructor for ObserverPointer. We do not copy the object subscribed
    * to from <tt>tt</tt>, but subscribe ourselves to it again.
    */
-  SmartPointer(const SmartPointer<T, P> &other);
+  ObserverPointer(const ObserverPointer<T, P> &other);
 
   /**
-   * Move constructor for SmartPointer.
+   * Move constructor for ObserverPointer.
    */
-  SmartPointer(SmartPointer<T, P> &&other) noexcept;
+  ObserverPointer(ObserverPointer<T, P> &&other) noexcept;
 
   /**
    * Constructor taking a normal pointer. If possible, i.e. if the pointer is
@@ -133,9 +134,9 @@ public:
    * lock it, i.e. to prevent its destruction before the end of its use.
    *
    * The <tt>id</tt> is used in the call to Subscriptor::subscribe(id) and by
-   * ~SmartPointer() in the call to Subscriptor::unsubscribe().
+   * ~ObserverPointer() in the call to Subscriptor::unsubscribe().
    */
-  SmartPointer(T *t, const std::string &id);
+  ObserverPointer(T *t, const std::string &id);
 
   /**
    * Constructor taking a normal pointer. If possible, i.e. if the pointer is
@@ -143,12 +144,12 @@ public:
    * lock it, i.e. to prevent its destruction before the end of its use. The
    * id of this pointer is set to the name of the class P.
    */
-  SmartPointer(T *t);
+  ObserverPointer(T *t);
 
   /**
    * Destructor, removing the subscription.
    */
-  ~SmartPointer();
+  ~ObserverPointer();
 
   /**
    * Assignment operator for normal pointers. The pointer subscribes to the
@@ -156,35 +157,35 @@ public:
    * will not try to subscribe to a null-pointer, but still delete the old
    * subscription.
    */
-  SmartPointer<T, P> &
+  ObserverPointer<T, P> &
   operator=(T *tt);
 
   /**
-   * Assignment operator for SmartPointer. The pointer subscribes to the new
+   * Assignment operator for ObserverPointer. The pointer subscribes to the new
    * object automatically and unsubscribes to an old one if it exists.
    */
   template <class Q>
-  SmartPointer<T, P> &
-  operator=(const SmartPointer<T, Q> &other);
+  ObserverPointer<T, P> &
+  operator=(const ObserverPointer<T, Q> &other);
 
   /**
-   * Assignment operator for SmartPointer. The pointer subscribes to the new
+   * Assignment operator for ObserverPointer. The pointer subscribes to the new
    * object automatically and unsubscribes to an old one if it exists.
    */
-  SmartPointer<T, P> &
-  operator=(const SmartPointer<T, P> &other);
+  ObserverPointer<T, P> &
+  operator=(const ObserverPointer<T, P> &other);
 
   /**
-   * Move assignment operator for SmartPointer.
+   * Move assignment operator for ObserverPointer.
    */
-  SmartPointer<T, P> &
-  operator=(SmartPointer<T, P> &&other) noexcept;
+  ObserverPointer<T, P> &
+  operator=(ObserverPointer<T, P> &&other) noexcept;
 
   /**
    * Delete the object pointed to and set the pointer to nullptr. Note
    * that unlike what the documentation of the class describes, *this
    * function actually deletes the object pointed to*. That is, this
-   * function assumes a SmartPointer's ownership of the object pointed to.
+   * function assumes a ObserverPointer's ownership of the object pointed to.
    *
    * @deprecated This function is deprecated. It does not use the
    * semantics we usually use for this class, and its use is surely
@@ -231,7 +232,7 @@ public:
    */
   template <class Q>
   void
-  swap(SmartPointer<T, Q> &tt);
+  swap(ObserverPointer<T, Q> &tt);
 
   /**
    * Swap pointers between this object and the pointer given. As this releases
@@ -275,7 +276,7 @@ private:
 
 
 template <typename T, typename P>
-inline SmartPointer<T, P>::SmartPointer()
+inline ObserverPointer<T, P>::ObserverPointer()
   : pointer(nullptr)
   , id(typeid(P).name())
   , pointed_to_object_is_alive(false)
@@ -288,7 +289,7 @@ inline SmartPointer<T, P>::SmartPointer()
 
 
 template <typename T, typename P>
-inline SmartPointer<T, P>::SmartPointer(T *t)
+inline ObserverPointer<T, P>::ObserverPointer(T *t)
   : pointer(t)
   , id(typeid(P).name())
   , pointed_to_object_is_alive(false)
@@ -304,7 +305,7 @@ inline SmartPointer<T, P>::SmartPointer(T *t)
 
 
 template <typename T, typename P>
-inline SmartPointer<T, P>::SmartPointer(T *t, const std::string &id)
+inline ObserverPointer<T, P>::ObserverPointer(T *t, const std::string &id)
   : pointer(t)
   , id(id)
   , pointed_to_object_is_alive(false)
@@ -321,7 +322,8 @@ inline SmartPointer<T, P>::SmartPointer(T *t, const std::string &id)
 
 template <typename T, typename P>
 template <class Q>
-inline SmartPointer<T, P>::SmartPointer(const SmartPointer<T, Q> &other)
+inline ObserverPointer<T, P>::ObserverPointer(
+  const ObserverPointer<T, Q> &other)
   : pointer(other.pointer)
   , id(other.id)
   , pointed_to_object_is_alive(false)
@@ -342,7 +344,8 @@ inline SmartPointer<T, P>::SmartPointer(const SmartPointer<T, Q> &other)
 
 
 template <typename T, typename P>
-inline SmartPointer<T, P>::SmartPointer(const SmartPointer<T, P> &other)
+inline ObserverPointer<T, P>::ObserverPointer(
+  const ObserverPointer<T, P> &other)
   : pointer(other.pointer)
   , id(other.id)
   , pointed_to_object_is_alive(false)
@@ -363,7 +366,8 @@ inline SmartPointer<T, P>::SmartPointer(const SmartPointer<T, P> &other)
 
 
 template <typename T, typename P>
-inline SmartPointer<T, P>::SmartPointer(SmartPointer<T, P> &&other) noexcept
+inline ObserverPointer<T, P>::ObserverPointer(
+  ObserverPointer<T, P> &&other) noexcept
   : pointer(other.pointer)
   , id(other.id)
   , pointed_to_object_is_alive(false)
@@ -400,7 +404,7 @@ inline SmartPointer<T, P>::SmartPointer(SmartPointer<T, P> &&other) noexcept
 
 
 template <typename T, typename P>
-inline SmartPointer<T, P>::~SmartPointer()
+inline ObserverPointer<T, P>::~ObserverPointer()
 {
   static_assert(std::is_base_of_v<Subscriptor, T>,
                 "This class can only be used if the first template argument "
@@ -414,7 +418,7 @@ inline SmartPointer<T, P>::~SmartPointer()
 
 template <typename T, typename P>
 inline void
-SmartPointer<T, P>::clear()
+ObserverPointer<T, P>::clear()
 {
   if (pointed_to_object_is_alive && pointer != nullptr)
     {
@@ -428,8 +432,8 @@ SmartPointer<T, P>::clear()
 
 
 template <typename T, typename P>
-inline SmartPointer<T, P> &
-SmartPointer<T, P>::operator=(T *tt)
+inline ObserverPointer<T, P> &
+ObserverPointer<T, P>::operator=(T *tt)
 {
   // optimize if no real action is requested
   if (pointer == tt)
@@ -451,8 +455,8 @@ SmartPointer<T, P>::operator=(T *tt)
 
 template <typename T, typename P>
 template <class Q>
-inline SmartPointer<T, P> &
-SmartPointer<T, P>::operator=(const SmartPointer<T, Q> &other)
+inline ObserverPointer<T, P> &
+ObserverPointer<T, P>::operator=(const ObserverPointer<T, Q> &other)
 {
   // if objects on the left and right
   // hand side of the operator= are
@@ -479,8 +483,8 @@ SmartPointer<T, P>::operator=(const SmartPointer<T, Q> &other)
 
 
 template <typename T, typename P>
-inline SmartPointer<T, P> &
-SmartPointer<T, P>::operator=(const SmartPointer<T, P> &other)
+inline ObserverPointer<T, P> &
+ObserverPointer<T, P>::operator=(const ObserverPointer<T, P> &other)
 {
   // if objects on the left and right
   // hand side of the operator= are
@@ -507,8 +511,8 @@ SmartPointer<T, P>::operator=(const SmartPointer<T, P> &other)
 
 
 template <typename T, typename P>
-inline SmartPointer<T, P> &
-SmartPointer<T, P>::operator=(SmartPointer<T, P> &&other) noexcept
+inline ObserverPointer<T, P> &
+ObserverPointer<T, P>::operator=(ObserverPointer<T, P> &&other) noexcept
 {
   if (other == nullptr)
     {
@@ -549,7 +553,7 @@ SmartPointer<T, P>::operator=(SmartPointer<T, P> &&other) noexcept
 
 
 template <typename T, typename P>
-inline SmartPointer<T, P>::operator T *() const
+inline ObserverPointer<T, P>::operator T *() const
 {
   return pointer;
 }
@@ -558,7 +562,7 @@ inline SmartPointer<T, P>::operator T *() const
 
 template <typename T, typename P>
 inline T &
-SmartPointer<T, P>::operator*() const
+ObserverPointer<T, P>::operator*() const
 {
   Assert(pointer != nullptr, ExcNotInitialized());
   Assert(pointed_to_object_is_alive,
@@ -570,7 +574,7 @@ SmartPointer<T, P>::operator*() const
 
 template <typename T, typename P>
 inline T *
-SmartPointer<T, P>::get() const
+ObserverPointer<T, P>::get() const
 {
   Assert(pointer != nullptr, ExcNotInitialized());
   Assert(pointed_to_object_is_alive,
@@ -582,7 +586,7 @@ SmartPointer<T, P>::get() const
 
 template <typename T, typename P>
 inline T *
-SmartPointer<T, P>::operator->() const
+ObserverPointer<T, P>::operator->() const
 {
   return this->get();
 }
@@ -592,10 +596,10 @@ SmartPointer<T, P>::operator->() const
 template <typename T, typename P>
 template <class Q>
 inline void
-SmartPointer<T, P>::swap(SmartPointer<T, Q> &other)
+ObserverPointer<T, P>::swap(ObserverPointer<T, Q> &other)
 {
 #ifdef DEBUG
-  SmartPointer<T, P> aux(pointer, id);
+  ObserverPointer<T, P> aux(pointer, id);
   *this = other;
   other = aux;
 #else
@@ -607,7 +611,7 @@ SmartPointer<T, P>::swap(SmartPointer<T, Q> &other)
 
 template <typename T, typename P>
 inline void
-SmartPointer<T, P>::swap(T *&ptr)
+ObserverPointer<T, P>::swap(T *&ptr)
 {
   if (pointed_to_object_is_alive && pointer != nullptr)
     pointer->unsubscribe(pointed_to_object_is_alive, id);
@@ -622,18 +626,18 @@ SmartPointer<T, P>::swap(T *&ptr)
 
 template <typename T, typename P>
 inline std::size_t
-SmartPointer<T, P>::memory_consumption() const
+ObserverPointer<T, P>::memory_consumption() const
 {
-  return sizeof(SmartPointer<T, P>);
+  return sizeof(ObserverPointer<T, P>);
 }
 
 
 
 // The following function is not strictly necessary but is an optimization
-// for places where you call swap(p1,p2) with SmartPointer objects p1, p2.
+// for places where you call swap(p1,p2) with ObserverPointer objects p1, p2.
 // Unfortunately, MS Visual Studio (at least up to the 2013 edition) trips
 // over it when calling std::swap(v1,v2) where v1,v2 are std::vectors of
-// SmartPointer objects: it can't determine whether it should call std::swap
+// ObserverPointer objects: it can't determine whether it should call std::swap
 // or dealii::swap on the individual elements (see bug #184 on our Google Code
 // site. Consequently, just take this function out of the competition for this
 // compiler.
@@ -645,7 +649,7 @@ SmartPointer<T, P>::memory_consumption() const
  */
 template <typename T, typename P, class Q>
 inline void
-swap(SmartPointer<T, P> &t1, SmartPointer<T, Q> &t2)
+swap(ObserverPointer<T, P> &t1, ObserverPointer<T, Q> &t2)
 {
   t1.swap(t2);
 }
@@ -661,7 +665,7 @@ swap(SmartPointer<T, P> &t1, SmartPointer<T, Q> &t2)
  */
 template <typename T, typename P>
 inline void
-swap(SmartPointer<T, P> &t1, T *&t2)
+swap(ObserverPointer<T, P> &t1, T *&t2)
 {
   t1.swap(t2);
 }
@@ -677,7 +681,7 @@ swap(SmartPointer<T, P> &t1, T *&t2)
  */
 template <typename T, typename P>
 inline void
-swap(T *&t1, SmartPointer<T, P> &t2)
+swap(T *&t1, ObserverPointer<T, P> &t2)
 {
   t2.swap(t1);
 }
index 832b68c03a358335cb83e2b9e73340820a4c0b77..6ee22b81bd118da152d86ba79e1e4f9eaa3d2412 100644 (file)
@@ -39,8 +39,9 @@ DEAL_II_NAMESPACE_OPEN
  * moved from or destroyed.
  * The mechanism works as follows: The member function subscribe() accepts a
  * pointer to a boolean that is modified on invalidation. The object that owns
- * this pointer (usually an object of class type SmartPointer) is then expected
- * to check the state of the boolean before trying to access this class.
+ * this pointer (usually an object of class type ObserverPointer) is then
+ * expected to check the state of the boolean before trying to access this
+ * class.
  *
  * The utility of this class is even enhanced by providing identifying strings
  * to the functions subscribe() and unsubscribe(). These strings are represented
@@ -50,7 +51,7 @@ DEAL_II_NAMESPACE_OPEN
  * <code>x</code> is some object. Therefore, the pointers provided to
  * subscribe() and to unsubscribe() must be the same. Strings with equal
  * contents will not be recognized to be the same. The handling in
- * SmartPointer will take care of this.
+ * ObserverPointer will take care of this.
  * The current subscribers to this class can be obtained by calling
  * list_subscribers().
  *
@@ -104,7 +105,7 @@ public:
    * @name Subscriptor functionality
    *
    * Classes derived from Subscriptor provide a facility to subscribe to this
-   * object. This is mostly used by the SmartPointer class.
+   * object. This is mostly used by the ObserverPointer class.
    * @{
    */
 
@@ -234,8 +235,8 @@ private:
   using map_iterator = decltype(counter_map)::iterator;
 
   /**
-   * In this vector, we store pointers to the validity bool in the SmartPointer
-   * objects that subscribe to this class.
+   * In this vector, we store pointers to the validity bool in the
+   * ObserverPointer objects that subscribe to this class.
    */
   mutable std::vector<std::atomic<bool> *> validity_pointers;
 
index 861497932825a140f3829dbe8a08aadff0184d31..ed8aae473ad684825290867734cb226d9d0ae31f 100644 (file)
@@ -235,8 +235,8 @@ namespace parallel
       /**
        * Pointer to the triangulation to work with.
        */
-      SmartPointer<const parallel::distributed::Triangulation<dim, spacedim>,
-                   CellDataTransfer<dim, spacedim, VectorType>>
+      ObserverPointer<const parallel::distributed::Triangulation<dim, spacedim>,
+                      CellDataTransfer<dim, spacedim, VectorType>>
         triangulation;
 
       /**
index a5355d5a25884a3f929920383eef4c34b6ae7bd9..e80f2148067eb0670ce6da3f53d26c1bfb53371a 100644 (file)
@@ -306,7 +306,7 @@ namespace parallel
       /**
        * Partitioner used during repartition().
        */
-      SmartPointer<const RepartitioningPolicyTools::Base<dim, spacedim>>
+      ObserverPointer<const RepartitioningPolicyTools::Base<dim, spacedim>>
         partitioner_distributed;
 
       /**
index 40b7ea46912b06e6a3d619d773a09e77e2d3d326..9e62c5d75845950a4f150dd6bba9e19d6707f779 100644 (file)
@@ -571,7 +571,7 @@ namespace internal
         /**
          * The modified parallel::shared::Triangulation.
          */
-        const SmartPointer<
+        const ObserverPointer<
           const dealii::parallel::shared::Triangulation<dim, spacedim>>
           shared_tria;
 
index 4992c0639d2e442c52a17efc7c2576e6103d452d..8d29176cd6d9481f25c267d908aa784ea6460f21 100644 (file)
@@ -1139,7 +1139,7 @@ namespace parallel
       /**
        * The modified parallel::distributed::Triangulation.
        */
-      const SmartPointer<
+      const ObserverPointer<
         dealii::parallel::distributed::Triangulation<dim, spacedim>>
         distributed_tria;
 
index c8f7299239a18cf1166384196651922efc7521b1..88164cfc5d8ebecd0c24f6648dfdb63ad89fc569 100644 (file)
@@ -1491,7 +1491,7 @@ private:
   /**
    * Address of the triangulation to work on.
    */
-  SmartPointer<const Triangulation<dim, spacedim>, DoFHandler<dim, spacedim>>
+  ObserverPointer<const Triangulation<dim, spacedim>, DoFHandler<dim, spacedim>>
     tria;
 
   /**
index 0d912861d8a9b2813239008dbf7b261f61b8f98f..00bcb2d29134606d7a9eb8f0312b227a79c08467 100644 (file)
@@ -145,7 +145,7 @@ namespace internal
         /**
          * The DoFHandler object on which this policy object works.
          */
-        SmartPointer<DoFHandler<dim, spacedim>> dof_handler;
+        ObserverPointer<DoFHandler<dim, spacedim>> dof_handler;
       };
 
 
@@ -205,7 +205,7 @@ namespace internal
         /**
          * The DoFHandler object on which this policy object works.
          */
-        SmartPointer<DoFHandler<dim, spacedim>> dof_handler;
+        ObserverPointer<DoFHandler<dim, spacedim>> dof_handler;
       };
 
 
@@ -247,7 +247,7 @@ namespace internal
         /**
          * The DoFHandler object on which this policy object works.
          */
-        SmartPointer<DoFHandler<dim, spacedim>> dof_handler;
+        ObserverPointer<DoFHandler<dim, spacedim>> dof_handler;
       };
     } // namespace Policy
   }   // namespace DoFHandlerImplementation
index 312977d244eaea2db0333a879d5d720f8fc753fd..6336361d558a24f75220901b63db40fb2c8bf9bc 100644 (file)
@@ -1034,12 +1034,12 @@ private:
   /**
    * Pointer to first FEValuesBase object.
    */
-  SmartPointer<const FEValuesBase<dim1, spacedim>> first_fe_values;
+  ObserverPointer<const FEValuesBase<dim1, spacedim>> first_fe_values;
 
   /**
    * Pointer to second FEValuesBase object.
    */
-  SmartPointer<const FEValuesBase<dim2, spacedim>> second_fe_values;
+  ObserverPointer<const FEValuesBase<dim2, spacedim>> second_fe_values;
 
   /**
    * Renumbering data for the first FEValuesBase object.
index 3f381449dcb05f5eecaf4b31464a8f6055dff5e7..0c0874f991c122b883284d5f942ecd1847f30862 100644 (file)
@@ -182,7 +182,7 @@ namespace FESeries
     /**
      * hp::FECollection for which transformation matrices will be calculated.
      */
-    SmartPointer<const hp::FECollection<dim, spacedim>> fe_collection;
+    ObserverPointer<const hp::FECollection<dim, spacedim>> fe_collection;
 
     /**
      * hp::QCollection used in calculation of transformation matrices.
@@ -352,7 +352,7 @@ namespace FESeries
     /**
      * hp::FECollection for which transformation matrices will be calculated.
      */
-    SmartPointer<const hp::FECollection<dim, spacedim>> fe_collection;
+    ObserverPointer<const hp::FECollection<dim, spacedim>> fe_collection;
 
     /**
      * hp::QCollection used in calculation of transformation matrices.
index f9d6a7d16ead3ba18f5f0effd33cbe71b74371e5..9d9175f8b0bf0c41415b5965404ecf0369e98cd9 100644 (file)
@@ -1698,7 +1698,8 @@ protected:
   /**
    * A pointer to the mapping object associated with this FEValues object.
    */
-  const SmartPointer<const Mapping<dim, spacedim>, FEValuesBase<dim, spacedim>>
+  const ObserverPointer<const Mapping<dim, spacedim>,
+                        FEValuesBase<dim, spacedim>>
     mapping;
 
   /**
@@ -1720,8 +1721,8 @@ protected:
    * A pointer to the finite element object associated with this FEValues
    * object.
    */
-  const SmartPointer<const FiniteElement<dim, spacedim>,
-                     FEValuesBase<dim, spacedim>>
+  const ObserverPointer<const FiniteElement<dim, spacedim>,
+                        FEValuesBase<dim, spacedim>>
     fe;
 
   /**
index 6a84365e5f05ec3c0d4c81c257e20884fb56f190..4311fe7b30f135fae0ba77c51923d049e2933c5b 100644 (file)
@@ -548,7 +548,7 @@ namespace FEValuesViews
     /**
      * A pointer to the FEValuesBase object we operate on.
      */
-    SmartPointer<const FEValuesBase<dim, spacedim>> fe_values;
+    ObserverPointer<const FEValuesBase<dim, spacedim>> fe_values;
 
     /**
      * The single scalar component this view represents of the FEValuesBase
@@ -1271,7 +1271,7 @@ namespace FEValuesViews
     /**
      * A pointer to the FEValuesBase object we operate on.
      */
-    SmartPointer<const FEValuesBase<dim, spacedim>> fe_values;
+    ObserverPointer<const FEValuesBase<dim, spacedim>> fe_values;
 
     /**
      * The first component of the vector this view represents of the
@@ -1584,7 +1584,7 @@ namespace FEValuesViews
     /**
      * A pointer to the FEValuesBase object we operate on.
      */
-    SmartPointer<const FEValuesBase<dim, spacedim>> fe_values;
+    ObserverPointer<const FEValuesBase<dim, spacedim>> fe_values;
 
     /**
      * The first component of the vector this view represents of the
@@ -1958,7 +1958,7 @@ namespace FEValuesViews
     /**
      * A pointer to the FEValuesBase object we operate on.
      */
-    SmartPointer<const FEValuesBase<dim, spacedim>> fe_values;
+    ObserverPointer<const FEValuesBase<dim, spacedim>> fe_values;
 
     /**
      * The first component of the vector this view represents of the
index 8286b2e83895675c0ba51aee058c8329100b9b93..574999ee659c305085c965091ec2e9425bc929a4 100644 (file)
@@ -367,7 +367,7 @@ public:
     /**
      * A pointer to the underlying finite element.
      */
-    SmartPointer<const FiniteElement<dim, spacedim>> fe;
+    ObserverPointer<const FiniteElement<dim, spacedim>> fe;
 
     /**
      * Values of shape functions. Access by function @p shape.
@@ -570,15 +570,15 @@ protected:
   /**
    * Reference to the vector of shifts.
    */
-  std::vector<
-    SmartPointer<const VectorType, MappingFEField<dim, spacedim, VectorType>>>
+  std::vector<ObserverPointer<const VectorType,
+                              MappingFEField<dim, spacedim, VectorType>>>
     euler_vector;
 
   /**
    * Pointer to the DoFHandler to which the mapping vector is associated.
    */
-  SmartPointer<const DoFHandler<dim, spacedim>,
-               MappingFEField<dim, spacedim, VectorType>>
+  ObserverPointer<const DoFHandler<dim, spacedim>,
+                  MappingFEField<dim, spacedim, VectorType>>
     euler_dof_handler;
 
 private:
index bfcf9ca78dcbcf52314c4688967acc0e960a787d..3253309b5a25d69a8cb10d9cbacf81164f413bab 100644 (file)
@@ -313,7 +313,7 @@ public:
      *
      * Updated each.
      */
-    mutable SmartPointer<const Manifold<dim, spacedim>> manifold;
+    mutable ObserverPointer<const Manifold<dim, spacedim>> manifold;
   };
 
 private:
index 9897d34754ecd6684b19423dad4685b43bf93c5d..28b8f9779f3b2b6fc3fd6ca20590d8d358e1f306 100644 (file)
@@ -176,14 +176,15 @@ protected:
   /**
    * Reference to the vector of shifts.
    */
-  SmartPointer<const VectorType, MappingQ1Eulerian<dim, VectorType, spacedim>>
+  ObserverPointer<const VectorType,
+                  MappingQ1Eulerian<dim, VectorType, spacedim>>
     euler_transform_vectors;
 
   /**
    * Pointer to the DoFHandler to which the mapping vector is associated.
    */
-  SmartPointer<const DoFHandler<dim, spacedim>,
-               MappingQ1Eulerian<dim, VectorType, spacedim>>
+  ObserverPointer<const DoFHandler<dim, spacedim>,
+                  MappingQ1Eulerian<dim, VectorType, spacedim>>
     shiftmap_dof_handler;
 };
 
index 79801901c65c2bb78fc1f86d58a1263f8091db5b..ea0f0649adbb66d795a3ba1925c685b1cefaab11 100644 (file)
@@ -174,14 +174,14 @@ protected:
   /**
    * Reference to the vector of shifts.
    */
-  SmartPointer<const VectorType, MappingQEulerian<dim, VectorType, spacedim>>
+  ObserverPointer<const VectorType, MappingQEulerian<dim, VectorType, spacedim>>
     euler_vector;
 
   /**
    * Pointer to the DoFHandler to which the mapping vector is associated.
    */
-  SmartPointer<const DoFHandler<dim, spacedim>,
-               MappingQEulerian<dim, VectorType, spacedim>>
+  ObserverPointer<const DoFHandler<dim, spacedim>,
+                  MappingQEulerian<dim, VectorType, spacedim>>
     euler_dof_handler;
 
 private:
index 6a826cce7ac77c4cf2aa2b52aaebd76d401d080c..e32943e07d5579049ee333fae3d9970a8cd2b32a 100644 (file)
@@ -112,7 +112,7 @@ private:
   /**
    * The first ChartManifold.
    */
-  SmartPointer<
+  ObserverPointer<
     const ChartManifold<dim1, intermediate_dim, chartdim>,
     CompositionManifold<dim, spacedim, chartdim, dim1, dim2, intermediate_dim>>
     F;
@@ -121,7 +121,7 @@ private:
   /**
    * The second ChartManifold.
    */
-  SmartPointer<
+  ObserverPointer<
     const ChartManifold<dim2, spacedim, intermediate_dim>,
     CompositionManifold<dim, spacedim, chartdim, dim1, dim2, intermediate_dim>>
     G;
index 4b5c5e67c85a0328731f04dd07900c3b33e09134..ab6d744bf3894fd01f7d744187d7d227f1f01f1e 100644 (file)
@@ -882,7 +882,7 @@ protected:
   /**
    * Store address of the triangulation to be fed with the data read in.
    */
-  SmartPointer<Triangulation<dim, spacedim>, GridIn<dim, spacedim>> tria;
+  ObserverPointer<Triangulation<dim, spacedim>, GridIn<dim, spacedim>> tria;
 
   /**
    * This function can write the raw cell data objects created by the
index f48710d010884ca44cd49f0f7deccb81a75c4ad4..98ccfc25a9ba0f0abcfccff4759f31b15e6f94a7 100644 (file)
@@ -241,12 +241,13 @@ namespace GridTools
     /**
      * A pointer to the Triangulation.
      */
-    SmartPointer<const Triangulation<dim, spacedim>, Cache<dim, spacedim>> tria;
+    ObserverPointer<const Triangulation<dim, spacedim>, Cache<dim, spacedim>>
+      tria;
 
     /**
      * Mapping to use when computing on the Triangulation.
      */
-    SmartPointer<const Mapping<dim, spacedim>, Cache<dim, spacedim>> mapping;
+    ObserverPointer<const Mapping<dim, spacedim>, Cache<dim, spacedim>> mapping;
 
 
     /**
index fc9650020a25ed0ac5c1996f012549ef87a4824e..4c57d9ac341c20f5180cd12f6fc37431b8958995 100644 (file)
@@ -122,7 +122,8 @@ public:
   using cell_iterator = typename MeshType::cell_iterator;
 
   /**
-   * Constructor setting the class name arguments in the SmartPointer members.
+   * Constructor setting the class name arguments in the ObserverPointer
+   * members.
    */
   InterGridMap();
 
@@ -187,12 +188,12 @@ private:
   /**
    * Store a pointer to the source grid.
    */
-  SmartPointer<const MeshType, InterGridMap<MeshType>> source_grid;
+  ObserverPointer<const MeshType, InterGridMap<MeshType>> source_grid;
 
   /**
    * Likewise for the destination grid.
    */
-  SmartPointer<const MeshType, InterGridMap<MeshType>> destination_grid;
+  ObserverPointer<const MeshType, InterGridMap<MeshType>> destination_grid;
 
   /**
    * Set the mapping for the pair of cells given. These shall match in level
index e6de2053ae3e7f10b8ddc5ad6a486c691a9b6ee6..fbe88a26b1b893294efe989d974a0133badd6129 100644 (file)
@@ -790,15 +790,15 @@ private:
   /**
    * Pointer to the push_forward function.
    */
-  SmartPointer<const Function<chartdim>,
-               FunctionManifold<dim, spacedim, chartdim>>
+  ObserverPointer<const Function<chartdim>,
+                  FunctionManifold<dim, spacedim, chartdim>>
     push_forward_function;
 
   /**
    * Pointer to the pull_back function.
    */
-  SmartPointer<const Function<spacedim>,
-               FunctionManifold<dim, spacedim, chartdim>>
+  ObserverPointer<const Function<spacedim>,
+                  FunctionManifold<dim, spacedim, chartdim>>
     pull_back_function;
 
   /**
index 612b92b7576bd4440c3897f297886a5426ebcd63..6a406f4aabbef305fae570c43a8a900710685549 100644 (file)
@@ -250,8 +250,8 @@ private:
   /**
    * This grid shall be used as coarse grid.
    */
-  SmartPointer<const Triangulation<dim, spacedim>,
-               PersistentTriangulation<dim, spacedim>>
+  ObserverPointer<const Triangulation<dim, spacedim>,
+                  PersistentTriangulation<dim, spacedim>>
     coarse_grid;
 
   /**
index dac0f9ce0389a2b157c42ff7c9e610e52e5f0c30..84d86087811edb7d3585733cfd352d1e4fd7c027 100644 (file)
@@ -202,14 +202,15 @@ namespace hp
     /**
      * A pointer to the collection of finite elements to be used.
      */
-    const SmartPointer<const FECollection<dim, FEValuesType::space_dimension>,
-                       FEValuesBase<dim, q_dim, FEValuesType>>
+    const ObserverPointer<
+      const FECollection<dim, FEValuesType::space_dimension>,
+      FEValuesBase<dim, q_dim, FEValuesType>>
       fe_collection;
 
     /**
      * A pointer to the collection of mappings to be used.
      */
-    const SmartPointer<
+    const ObserverPointer<
       const MappingCollection<dim, FEValuesType::space_dimension>,
       FEValuesBase<dim, q_dim, FEValuesType>>
       mapping_collection;
index d0b012a62c7caa2fa486dc49aabcf7a097b4cac8..fea46354f79834df2a7c37e5dde16c94fcf9d805 100644 (file)
@@ -849,7 +849,7 @@ protected:
   /**
    * Array of sub-matrices.
    */
-  Table<2, SmartPointer<BlockType, BlockMatrixBase<MatrixType>>> sub_objects;
+  Table<2, ObserverPointer<BlockType, BlockMatrixBase<MatrixType>>> sub_objects;
 
   /**
    * This function collects the sizes of the sub-objects and stores them in
index f7d90f3adbc22d3aec08662ba9f4e5406d4fca71..9d8ecaa60833511dc89d253a932cdd35a1085401 100644 (file)
@@ -364,9 +364,9 @@ private:
   /**
    * Pointer to the block sparsity pattern used for this matrix. In order to
    * guarantee that it is not deleted while still in use, we subscribe to it
-   * using the SmartPointer class.
+   * using the ObserverPointer class.
    */
-  SmartPointer<const BlockSparsityPattern, BlockSparseMatrix<number>>
+  ObserverPointer<const BlockSparsityPattern, BlockSparseMatrix<number>>
     sparsity_pattern;
 };
 
index 72d2cc0aa5f4d4aa55d0749af1f2f9914a40e981..d8c3ff6e4a065210d40df500090fe186e4b98d1e 100644 (file)
@@ -1405,9 +1405,9 @@ private:
   /**
    * Pointer to the sparsity pattern used for this matrix. In order to
    * guarantee that it is not deleted while still in use, we subscribe to it
-   * using the SmartPointer class.
+   * using the ObserverPointer class.
    */
-  SmartPointer<const ChunkSparsityPattern, ChunkSparseMatrix<number>> cols;
+  ObserverPointer<const ChunkSparsityPattern, ChunkSparseMatrix<number>> cols;
 
   /**
    * Array of values for all the nonzero entries. The position of an
index e94f0b384f815265f313ae4f3fb334fa48084ac1..16f7e0bbe78457bf0f25892b714dea8d6bf9dbd8 100644 (file)
@@ -1024,8 +1024,9 @@ public:
   Tvmult(BlockVector<number> &, const BlockVector<number> &) const;
 
 private:
-  SmartPointer<const LAPACKFullMatrix<number>, PreconditionLU<number>> matrix;
-  SmartPointer<VectorMemory<Vector<number>>, PreconditionLU<number>>   mem;
+  ObserverPointer<const LAPACKFullMatrix<number>, PreconditionLU<number>>
+                                                                        matrix;
+  ObserverPointer<VectorMemory<Vector<number>>, PreconditionLU<number>> mem;
 };
 
 /*---------------------- Inline functions -----------------------------------*/
index e13d7371a619caa6242cc36c62878e188c3d3546..65498156b7032ed32ed93339a82154344aa1e39d 100644 (file)
@@ -472,8 +472,8 @@ namespace PETScWrappers
     /**
      * Pointers to the internal PETSc matrix objects.
      */
-    SmartPointer<AMatrixType, NonlinearSolver> A;
-    SmartPointer<PMatrixType, NonlinearSolver> P;
+    ObserverPointer<AMatrixType, NonlinearSolver> A;
+    ObserverPointer<PMatrixType, NonlinearSolver> P;
 
     /**
      * This flag is used to support versions of PETSc older than 3.13.
index 383a8ace111f8eb4346b8845d7ad8f24db946dbf..81a8def95732cc487b16e599bbd3dbacbb3c179b 100644 (file)
@@ -172,7 +172,7 @@ namespace PETScWrappers
      * copy the data from this object before starting the solution process,
      * and copy the data back into it afterwards.
      */
-    SmartPointer<SolverControl, SolverBase> solver_control;
+    ObserverPointer<SolverControl, SolverBase> solver_control;
 
     /**
      * Utility to create the KSP object and attach convergence test.
index f6f53d0408b9b6c86d9079dd728113dc79a8eebf..d8837f277f0ae451686b54c973953d8e8f4d0cdf 100644 (file)
@@ -716,8 +716,8 @@ namespace PETScWrappers
     /**
      * Pointers to the internal PETSc matrix objects.
      */
-    SmartPointer<AMatrixType, TimeStepper> A;
-    SmartPointer<PMatrixType, TimeStepper> P;
+    ObserverPointer<AMatrixType, TimeStepper> A;
+    ObserverPointer<PMatrixType, TimeStepper> P;
 
     /**
      * Object to apply solve_with_jacobian.
index c4d167e524129a0b3e242174ee6c5cb948b654c0..a75ac00bb87325d54c8badacdee702f934ddf633 100644 (file)
@@ -682,7 +682,7 @@ protected:
   /**
    * Pointer to the matrix object.
    */
-  SmartPointer<const MatrixType, PreconditionRelaxation<MatrixType>> A;
+  ObserverPointer<const MatrixType, PreconditionRelaxation<MatrixType>> A;
 
   /**
    * Stores the additional data passed to the initialize function, obtained
@@ -867,8 +867,8 @@ namespace internal
       }
 
     private:
-      const SmartPointer<const MatrixType> A;
-      const double                         relaxation;
+      const ObserverPointer<const MatrixType> A;
+      const double                            relaxation;
     };
 
     template <typename MatrixType>
@@ -935,8 +935,8 @@ namespace internal
       }
 
     private:
-      const SmartPointer<const MatrixType> A;
-      const double                         relaxation;
+      const ObserverPointer<const MatrixType> A;
+      const double                            relaxation;
     };
 
     template <typename MatrixType>
@@ -1026,8 +1026,8 @@ namespace internal
       }
 
     private:
-      const SmartPointer<const MatrixType> A;
-      const double                         relaxation;
+      const ObserverPointer<const MatrixType> A;
+      const double                            relaxation;
 
       /**
        * An array that stores for each matrix row where the first position after
@@ -1069,8 +1069,8 @@ namespace internal
       }
 
     private:
-      const SmartPointer<const MatrixType> A;
-      const double                         relaxation;
+      const ObserverPointer<const MatrixType> A;
+      const double                            relaxation;
 
       const std::vector<size_type> &permutation;
       const std::vector<size_type> &inverse_permutation;
@@ -2026,8 +2026,8 @@ public:
  * <h4>Requirements on the templated classes</h4>
  *
  * The class `MatrixType` must be derived from Subscriptor because a
- * SmartPointer to `MatrixType` is held in the class. In particular, this means
- * that the matrix object needs to persist during the lifetime of
+ * ObserverPointer to `MatrixType` is held in the class. In particular, this
+ * means that the matrix object needs to persist during the lifetime of
  * PreconditionChebyshev. The preconditioner is held in a shared_ptr that is
  * copied into the AdditionalData member variable of the class, so the
  * variable used for initialization can safely be discarded after calling
@@ -2254,7 +2254,7 @@ private:
   /**
    * A pointer to the underlying matrix.
    */
-  SmartPointer<
+  ObserverPointer<
     const MatrixType,
     PreconditionChebyshev<MatrixType, VectorType, PreconditionerType>>
     matrix_ptr;
index ef9048753cff3fae28086b0a37d77773e4a40c29..58f751d4a293fe2c7195c246d9b1b4518f5a1386 100644 (file)
@@ -343,7 +343,8 @@ protected:
    * inverse matrices should not be stored) until the last call of the
    * preconditoining @p vmult function of the derived classes.
    */
-  SmartPointer<const MatrixType, PreconditionBlock<MatrixType, inverse_type>> A;
+  ObserverPointer<const MatrixType, PreconditionBlock<MatrixType, inverse_type>>
+    A;
   /**
    * Relaxation parameter to be used by derived classes.
    */
index 43c3ae60b559ee83d11c2697b56b8f7df1ff7e1d..1964dbded16545f8567619d8b6ca16e04c2ddc7b 100644 (file)
@@ -188,7 +188,8 @@ private:
    * Matrix that is used for the matrix-builtin preconditioning function. cf.
    * also @p PreconditionUseMatrix.
    */
-  SmartPointer<const MatrixType, PreconditionSelector<MatrixType, VectorType>>
+  ObserverPointer<const MatrixType,
+                  PreconditionSelector<MatrixType, VectorType>>
     A;
 
   /**
index 3e00d0e6d96ea081fff3f9312693e09adbcf777b..54d11c481b7a25f7c41b84f746aaffc799003b43 100644 (file)
@@ -246,15 +246,15 @@ protected:
    * inverse matrices should not be stored) until the last call of the
    * preconditioning @p vmult function of the derived classes.
    */
-  SmartPointer<const MatrixType,
-               RelaxationBlock<MatrixType, InverseNumberType, VectorType>>
+  ObserverPointer<const MatrixType,
+                  RelaxationBlock<MatrixType, InverseNumberType, VectorType>>
     A;
 
   /**
    * Control information.
    */
-  SmartPointer<const AdditionalData,
-               RelaxationBlock<MatrixType, InverseNumberType, VectorType>>
+  ObserverPointer<const AdditionalData,
+                  RelaxationBlock<MatrixType, InverseNumberType, VectorType>>
     additional_data;
 
 private:
index c703d7f88c08e1e61f3f6991fc4a3d0454c1a1d9..4815b25f5ad1782ba591bf98822726b33e875dc4 100644 (file)
@@ -206,7 +206,7 @@ protected:
    * Stores the @p SolverControl that is needed in the constructor of each @p
    * Solver class. This can be changed with @p set_control().
    */
-  SmartPointer<SolverControl, SolverSelector<VectorType>> control;
+  ObserverPointer<SolverControl, SolverSelector<VectorType>> control;
 
   /**
    * Stores the name of the solver.
index 61b961144fb14ab4c6881ccf3fcc225213d7538b..37359243cf1b895c3aea2cc3d140a1641f87dd5a 100644 (file)
@@ -1742,9 +1742,9 @@ private:
   /**
    * Pointer to the sparsity pattern used for this matrix. In order to
    * guarantee that it is not deleted while still in use, we subscribe to it
-   * using the SmartPointer class.
+   * using the ObserverPointer class.
    */
-  SmartPointer<const SparsityPattern, SparseMatrix<number>> cols;
+  ObserverPointer<const SparsityPattern, SparseMatrix<number>> cols;
 
   /**
    * Array of values for all the nonzero entries. The position of an
index 63ede4c36f6a0244963eb45a73eb99eab56a85bc..e84362f97b558cd5ed047ef7e5e8181b182c0790 100644 (file)
@@ -283,7 +283,7 @@ private:
   /**
    * Pointer to the matrix.
    */
-  SmartPointer<const SparseMatrix<number>, SparseVanka<number>> matrix;
+  ObserverPointer<const SparseMatrix<number>, SparseVanka<number>> matrix;
 
   /**
    * Indices of those degrees of freedom that we shall work on.
@@ -294,7 +294,7 @@ private:
    * Array of inverse matrices, one for each degree of freedom. Only those
    * elements will be used that are tagged in @p selected.
    */
-  mutable std::vector<SmartPointer<FullMatrix<float>, SparseVanka<number>>>
+  mutable std::vector<ObserverPointer<FullMatrix<float>, SparseVanka<number>>>
     inverses;
 
   /**
index 34fda24b17ad89d835a8d48ae21d6a6d7dd9018a..a710307a6cfa95ef1e1347be006d24a5dddf92fd 100644 (file)
@@ -61,7 +61,7 @@ template <typename number>
 SparseVanka<number>::~SparseVanka()
 {
   typename std::vector<
-    SmartPointer<FullMatrix<float>, SparseVanka<number>>>::iterator i;
+    ObserverPointer<FullMatrix<float>, SparseVanka<number>>>::iterator i;
   for (i = inverses.begin(); i != inverses.end(); ++i)
     {
       FullMatrix<float> *p = *i;
index ecb8528df1e8a66e7ebdd99a0b9146502cfa9486..cb80eb478de4fd2fcaab5968fbc89ca9f372e742 100644 (file)
@@ -891,12 +891,12 @@ protected:
   /**
    * Pointer to the Mapping object passed to the constructor.
    */
-  SmartPointer<const Mapping<dim, spacedim>> mapping;
+  ObserverPointer<const Mapping<dim, spacedim>> mapping;
 
   /**
    * Pointer to the FiniteElement object passed to the constructor.
    */
-  SmartPointer<const FiniteElement<dim, spacedim>> fe;
+  ObserverPointer<const FiniteElement<dim, spacedim>> fe;
 
   /**
    * Description of the 1d polynomial basis for tensor product elements used
@@ -1045,7 +1045,7 @@ protected:
    * Pointer to currently used mapping info (either on the fly or external
    * precomputed).
    */
-  SmartPointer<NonMatching::MappingInfo<dim, spacedim, Number>> mapping_info;
+  ObserverPointer<NonMatching::MappingInfo<dim, spacedim, Number>> mapping_info;
 
   /**
    * The current cell index to access mapping data from mapping info.
index 1b276c7230ece554525bffc320f2b735c4a4063c..c9ef3821cb1664082b4f4658b2ab9ca2f370ee79 100644 (file)
@@ -609,17 +609,17 @@ private:
   /**
    * Underlying communicator which handles update of the ghost values.
    */
-  SmartPointer<const FERemoteEvaluationCommunicator<dim>> comm;
+  ObserverPointer<const FERemoteEvaluationCommunicator<dim>> comm;
 
   /**
    * Pointer to MeshType if used with Triangulation.
    */
-  SmartPointer<const Triangulation<dim>> tria;
+  ObserverPointer<const Triangulation<dim>> tria;
 
   /**
    * Pointer to MeshType if used with DoFHandler.
    */
-  SmartPointer<const DoFHandler<dim>> dof_handler;
+  ObserverPointer<const DoFHandler<dim>> dof_handler;
 
   /**
    * First selected component.
index d09e1594a79b87a0a4fcdcae4759b9fbeac47094..081b5f066c45654839ad394ed5f961346070c335 100644 (file)
@@ -192,7 +192,7 @@ namespace internal
       /**
        * The pointer to the first entry of mapping_collection.
        */
-      SmartPointer<const Mapping<dim>> mapping;
+      ObserverPointer<const Mapping<dim>> mapping;
 
       /**
        * Reference-cell type related to each quadrature and active quadrature
index 6a7dfa02ca879d5f2a1e94c36b96b605a8362e23..21248b12873f303225461ab6fa907f8fb06a292e 100644 (file)
@@ -2252,7 +2252,7 @@ private:
   /**
    * Pointers to the DoFHandlers underlying the current problem.
    */
-  std::vector<SmartPointer<const DoFHandler<dim>>> dof_handlers;
+  std::vector<ObserverPointer<const DoFHandler<dim>>> dof_handlers;
 
   /**
    * Pointers to the AffineConstraints underlying the current problem. Only
@@ -2260,7 +2260,8 @@ private:
    * template parameter as the `Number` template of MatrixFree is passed to
    * reinit(). Filled with nullptr otherwise.
    */
-  std::vector<SmartPointer<const AffineConstraints<Number>>> affine_constraints;
+  std::vector<ObserverPointer<const AffineConstraints<Number>>>
+    affine_constraints;
 
   /**
    * Contains the information about degrees of freedom on the individual cells
index f7c6d6ff61b3548c95d941111cbac20ea916e911..51cd4c0f04c8749c50628fe857669160554024b8 100644 (file)
@@ -366,7 +366,8 @@ namespace internal
   void
   store_affine_constraints(
     const dealii::AffineConstraints<Number2> *,
-    SmartPointer<const dealii::AffineConstraints<Number>> &stored_constraints)
+    ObserverPointer<const dealii::AffineConstraints<Number>>
+      &stored_constraints)
   {
     stored_constraints = nullptr;
   }
@@ -374,8 +375,9 @@ namespace internal
   template <typename Number>
   void
   store_affine_constraints(
-    const dealii::AffineConstraints<Number>               *affine_constraints,
-    SmartPointer<const dealii::AffineConstraints<Number>> &stored_constraints)
+    const dealii::AffineConstraints<Number> *affine_constraints,
+    ObserverPointer<const dealii::AffineConstraints<Number>>
+      &stored_constraints)
   {
     stored_constraints = affine_constraints;
   }
@@ -1118,9 +1120,9 @@ namespace internal
   std::vector<bool>
   compute_dof_info(
     const std::vector<const dealii::AffineConstraints<number> *> &constraint,
-    const std::vector<IndexSet>                            &locally_owned_dofs,
-    const std::vector<SmartPointer<const DoFHandler<dim>>> &dof_handlers,
-    const Table<2, MatrixFreeFunctions::ShapeInfo<double>> &shape_infos,
+    const std::vector<IndexSet> &locally_owned_dofs,
+    const std::vector<ObserverPointer<const DoFHandler<dim>>> &dof_handlers,
+    const Table<2, MatrixFreeFunctions::ShapeInfo<double>>    &shape_infos,
     const unsigned int               cell_level_index_end_local,
     const unsigned int               mg_level,
     const bool                       hold_all_faces_to_owned_cells,
index 585baa1ac76b752b42bf32c93fdbf469534634a6..8f367059937c5ce43fbcf7cf2e83a6732a990a8b 100644 (file)
@@ -590,7 +590,7 @@ namespace MatrixFreeOperators
     /**
      * Const pointer to the operator class.
      */
-    SmartPointer<const OperatorType> mf_base_operator;
+    ObserverPointer<const OperatorType> mf_base_operator;
   };
 
 
index e78510062d6ad0ef21f19591b8e471e8da2dbcc9..16a9ef30ca87e879dd208ca7cee7693f15775e32 100644 (file)
@@ -622,7 +622,7 @@ namespace MatrixFreeTools
     /**
      * Reference to the underlying MatrixFree object.
      */
-    SmartPointer<const MatrixFree<dim, Number, VectorizedArrayType>>
+    ObserverPointer<const MatrixFree<dim, Number, VectorizedArrayType>>
       matrix_free;
 
     /**
index 9adf6d3afa14c920a5a61caf7493e2273cd4cd25..3b54ca260f9f27a483c322057c5c2917efdff480 100644 (file)
@@ -166,15 +166,15 @@ namespace MeshWorker
       /**
        * A pointer to the object containing the block structure.
        */
-      SmartPointer<const BlockInfo,
-                   ResidualLocalBlocksToGlobalBlocks<VectorType>>
+      ObserverPointer<const BlockInfo,
+                      ResidualLocalBlocksToGlobalBlocks<VectorType>>
         block_info;
 
       /**
        * A pointer to the object containing constraints.
        */
-      SmartPointer<const AffineConstraints<typename VectorType::value_type>,
-                   ResidualLocalBlocksToGlobalBlocks<VectorType>>
+      ObserverPointer<const AffineConstraints<typename VectorType::value_type>,
+                      ResidualLocalBlocksToGlobalBlocks<VectorType>>
         constraints;
     };
 
@@ -271,22 +271,22 @@ namespace MeshWorker
       /**
        * The global matrices, stored as a vector of pointers.
        */
-      SmartPointer<MatrixBlockVector<MatrixType>,
-                   MatrixLocalBlocksToGlobalBlocks<MatrixType, number>>
+      ObserverPointer<MatrixBlockVector<MatrixType>,
+                      MatrixLocalBlocksToGlobalBlocks<MatrixType, number>>
         matrices;
 
       /**
        * A pointer to the object containing the block structure.
        */
-      SmartPointer<const BlockInfo,
-                   MatrixLocalBlocksToGlobalBlocks<MatrixType, number>>
+      ObserverPointer<const BlockInfo,
+                      MatrixLocalBlocksToGlobalBlocks<MatrixType, number>>
         block_info;
       /**
        * A pointer to the object containing constraints.
        */
 
-      SmartPointer<const AffineConstraints<typename MatrixType::value_type>,
-                   MatrixLocalBlocksToGlobalBlocks<MatrixType, number>>
+      ObserverPointer<const AffineConstraints<typename MatrixType::value_type>,
+                      MatrixLocalBlocksToGlobalBlocks<MatrixType, number>>
         constraints;
 
       /**
@@ -326,8 +326,8 @@ namespace MeshWorker
     public:
       using MatrixPtrVector = MGMatrixBlockVector<MatrixType>;
       using MatrixPtrVectorPtr =
-        SmartPointer<MatrixPtrVector,
-                     MGMatrixLocalBlocksToGlobalBlocks<MatrixType, number>>;
+        ObserverPointer<MatrixPtrVector,
+                        MGMatrixLocalBlocksToGlobalBlocks<MatrixType, number>>;
 
       /**
        * Constructor, initializing the #threshold, which limits how small
@@ -502,15 +502,15 @@ namespace MeshWorker
       /**
        * A pointer to the object containing the block structure.
        */
-      SmartPointer<const BlockInfo,
-                   MGMatrixLocalBlocksToGlobalBlocks<MatrixType, number>>
+      ObserverPointer<const BlockInfo,
+                      MGMatrixLocalBlocksToGlobalBlocks<MatrixType, number>>
         block_info;
 
       /**
        * A pointer to the object containing constraints.
        */
-      SmartPointer<const MGConstrainedDoFs,
-                   MGMatrixLocalBlocksToGlobalBlocks<MatrixType, number>>
+      ObserverPointer<const MGConstrainedDoFs,
+                      MGMatrixLocalBlocksToGlobalBlocks<MatrixType, number>>
         mg_constrained_dofs;
 
 
index 4dfcf8d2626186382c65b7211b8d9c1878ff813d..25db2e32bc0467bf4d361851f9fecf63841b0c5b 100644 (file)
@@ -168,7 +168,7 @@ namespace MeshWorker
 
 
     /// The block structure of the system
-    SmartPointer<const BlockInfo, DoFInfo<dim, spacedim>> block_info;
+    ObserverPointer<const BlockInfo, DoFInfo<dim, spacedim>> block_info;
 
     /**
      * The structure refers to a cell with level data instead of active data.
index ca717062b8d873999ca73b70f2f2242341f7c9a9..c1d56aed980d95392aa130cadd4566492eafb362 100644 (file)
@@ -219,8 +219,8 @@ namespace MeshWorker
     /**
      * The pointer to the (system) element used for initialization.
      */
-    SmartPointer<const FiniteElement<dim, spacedim>,
-                 IntegrationInfo<dim, spacedim>>
+    ObserverPointer<const FiniteElement<dim, spacedim>,
+                    IntegrationInfo<dim, spacedim>>
       fe_pointer;
 
     /**
index cb1f3a8d3ed4f7c523fe4d1c635fce390a8224ab..d424d0de96c249c23fe4c3c3ca5ee7e5c1000ed7 100644 (file)
@@ -210,7 +210,7 @@ namespace MeshWorker
   {
   public:
     /**
-     * Create an empty ScratchData object. A SmartPointer pointing to
+     * Create an empty ScratchData object. A ObserverPointer pointing to
      * @p mapping and @p fe is stored internally. Make sure they live longer
      * than this class instance.
      *
@@ -305,7 +305,7 @@ namespace MeshWorker
       const UpdateFlags         &neighbor_face_update_flags = update_default);
 
     /**
-     * Create an empty ScratchData object. A SmartPointer pointing to
+     * Create an empty ScratchData object. A ObserverPointer pointing to
      * @p mapping_collection and @p fe_collection is stored internally. Make sure they live longer
      * than this class instance.
      *
@@ -1360,13 +1360,13 @@ namespace MeshWorker
      * The mapping used by the internal FEValues. Make sure it lives
      * longer than this class.
      */
-    SmartPointer<const Mapping<dim, spacedim>> mapping;
+    ObserverPointer<const Mapping<dim, spacedim>> mapping;
 
     /**
      * The finite element used by the internal FEValues. Make sure it lives
      * longer than this class.
      */
-    SmartPointer<const FiniteElement<dim, spacedim>> fe;
+    ObserverPointer<const FiniteElement<dim, spacedim>> fe;
 
     /**
      * Quadrature formula used to integrate on the current cell, and on its
@@ -1428,13 +1428,14 @@ namespace MeshWorker
      * The mapping collection used by the internal hp::FEValues. Make sure it
      * lives longer than this class.
      */
-    SmartPointer<const hp::MappingCollection<dim, spacedim>> mapping_collection;
+    ObserverPointer<const hp::MappingCollection<dim, spacedim>>
+      mapping_collection;
 
     /**
      * The finite element used by the internal FEValues. Make sure it lives
      * longer than this class.
      */
-    SmartPointer<const hp::FECollection<dim, spacedim>> fe_collection;
+    ObserverPointer<const hp::FECollection<dim, spacedim>> fe_collection;
 
     /**
      * Quadrature formula used to integrate on the current cell, and on its
@@ -1553,13 +1554,14 @@ namespace MeshWorker
      * A pointer to the last used FEValues/FEFaceValues, or FESubfaceValues
      * object on this cell.
      */
-    SmartPointer<const FEValuesBase<dim, spacedim>> current_fe_values;
+    ObserverPointer<const FEValuesBase<dim, spacedim>> current_fe_values;
 
     /**
      * A pointer to the last used FEValues/FEFaceValues, or FESubfaceValues
      * object on the neighbor cell.
      */
-    SmartPointer<const FEValuesBase<dim, spacedim>> current_neighbor_fe_values;
+    ObserverPointer<const FEValuesBase<dim, spacedim>>
+      current_neighbor_fe_values;
   };
 
 #ifndef DOXYGEN
index 8ecdd7c8eff8856068aa1b042aecd5221e09baf2..c9b07c3e8ea4e12f446f5e218542e10c50da87a4 100644 (file)
@@ -111,8 +111,8 @@ namespace MeshWorker
       /**
        * A pointer to the object containing constraints.
        */
-      SmartPointer<const AffineConstraints<typename VectorType::value_type>,
-                   ResidualSimple<VectorType>>
+      ObserverPointer<const AffineConstraints<typename VectorType::value_type>,
+                      ResidualSimple<VectorType>>
         constraints;
     };
 
@@ -211,7 +211,7 @@ namespace MeshWorker
       /**
        * The vector of global matrices being assembled.
        */
-      std::vector<SmartPointer<MatrixType, MatrixSimple<MatrixType>>> matrix;
+      std::vector<ObserverPointer<MatrixType, MatrixSimple<MatrixType>>> matrix;
 
       /**
        * The smallest positive number that will be entered into the global
@@ -234,8 +234,8 @@ namespace MeshWorker
       /**
        * A pointer to the object containing constraints.
        */
-      SmartPointer<const AffineConstraints<typename MatrixType::value_type>,
-                   MatrixSimple<MatrixType>>
+      ObserverPointer<const AffineConstraints<typename MatrixType::value_type>,
+                      MatrixSimple<MatrixType>>
         constraints;
     };
 
@@ -378,40 +378,40 @@ namespace MeshWorker
       /**
        * The global matrix being assembled.
        */
-      SmartPointer<MGLevelObject<MatrixType>, MGMatrixSimple<MatrixType>>
+      ObserverPointer<MGLevelObject<MatrixType>, MGMatrixSimple<MatrixType>>
         matrix;
 
       /**
        * The matrix used for face flux terms across the refinement edge,
        * coupling coarse to fine.
        */
-      SmartPointer<MGLevelObject<MatrixType>, MGMatrixSimple<MatrixType>>
+      ObserverPointer<MGLevelObject<MatrixType>, MGMatrixSimple<MatrixType>>
         flux_up;
 
       /**
        * The matrix used for face flux terms across the refinement edge,
        * coupling fine to coarse.
        */
-      SmartPointer<MGLevelObject<MatrixType>, MGMatrixSimple<MatrixType>>
+      ObserverPointer<MGLevelObject<MatrixType>, MGMatrixSimple<MatrixType>>
         flux_down;
 
       /**
        * The matrix used for face contributions for continuous elements across
        * the refinement edge, coupling coarse to fine.
        */
-      SmartPointer<MGLevelObject<MatrixType>, MGMatrixSimple<MatrixType>>
+      ObserverPointer<MGLevelObject<MatrixType>, MGMatrixSimple<MatrixType>>
         interface_in;
 
       /**
        * The matrix used for face contributions for continuous elements across
        * the refinement edge, coupling fine to coarse.
        */
-      SmartPointer<MGLevelObject<MatrixType>, MGMatrixSimple<MatrixType>>
+      ObserverPointer<MGLevelObject<MatrixType>, MGMatrixSimple<MatrixType>>
         interface_out;
       /**
        * A pointer to the object containing constraints.
        */
-      SmartPointer<const MGConstrainedDoFs, MGMatrixSimple<MatrixType>>
+      ObserverPointer<const MGConstrainedDoFs, MGMatrixSimple<MatrixType>>
         mg_constrained_dofs;
 
       /**
index 1b6eec1c0018bf5f76854748f225c244a14eb92f..814f52f7b42315e88b0eb51ab7a8a015cb0aff88 100644 (file)
@@ -99,7 +99,8 @@ namespace MeshWorker
   VectorData<VectorType, dim, spacedim>::initialize(const VectorType  *v,
                                                     const std::string &name)
   {
-    SmartPointer<const VectorType, VectorData<VectorType, dim, spacedim>> p = v;
+    ObserverPointer<const VectorType, VectorData<VectorType, dim, spacedim>> p =
+      v;
     this->data.add(p, name);
     VectorSelector::initialize(this->data);
   }
@@ -195,8 +196,8 @@ namespace MeshWorker
     const MGLevelObject<VectorType> *v,
     const std::string               &name)
   {
-    SmartPointer<const MGLevelObject<VectorType>,
-                 MGVectorData<VectorType, dim, spacedim>>
+    ObserverPointer<const MGLevelObject<VectorType>,
+                    MGVectorData<VectorType, dim, spacedim>>
       p = v;
     this->data.add(p, name);
     VectorSelector::initialize(this->data);
index a3275938d7571029d336c2409953ba2804b6161d..deffa9e5e133b7a77be105b2a0692177f85d0009 100644 (file)
@@ -123,8 +123,8 @@ private:
   /**
    * Memory for auxiliary vectors.
    */
-  SmartPointer<VectorMemory<BlockVector<number>>,
-               MGSmootherBlock<MatrixType, RelaxationType, number>>
+  ObserverPointer<VectorMemory<BlockVector<number>>,
+                  MGSmootherBlock<MatrixType, RelaxationType, number>>
     mem;
 };
 
index 0ab59b8f3b21ddde1aeecf8db3f3f94f33ea4b4b..b9d98289ba28e2a2552b6ed594c93a2b1725618e 100644 (file)
@@ -73,8 +73,8 @@ private:
   /**
    * Reference to the smoother.
    */
-  SmartPointer<const MGSmootherBase<VectorType>,
-               MGCoarseGridApplySmoother<VectorType>>
+  ObserverPointer<const MGSmootherBase<VectorType>,
+                  MGCoarseGridApplySmoother<VectorType>>
     coarse_smooth;
 };
 
@@ -134,31 +134,31 @@ private:
   /**
    * Reference to the solver.
    */
-  SmartPointer<SolverType,
-               MGCoarseGridIterativeSolver<VectorType,
-                                           SolverType,
-                                           MatrixType,
-                                           PreconditionerType>>
+  ObserverPointer<SolverType,
+                  MGCoarseGridIterativeSolver<VectorType,
+                                              SolverType,
+                                              MatrixType,
+                                              PreconditionerType>>
     solver;
 
   /**
    * Reference to the matrix.
    */
-  SmartPointer<const MatrixType,
-               MGCoarseGridIterativeSolver<VectorType,
-                                           SolverType,
-                                           MatrixType,
-                                           PreconditionerType>>
+  ObserverPointer<const MatrixType,
+                  MGCoarseGridIterativeSolver<VectorType,
+                                              SolverType,
+                                              MatrixType,
+                                              PreconditionerType>>
     matrix;
 
   /**
    * Reference to the preconditioner.
    */
-  SmartPointer<const PreconditionerType,
-               MGCoarseGridIterativeSolver<VectorType,
-                                           SolverType,
-                                           MatrixType,
-                                           PreconditionerType>>
+  ObserverPointer<const PreconditionerType,
+                  MGCoarseGridIterativeSolver<VectorType,
+                                              SolverType,
+                                              MatrixType,
+                                              PreconditionerType>>
     preconditioner;
 };
 
@@ -261,10 +261,9 @@ void
 MGCoarseGridApplySmoother<VectorType>::initialize(
   const MGSmootherBase<VectorType> &coarse_smooth_)
 {
-  coarse_smooth =
-    SmartPointer<const MGSmootherBase<VectorType>,
-                 MGCoarseGridApplySmoother<VectorType>>(&coarse_smooth_,
-                                                        typeid(*this).name());
+  coarse_smooth = ObserverPointer<const MGSmootherBase<VectorType>,
+                                  MGCoarseGridApplySmoother<VectorType>>(
+    &coarse_smooth_, typeid(*this).name());
 }
 
 
index d54eee0f2386f201150e6de18e9c5d65b47b6787..5db3406a2fcceb42267e26e4294be5618d88fd15 100644 (file)
@@ -125,7 +125,7 @@ class MGMatrixSelect : public MGMatrixBase<Vector<number>>
 public:
   /**
    * Constructor. @p row and @p col are the coordinate of the selected block.
-   * The other argument is handed over to the @p SmartPointer constructor.
+   * The other argument is handed over to the @p ObserverPointer constructor.
    */
   MGMatrixSelect(const unsigned int         row    = 0,
                  const unsigned int         col    = 0,
@@ -180,7 +180,7 @@ private:
   /**
    * Pointer to the matrix objects on each level.
    */
-  SmartPointer<MGLevelObject<MatrixType>, MGMatrixSelect<MatrixType, number>>
+  ObserverPointer<MGLevelObject<MatrixType>, MGMatrixSelect<MatrixType, number>>
     matrix;
   /**
    * Row coordinate of selected block.
index 7117c973716f62faba71cc46b524ada76bcf8b21..3c11c93c7843cbf5db8975fb5b8fd9b09ea02e7b 100644 (file)
@@ -386,7 +386,7 @@ protected:
   /**
    * The mg_constrained_dofs of the level systems.
    */
-  SmartPointer<const MGConstrainedDoFs> mg_constrained_dofs;
+  ObserverPointer<const MGConstrainedDoFs> mg_constrained_dofs;
 
 private:
   /**
@@ -574,7 +574,7 @@ protected:
   /**
    * The mg_constrained_dofs of the level systems.
    */
-  SmartPointer<const MGConstrainedDoFs> mg_constrained_dofs;
+  ObserverPointer<const MGConstrainedDoFs> mg_constrained_dofs;
 
   /**
    * In the function copy_to_mg, we need to access ghosted entries of the
index 2e1c080fa9a6f5046386ed82395a9daf1324a2b0..d26acc6edcc38b78aabc8b46e6c81ab7ae784eae 100644 (file)
@@ -159,7 +159,7 @@ protected:
    * The mg_constrained_dofs of the level systems.
    */
 
-  SmartPointer<const MGConstrainedDoFs, MGTransferBlockBase>
+  ObserverPointer<const MGConstrainedDoFs, MGTransferBlockBase>
     mg_constrained_dofs;
 };
 
@@ -277,7 +277,7 @@ private:
    * Memory pool required if additional multiplication using #factors is
    * desired.
    */
-  SmartPointer<VectorMemory<Vector<number>>, MGTransferBlock<number>> memory;
+  ObserverPointer<VectorMemory<Vector<number>>, MGTransferBlock<number>> memory;
 };
 
 
index c46ea4c14f8f8f4eea3436b8e73a0bd2987594b3..8fc68059c0dd58cf3b477f0c48cfbd73b90456c1 100644 (file)
@@ -369,7 +369,7 @@ private:
    * The constraints of the global system.
    */
 public:
-  SmartPointer<const AffineConstraints<double>> constraints;
+  ObserverPointer<const AffineConstraints<double>> constraints;
 };
 
 /** @} */
index b03fc8c28fa3e4b52d78247064014e326babd021..b12a18b58c43651debaa9145726e1ddb762f975f 100644 (file)
@@ -650,7 +650,7 @@ private:
     /**
      * Matrix-free object on the fine side.
      */
-    SmartPointer<const MatrixFree<dim, Number>> matrix_free_fine;
+    ObserverPointer<const MatrixFree<dim, Number>> matrix_free_fine;
 
     /**
      * Index within the list of DoFHandler objects in the matrix_free_fine
@@ -661,7 +661,7 @@ private:
     /**
      * Matrix-free object on the coarse side.
      */
-    SmartPointer<const MatrixFree<dim, Number>> matrix_free_coarse;
+    ObserverPointer<const MatrixFree<dim, Number>> matrix_free_coarse;
 
     /**
      * Index within the list of DoFHandler objects in the matrix_free_coarse
@@ -711,7 +711,7 @@ private:
   /**
    * Pointer to the DoFHandler object used during initialization.
    */
-  SmartPointer<const DoFHandler<dim>> dof_handler_fine;
+  ObserverPointer<const DoFHandler<dim>> dof_handler_fine;
 
   /**
    * Multigrid level used during initialization.
@@ -897,7 +897,7 @@ private:
   /**
    * Pointer to the DoFHandler object used during initialization.
    */
-  SmartPointer<const DoFHandler<dim>> dof_handler_fine;
+  ObserverPointer<const DoFHandler<dim>> dof_handler_fine;
 
   /**
    * Multigrid level used during initialization.
@@ -1248,8 +1248,8 @@ private:
    */
   void
   initialize_internal_transfer(
-    const DoFHandler<dim>                       &dof_handler,
-    const SmartPointer<const MGConstrainedDoFs> &mg_constrained_dofs);
+    const DoFHandler<dim>                          &dof_handler,
+    const ObserverPointer<const MGConstrainedDoFs> &mg_constrained_dofs);
 
   /**
    * Retrieve finest DoFHandler from two-level transfer objects.
@@ -1302,7 +1302,7 @@ private:
   /**
    * Collection of the two-level transfer operators.
    */
-  MGLevelObject<SmartPointer<MGTwoLevelTransferBase<VectorType>>> transfer;
+  MGLevelObject<ObserverPointer<MGTwoLevelTransferBase<VectorType>>> transfer;
 
   /**
    * External partitioners used during initialize_dof_vector().
@@ -1395,7 +1395,8 @@ private:
   /**
    * Non-block version of transfer operation.
    */
-  std::vector<SmartPointer<const MGTransferMF<dim, Number>>> transfer_operators;
+  std::vector<ObserverPointer<const MGTransferMF<dim, Number>>>
+    transfer_operators;
 };
 
 
index 7db8a1b7f1981ed62f6d788f06b7e88f5728753a..e4e91efd2fb51f81028d64dc04cbd8c811784334 100644 (file)
@@ -4309,8 +4309,8 @@ MGTransferMF<dim, Number>::initialize_constraints(
 template <int dim, typename Number>
 void
 MGTransferMF<dim, Number>::initialize_internal_transfer(
-  const DoFHandler<dim>                       &dof_handler,
-  const SmartPointer<const MGConstrainedDoFs> &mg_constrained_dofs)
+  const DoFHandler<dim>                          &dof_handler,
+  const ObserverPointer<const MGConstrainedDoFs> &mg_constrained_dofs)
 {
   const unsigned int min_level = 0;
   const unsigned int max_level =
index 2d75879019deb857970d3ca86fd71335fc7a3ba6..a2c86c3faa812d5f65b536ca92d2aad847fa44d1 100644 (file)
@@ -422,30 +422,30 @@ private:
   /**
    * The matrix for each level.
    */
-  SmartPointer<const MGMatrixBase<VectorType>, Multigrid<VectorType>> matrix;
+  ObserverPointer<const MGMatrixBase<VectorType>, Multigrid<VectorType>> matrix;
 
   /**
    * The matrix for each level.
    */
-  SmartPointer<const MGCoarseGridBase<VectorType>, Multigrid<VectorType>>
+  ObserverPointer<const MGCoarseGridBase<VectorType>, Multigrid<VectorType>>
     coarse;
 
   /**
    * Object for grid transfer.
    */
-  SmartPointer<const MGTransferBase<VectorType>, Multigrid<VectorType>>
+  ObserverPointer<const MGTransferBase<VectorType>, Multigrid<VectorType>>
     transfer;
 
   /**
    * The pre-smoothing object.
    */
-  SmartPointer<const MGSmootherBase<VectorType>, Multigrid<VectorType>>
+  ObserverPointer<const MGSmootherBase<VectorType>, Multigrid<VectorType>>
     pre_smooth;
 
   /**
    * The post-smoothing object.
    */
-  SmartPointer<const MGSmootherBase<VectorType>, Multigrid<VectorType>>
+  ObserverPointer<const MGSmootherBase<VectorType>, Multigrid<VectorType>>
     post_smooth;
 
   /**
@@ -453,7 +453,7 @@ private:
    *
    * @note Only <tt>vmult</tt> is used for these matrices.
    */
-  SmartPointer<const MGMatrixBase<VectorType>> edge_out;
+  ObserverPointer<const MGMatrixBase<VectorType>> edge_out;
 
   /**
    * Transpose edge matrix from the refinement edge to the interior of the
@@ -461,21 +461,23 @@ private:
    *
    * @note Only <tt>Tvmult</tt> is used for these matrices.
    */
-  SmartPointer<const MGMatrixBase<VectorType>> edge_in;
+  ObserverPointer<const MGMatrixBase<VectorType>> edge_in;
 
   /**
    * Edge matrix from fine to coarse.
    *
    * @note Only <tt>vmult</tt> is used for these matrices.
    */
-  SmartPointer<const MGMatrixBase<VectorType>, Multigrid<VectorType>> edge_down;
+  ObserverPointer<const MGMatrixBase<VectorType>, Multigrid<VectorType>>
+    edge_down;
 
   /**
    * Transpose edge matrix from coarse to fine.
    *
    * @note Only <tt>Tvmult</tt> is used for these matrices.
    */
-  SmartPointer<const MGMatrixBase<VectorType>, Multigrid<VectorType>> edge_up;
+  ObserverPointer<const MGMatrixBase<VectorType>, Multigrid<VectorType>>
+    edge_up;
 
   template <int dim, typename OtherVectorType, typename TransferType>
   friend class PreconditionMG;
@@ -610,28 +612,28 @@ private:
   /**
    * Associated @p DoFHandler.
    */
-  std::vector<SmartPointer<const DoFHandler<dim>,
-                           PreconditionMG<dim, VectorType, TransferType>>>
+  std::vector<ObserverPointer<const DoFHandler<dim>,
+                              PreconditionMG<dim, VectorType, TransferType>>>
     dof_handler_vector;
 
   /**
    * Storage for the pointers to the DoFHandler objects
-   * without SmartPointer wrapper.
+   * without ObserverPointer wrapper.
    */
   std::vector<const DoFHandler<dim> *> dof_handler_vector_raw;
 
   /**
    * The multigrid object.
    */
-  SmartPointer<Multigrid<VectorType>,
-               PreconditionMG<dim, VectorType, TransferType>>
+  ObserverPointer<Multigrid<VectorType>,
+                  PreconditionMG<dim, VectorType, TransferType>>
     multigrid;
 
   /**
    * Object for grid transfer.
    */
-  SmartPointer<const TransferType,
-               PreconditionMG<dim, VectorType, TransferType>>
+  ObserverPointer<const TransferType,
+                  PreconditionMG<dim, VectorType, TransferType>>
     transfer;
 
   /**
index c3639b36242b8cbcf96379f25bf2c84f37994069..cba5b15e97a718117d353e26126295297127cb59 100644 (file)
@@ -322,12 +322,12 @@ namespace NonMatching
     /**
      * A pointer to the collection of mappings to be used.
      */
-    const SmartPointer<const hp::MappingCollection<dim>> mapping_collection;
+    const ObserverPointer<const hp::MappingCollection<dim>> mapping_collection;
 
     /**
      * A pointer to the collection of finite elements to be used.
      */
-    const SmartPointer<const hp::FECollection<dim>> fe_collection;
+    const ObserverPointer<const hp::FECollection<dim>> fe_collection;
 
     /**
      * Collection of 1-dimensional quadrature rules that are used by
@@ -353,7 +353,7 @@ namespace NonMatching
     /**
      * Pointer to the MeshClassifier passed to the constructor.
      */
-    const SmartPointer<const MeshClassifier<dim>> mesh_classifier;
+    const ObserverPointer<const MeshClassifier<dim>> mesh_classifier;
 
     /**
      * For each element in the FECollection passed to the constructor,
@@ -650,12 +650,12 @@ namespace NonMatching
     /**
      * A pointer to the collection of mappings to be used.
      */
-    const SmartPointer<const hp::MappingCollection<dim>> mapping_collection;
+    const ObserverPointer<const hp::MappingCollection<dim>> mapping_collection;
 
     /**
      * A pointer to the collection of finite elements to be used.
      */
-    const SmartPointer<const hp::FECollection<dim>> fe_collection;
+    const ObserverPointer<const hp::FECollection<dim>> fe_collection;
 
     /**
      * Collection of 1-dimensional quadrature rules that are used by
@@ -676,7 +676,7 @@ namespace NonMatching
     /**
      * Pointer to the MeshClassifier passed to the constructor.
      */
-    const SmartPointer<const MeshClassifier<dim>> mesh_classifier;
+    const ObserverPointer<const MeshClassifier<dim>> mesh_classifier;
 
     /**
      * FEInterfaceValues corresponding to cells with LocationToLevelSet
index abedfa67d34ce281fc2369a15fe93990bc50b9f3..24881677885f021b03d10dd977251c96f544617a 100644 (file)
@@ -52,16 +52,16 @@ namespace NonMatching
     public:
       static UpdateFlags
       required_update_flags(
-        const SmartPointer<const Mapping<dim, spacedim>> &mapping,
-        const UpdateFlags                                &update_flags)
+        const ObserverPointer<const Mapping<dim, spacedim>> &mapping,
+        const UpdateFlags                                   &update_flags)
       {
         return mapping->requires_update_flags(update_flags);
       }
 
       static void
       compute_mapping_data_for_quadrature(
-        const SmartPointer<const Mapping<dim, spacedim>> &mapping,
-        const UpdateFlags                                &update_flags_mapping,
+        const ObserverPointer<const Mapping<dim, spacedim>> &mapping,
+        const UpdateFlags &update_flags_mapping,
         const typename Triangulation<dim, spacedim>::cell_iterator &cell,
         CellSimilarity::Similarity &cell_similarity,
         const Quadrature<dim>      &quadrature,
@@ -83,8 +83,8 @@ namespace NonMatching
 
       static void
       compute_mapping_data_for_immersed_surface_quadrature(
-        const SmartPointer<const Mapping<dim, spacedim>> &mapping,
-        const UpdateFlags                                &update_flags_mapping,
+        const ObserverPointer<const Mapping<dim, spacedim>> &mapping,
+        const UpdateFlags &update_flags_mapping,
         const typename Triangulation<dim, spacedim>::cell_iterator &cell,
         const ImmersedSurfaceQuadrature<dim>                       &quadrature,
         std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
@@ -105,8 +105,8 @@ namespace NonMatching
 
       static void
       compute_mapping_data_for_face_quadrature(
-        const SmartPointer<const Mapping<dim, spacedim>> &mapping,
-        const UpdateFlags                                &update_flags_mapping,
+        const ObserverPointer<const Mapping<dim, spacedim>> &mapping,
+        const UpdateFlags &update_flags_mapping,
         const typename Triangulation<dim, spacedim>::cell_iterator &cell,
         const unsigned int                                          face_no,
         const Quadrature<dim - 1>                                  &quadrature,
@@ -654,7 +654,7 @@ namespace NonMatching
     /**
      * A pointer to the underlying mapping.
      */
-    const SmartPointer<const Mapping<dim, spacedim>> mapping;
+    const ObserverPointer<const Mapping<dim, spacedim>> mapping;
 
     /**
      * The desired update flags for the evaluation.
@@ -757,7 +757,7 @@ namespace NonMatching
      * reinit functions. This field is only set if
      * AdditionalData::store_cells is enabled.
      */
-    SmartPointer<const Triangulation<dim, spacedim>> triangulation;
+    ObserverPointer<const Triangulation<dim, spacedim>> triangulation;
 
     /**
      * Level and indices of cells passed to the reinit functions. This
index e4bab67db6f3df2412844ccd79a526cea04b62cb..aa631b135b58dc83339b046cfbeb7a331c72a7ee 100644 (file)
@@ -172,7 +172,7 @@ namespace NonMatching
     /**
      * Pointer to the triangulation that should be classified.
      */
-    const SmartPointer<const Triangulation<dim>> triangulation;
+    const ObserverPointer<const Triangulation<dim>> triangulation;
 
     /**
      * Pointer to an object that describes what we need to know about the
index 88191cc890d99187d7e2159ae954d01e62a5d923..58ad9d7efac30cae0d84946c400ed215c08ae473 100644 (file)
@@ -946,7 +946,7 @@ namespace NonMatching
          * One dimensional quadrature rules used to create the immersed
          * quadratures.
          */
-        const SmartPointer<const hp::QCollection<1>> q_collection1D;
+        const ObserverPointer<const hp::QCollection<1>> q_collection1D;
 
         /**
          * Stores options/settings for the algorithm.
@@ -1057,7 +1057,7 @@ namespace NonMatching
          * Index of the quadrature in q_collection1d that should use to
          * generate the immersed quadrature rules.
          */
-        const SmartPointer<const hp::QCollection<1>> q_collection1D;
+        const ObserverPointer<const hp::QCollection<1>> q_collection1D;
 
         /**
          * Quadratures that the derived classes create.
index 1316f647fcaef7df2e069de737a88244a85363e6..7104ae104d358d1ca2124810a00937a5a4a6f681 100644 (file)
@@ -159,8 +159,8 @@ private:
   /**
    * Pointer to the triangulation to work with.
    */
-  SmartPointer<const Triangulation<dim, spacedim>,
-               CellDataTransfer<dim, spacedim, VectorType>>
+  ObserverPointer<const Triangulation<dim, spacedim>,
+                  CellDataTransfer<dim, spacedim, VectorType>>
     triangulation;
 
   /**
index 6ac9eb0d2a6bb18ee33eb4bf65f300937fa3384f..71f8bcec33c4283bb4b69010e9df55e68675be1c 100644 (file)
@@ -342,7 +342,7 @@ namespace internal
       /**
        * Pointer to the DoFHandler object that the vector is based on.
        */
-      SmartPointer<const DoFHandler<dim, spacedim>> dof_handler;
+      ObserverPointer<const DoFHandler<dim, spacedim>> dof_handler;
 
       /**
        * Names of the components of this data vector.
@@ -362,7 +362,7 @@ namespace internal
        * Pointer to a DataPostprocessing object which shall be applied to this
        * data vector.
        */
-      SmartPointer<const dealii::DataPostprocessor<spacedim>> postprocessor;
+      ObserverPointer<const dealii::DataPostprocessor<spacedim>> postprocessor;
 
       /**
        * Number of output variables this dataset provides (either number of
@@ -952,12 +952,12 @@ protected:
   /**
    * Pointer to the triangulation object.
    */
-  SmartPointer<const Triangulation<dim, spacedim>> triangulation;
+  ObserverPointer<const Triangulation<dim, spacedim>> triangulation;
 
   /**
    * Pointer to the optional handler object.
    */
-  SmartPointer<const DoFHandler<dim, spacedim>> dofs;
+  ObserverPointer<const DoFHandler<dim, spacedim>> dofs;
 
   /**
    * List of data elements with vectors of values for each degree of freedom.
index 4265f49d1cde495aaec095b838eabbbfff2b28c7..8d37296cd5f3ad7772264caee48fe9770ecd901f 100644 (file)
@@ -1756,10 +1756,10 @@ DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::attach_dof_handler(
          Exceptions::DataOutImplementation::ExcOldDataStillPresent());
 
   triangulation =
-    SmartPointer<const Triangulation<dim, spacedim>>(&d.get_triangulation(),
-                                                     typeid(*this).name());
+    ObserverPointer<const Triangulation<dim, spacedim>>(&d.get_triangulation(),
+                                                        typeid(*this).name());
   dofs =
-    SmartPointer<const DoFHandler<dim, spacedim>>(&d, typeid(*this).name());
+    ObserverPointer<const DoFHandler<dim, spacedim>>(&d, typeid(*this).name());
 }
 
 
@@ -1775,8 +1775,8 @@ DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::attach_triangulation(
          Exceptions::DataOutImplementation::ExcOldDataStillPresent());
 
   triangulation =
-    SmartPointer<const Triangulation<dim, spacedim>>(&tria,
-                                                     typeid(*this).name());
+    ObserverPointer<const Triangulation<dim, spacedim>>(&tria,
+                                                        typeid(*this).name());
 }
 
 
@@ -1801,7 +1801,7 @@ DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::add_data_vector(
     }
   else
     {
-      triangulation = SmartPointer<const Triangulation<dim, spacedim>>(
+      triangulation = ObserverPointer<const Triangulation<dim, spacedim>>(
         &dof_handler.get_triangulation(), typeid(*this).name());
     }
 
@@ -1841,7 +1841,7 @@ DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::
   if (triangulation == nullptr)
     {
       Assert(dof_handler != nullptr, ExcInternalError());
-      triangulation = SmartPointer<const Triangulation<dim, spacedim>>(
+      triangulation = ObserverPointer<const Triangulation<dim, spacedim>>(
         &dof_handler->get_triangulation(), typeid(*this).name());
     }
 
@@ -1981,7 +1981,7 @@ DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::add_mg_data_vector(
     &data_component_interpretation_)
 {
   if (triangulation == nullptr)
-    triangulation = SmartPointer<const Triangulation<dim, spacedim>>(
+    triangulation = ObserverPointer<const Triangulation<dim, spacedim>>(
       &dof_handler.get_triangulation(), typeid(*this).name());
 
   Assert(&dof_handler.get_triangulation() == triangulation,
index d69f72c5d71f862c7ab2a4be6cd6d87f55cbd3a2..6a0c86f127cc5dcab2a2cc0d76094fed43f4c89f 100644 (file)
@@ -136,7 +136,7 @@ private:
   /**
    * Mapping used in connection with patch_tria.
    */
-  const SmartPointer<const Mapping<patch_dim, spacedim>> patch_mapping;
+  const ObserverPointer<const Mapping<patch_dim, spacedim>> patch_mapping;
 
   /**
    * DataOut object that does the actual building of the patches.
@@ -161,7 +161,7 @@ private:
   /**
    * Mapping of the original triangulation provided in update_mapping().
    */
-  SmartPointer<const Mapping<dim, spacedim>> mapping;
+  ObserverPointer<const Mapping<dim, spacedim>> mapping;
 };
 
 DEAL_II_NAMESPACE_CLOSE
index 2fd89013d9d4cda2bdbc1557684c3967018051b2..6c872564d7feefcf69414e64f22f6e5a6e4d508f 100644 (file)
@@ -323,7 +323,7 @@ private:
    * DoF handler to be used for the data corresponding to the present
    * parameter value.
    */
-  SmartPointer<const DoFHandler<dim, spacedim>, DataOutStack<dim, spacedim>>
+  ObserverPointer<const DoFHandler<dim, spacedim>, DataOutStack<dim, spacedim>>
     dof_handler;
 
   /**
index 33bdae55a4485607159c6ec5fd93448fe61e5b32..1ff4be52cfe986d9e92d6124f7b78a34eb5ca346 100644 (file)
@@ -65,8 +65,8 @@ namespace Algorithms
     operator<<(const AnyData &vectors) override;
 
   private:
-    SmartPointer<const DoFHandler<dim, spacedim>,
-                 DoFOutputOperator<VectorType, dim, spacedim>>
+    ObserverPointer<const DoFHandler<dim, spacedim>,
+                    DoFOutputOperator<VectorType, dim, spacedim>>
       dof;
 
     const std::string  filename_base;
index 79c64f05c28ea19414f74e2fa1543a189e98438d..7c03f719acfaccbed37319e99acb0605dff123fc 100644 (file)
@@ -469,8 +469,8 @@ namespace Functions
     /**
      * Pointer to the dof handler.
      */
-    SmartPointer<const DoFHandler<dim, spacedim>,
-                 FEFieldFunction<dim, VectorType, spacedim>>
+    ObserverPointer<const DoFHandler<dim, spacedim>,
+                    FEFieldFunction<dim, VectorType, spacedim>>
       dh;
 
     /**
index 8b25b9ed6d5beae9efc71dba1d17da02ac7b3222..421b1dd63324938c53638d5993f6b082dc3c76f3 100644 (file)
@@ -634,7 +634,7 @@ private:
    * A smart pointer to the dof_handler supplied to the constructor. This can
    * be released by calling @p clear().
    */
-  SmartPointer<const DoFHandler<dim>, PointValueHistory<dim>> dof_handler;
+  ObserverPointer<const DoFHandler<dim>, PointValueHistory<dim>> dof_handler;
 
 
   /**
index 121b3cf7af4b57d38b4f2d88eba9a447b7e2cc92..512dd664262b7aec8f086488a40ef4a94e94988f 100644 (file)
@@ -415,8 +415,8 @@ private:
   /**
    * Pointer to the degree of freedom handler to work with.
    */
-  SmartPointer<const DoFHandler<dim, spacedim>,
-               SolutionTransfer<dim, VectorType, spacedim>>
+  ObserverPointer<const DoFHandler<dim, spacedim>,
+                  SolutionTransfer<dim, VectorType, spacedim>>
     dof_handler;
 
   /**
@@ -915,8 +915,8 @@ namespace Legacy
     /**
      * Pointer to the degree of freedom handler to work with.
      */
-    SmartPointer<const DoFHandler<dim, spacedim>,
-                 SolutionTransfer<dim, VectorType, spacedim>>
+    ObserverPointer<const DoFHandler<dim, spacedim>,
+                    SolutionTransfer<dim, VectorType, spacedim>>
       dof_handler;
 
     /**
index 0462500b843ef03874fd3c466a8a020cbebd68a7..e3a7032f1eb57d8137b9e7994016be45b71a4685 100644 (file)
@@ -616,7 +616,7 @@ protected:
    * this object operates on. Note that this object takes possession of the
    * objects pointed to by the pointers in this collection.
    */
-  std::vector<SmartPointer<TimeStepBase, TimeDependent>> timesteps;
+  std::vector<ObserverPointer<TimeStepBase, TimeDependent>> timesteps;
 
   /**
    * Number of the present sweep. This is reset by the @p start_sweep function
@@ -1466,14 +1466,14 @@ protected:
    * the functions @p sleep and @p wake_up to save memory, if such a behavior
    * is specified in the @p flags structure.
    */
-  SmartPointer<Triangulation<dim, dim>, TimeStepBase_Tria<dim>> tria;
+  ObserverPointer<Triangulation<dim, dim>, TimeStepBase_Tria<dim>> tria;
 
   /**
    * Pointer to a grid which is to be used as the coarse grid for this time
    * level.  This pointer is set through the constructor; ownership remains
    * with the owner of this management object.
    */
-  SmartPointer<const Triangulation<dim, dim>, TimeStepBase_Tria<dim>>
+  ObserverPointer<const Triangulation<dim, dim>, TimeStepBase_Tria<dim>>
     coarse_grid;
 
   /**
index 482bbd49298502b67ae42ec025b13bec30cf8c9b..9fbfa813c26bd9bf1b688250acf50b546af8e332 100644 (file)
@@ -877,14 +877,15 @@ namespace Particles
     /**
      * Address of the triangulation to work on.
      */
-    SmartPointer<const Triangulation<dim, spacedim>,
-                 ParticleHandler<dim, spacedim>>
+    ObserverPointer<const Triangulation<dim, spacedim>,
+                    ParticleHandler<dim, spacedim>>
       triangulation;
 
     /**
      * Address of the mapping to work on.
      */
-    SmartPointer<const Mapping<dim, spacedim>, ParticleHandler<dim, spacedim>>
+    ObserverPointer<const Mapping<dim, spacedim>,
+                    ParticleHandler<dim, spacedim>>
       mapping;
 
     /**
index 7941103184445926a077ebbdc6914dd50b6df312..ece630d2eb36e7d2f6b9ecb73755e8128745f5aa 100644 (file)
@@ -96,7 +96,7 @@ Subscriptor::check_no_subscribers() const noexcept
           std::cerr
             << "---------------------------------------------------------"
             << std::endl
-            << "An object pointed to by a SmartPointer is being destroyed."
+            << "An object pointed to by a ObserverPointer is being destroyed."
             << std::endl
             << "Under normal circumstances, this would abort the program."
             << std::endl
index 429561c9dcc6cebee8c999d37425162a6b93cd4e..34a7b49a1e41a6455395108d135d3728ab0fd517 100644 (file)
@@ -161,7 +161,7 @@ namespace
   void
   fill_internal(
     const DoFHandler<dim, spacedim>            &mg_dof,
-    SmartPointer<const MGConstrainedDoFs>       mg_constrained_dofs,
+    ObserverPointer<const MGConstrainedDoFs>    mg_constrained_dofs,
     const MPI_Comm                              mpi_communicator,
     const bool                                  transfer_solution_vectors,
     std::vector<Table<2, unsigned int>>        &copy_indices,
index 1c653b6c269e9b371f8d999beffb6b7ae54d8194..8978857c1e28b21c844b3198155db2dda85a182e 100644 (file)
@@ -120,13 +120,13 @@ namespace NonMatching
         /**
          * Pointer to the DoFHandler associated with the level set function.
          */
-        const SmartPointer<const DoFHandler<dim>> dof_handler;
+        const ObserverPointer<const DoFHandler<dim>> dof_handler;
 
         /**
          * Pointer to the vector containing the level set function's global dof
          * values.
          */
-        const SmartPointer<const VectorType> level_set;
+        const ObserverPointer<const VectorType> level_set;
       };
 
 
@@ -229,7 +229,7 @@ namespace NonMatching
         /**
          * Pointer to the level set function.
          */
-        const SmartPointer<const Function<dim>> level_set;
+        const ObserverPointer<const Function<dim>> level_set;
 
         /**
          * Collection containing the single element which we locally interpolate
index 05589996884947e09ca3f4e10f1e3a33ee48e280..d8bd93cde0f9e3a7f75299581b7857b519cf4211 100644 (file)
@@ -1414,19 +1414,19 @@ namespace NonMatching
         /**
          * Pointer to the DoFHandler passed to the constructor.
          */
-        const SmartPointer<const DoFHandler<dim>> dof_handler;
+        const ObserverPointer<const DoFHandler<dim>> dof_handler;
 
         /**
          * Pointer to the vector of solution coefficients passed to the
          * constructor.
          */
-        const SmartPointer<const VectorType> global_dof_values;
+        const ObserverPointer<const VectorType> global_dof_values;
 
         /**
          * Pointer to the element associated with the cell in the last call to
          * set_active_cell().
          */
-        SmartPointer<const FiniteElement<dim>> element;
+        ObserverPointer<const FiniteElement<dim>> element;
 
         /**
          * DOF-indices of the cell in the last call to set_active_cell().
index 89b0a8652f2cf861e500c4fe1e4e872ac8a0cd9c..e5f4b8cfbf8737688a270122654c933c4223bc03 100644 (file)
@@ -98,7 +98,7 @@ TimeDependent::insert_timestep(const TimeStepBase *position,
   else
     {
       // inner time step
-      const std::vector<SmartPointer<TimeStepBase, TimeDependent>>::iterator
+      const std::vector<ObserverPointer<TimeStepBase, TimeDependent>>::iterator
         insert_position =
           std::find(timesteps.begin(), timesteps.end(), position);
       // check iterators again to satisfy coverity: both insert_position and
@@ -136,7 +136,7 @@ TimeDependent::delete_timestep(const unsigned int position)
 
   // Remember time step object for
   // later deletion and unlock
-  // SmartPointer
+  // ObserverPointer
   TimeStepBase *t     = timesteps[position];
   timesteps[position] = nullptr;
   // Now delete unsubscribed object
@@ -153,14 +153,15 @@ TimeDependent::delete_timestep(const unsigned int position)
     timesteps[position - 1]->set_next_timestep(
       (position < timesteps.size()) ?
         timesteps[position] :
-        /*null*/ SmartPointer<TimeStepBase, TimeDependent>());
+        /*null*/ ObserverPointer<TimeStepBase, TimeDependent>());
 
   // same for "previous" pointer of next
   // time step
   if (position < timesteps.size())
     timesteps[position]->set_previous_timestep(
-      (position != 0) ? timesteps[position - 1] :
-                        /*null*/ SmartPointer<TimeStepBase, TimeDependent>());
+      (position != 0) ?
+        timesteps[position - 1] :
+        /*null*/ ObserverPointer<TimeStepBase, TimeDependent>());
 }
 
 
index 69600b90972ca457a4331ecef94bdf29ca19b689..f7a1d452b17580873a8e59bb21dff5b8d5a7ce42 100644 (file)
@@ -37,7 +37,7 @@ public:
 
 class SquareRootResidual : public Algorithms::OperatorBase
 {
-  SmartPointer<SquareRoot, SquareRootResidual> discretization;
+  ObserverPointer<SquareRoot, SquareRootResidual> discretization;
 
 public:
   SquareRootResidual(SquareRoot &problem)
@@ -53,7 +53,7 @@ public:
 
 class SquareRootSolver : public Algorithms::OperatorBase
 {
-  SmartPointer<SquareRoot, SquareRootSolver> solver;
+  ObserverPointer<SquareRoot, SquareRootSolver> solver;
 
 public:
   SquareRootSolver(SquareRoot &problem)
index a6d1429f4720c7aa1ea0fd3e02d84ee9956a717a..da1a106b7b4b9802b388563d05691c1c04782471 100644 (file)
@@ -58,7 +58,8 @@ public:
   }
 
 private:
-  SmartPointer<const DoFHandler<dim>, TestOutputOperator<VectorType, dim>> dof;
+  ObserverPointer<const DoFHandler<dim>, TestOutputOperator<VectorType, dim>>
+    dof;
 };
 
 class ZeroResidual : public Algorithms::OperatorBase
index 2977b32b6080816c9fa8f89dadb1964b8714f5f2..c33f4fc56c898980f07a4ec68e06cf3f910404a4 100644 (file)
@@ -36,8 +36,8 @@ public:
   operator()(AnyData &out, const AnyData &in);
 
 private:
-  SmartPointer<const FullMatrix<double>, Explicit> matrix;
-  FullMatrix<double>                               m;
+  ObserverPointer<const FullMatrix<double>, Explicit> matrix;
+  FullMatrix<double>                                  m;
 };
 
 
@@ -49,8 +49,8 @@ public:
   operator()(AnyData &out, const AnyData &in);
 
 private:
-  SmartPointer<const FullMatrix<double>, Implicit> matrix;
-  FullMatrix<double>                               m;
+  ObserverPointer<const FullMatrix<double>, Implicit> matrix;
+  FullMatrix<double>                                  m;
 };
 
 // End of declarations
index f52101597c67e62c283bbbab3d379bd66f01574b..f81fe4165c01f36c86588644d84762bfa6409f57 100644 (file)
@@ -14,7 +14,7 @@
 
 
 
-// Check the behavior of the SmartPointer-Subscriptor pair
+// Check the behavior of the ObserverPointer-Subscriptor pair
 // for copy and move semantics.
 
 
@@ -39,10 +39,10 @@ main()
   {
     deallog << "Checking copy assignment" << std::endl;
 
-    Subscriptor               subscriptor_1;
-    Subscriptor               subscriptor_2;
-    SmartPointer<Subscriptor> smart_pointer_1(&subscriptor_1);
-    SmartPointer<Subscriptor> smart_pointer_2(&subscriptor_2);
+    Subscriptor                  subscriptor_1;
+    Subscriptor                  subscriptor_2;
+    ObserverPointer<Subscriptor> smart_pointer_1(&subscriptor_1);
+    ObserverPointer<Subscriptor> smart_pointer_2(&subscriptor_2);
 
     subscriptor_2 = subscriptor_1;
 
@@ -73,8 +73,8 @@ main()
   {
     deallog << "Checking copy construction" << std::endl;
 
-    Subscriptor               subscriptor_1;
-    SmartPointer<Subscriptor> smart_pointer_1(&subscriptor_1);
+    Subscriptor                  subscriptor_1;
+    ObserverPointer<Subscriptor> smart_pointer_1(&subscriptor_1);
 
     Subscriptor subscriptor_2(subscriptor_1);
 
@@ -94,10 +94,10 @@ main()
   {
     deallog << "Checking move assignment" << std::endl;
 
-    Subscriptor               subscriptor_1;
-    Subscriptor               subscriptor_2;
-    SmartPointer<Subscriptor> smart_pointer_1(&subscriptor_1);
-    SmartPointer<Subscriptor> smart_pointer_2(&subscriptor_2);
+    Subscriptor                  subscriptor_1;
+    Subscriptor                  subscriptor_2;
+    ObserverPointer<Subscriptor> smart_pointer_1(&subscriptor_1);
+    ObserverPointer<Subscriptor> smart_pointer_2(&subscriptor_2);
 
     subscriptor_2 = std::move(subscriptor_1);
 
@@ -128,8 +128,8 @@ main()
   {
     deallog << "Checking move construction" << std::endl;
 
-    Subscriptor               subscriptor_1;
-    SmartPointer<Subscriptor> smart_pointer_1(&subscriptor_1);
+    Subscriptor                  subscriptor_1;
+    ObserverPointer<Subscriptor> smart_pointer_1(&subscriptor_1);
 
     Subscriptor subscriptor_2(std::move(subscriptor_1));
 
index ef6f52c2942fddcf133fcdd852e231b5f6d573b8..c29110f66ea75c38d99ad249974a2b32a79b12cb 100644 (file)
@@ -14,8 +14,8 @@
 
 
 
-// check that SmartPointers preserve constness etc of the objects they
-// point to, through assignment of SmartPointers to each other and
+// check that ObserverPointers preserve constness etc of the objects they
+// point to, through assignment of ObserverPointers to each other and
 // other tests.
 
 
@@ -70,11 +70,11 @@ main()
   Test        a("A");
   const Test &b("B");
 
-  SmartPointer<Test, Test>       r(&a, "Test R");
-  SmartPointer<const Test, Test> s(&a, "const Test S");
-  //  SmartPointer<Test,Test>       t=&b;    // this one should not work
-  SmartPointer<Test, Test>       t(const_cast<Test *>(&b), "Test T");
-  SmartPointer<const Test, Test> u(&b, "const Test");
+  ObserverPointer<Test, Test>       r(&a, "Test R");
+  ObserverPointer<const Test, Test> s(&a, "const Test S");
+  //  ObserverPointer<Test,Test>       t=&b;    // this one should not work
+  ObserverPointer<Test, Test>       t(const_cast<Test *>(&b), "Test T");
+  ObserverPointer<const Test, Test> u(&b, "const Test");
 
 
   deallog << "a ";
index 7b61efc63560949065fa6afae091a9766edbce10..d51956d6e4703cd43de3e782860eafc5ea89fd67 100644 (file)
@@ -14,7 +14,7 @@
 
 
 
-// Check that it is possible to put SmartPointer objects into a
+// Check that it is possible to put ObserverPointer objects into a
 // std::any object.
 
 
@@ -36,7 +36,7 @@ main()
 {
   initlog();
 
-  Test               t;
-  SmartPointer<Test> r(&t);
-  std::any           a = r;
+  Test                  t;
+  ObserverPointer<Test> r(&t);
+  std::any              a = r;
 }
index 0d50e6d87bc44236589784ef6f4a93373c42de5e..bf9bab069a446b424f88b604f8e0039a501f4415 100644 (file)
@@ -288,7 +288,7 @@ LaplaceProblem<dim>::LaplaceProblem()
 // finite element object which counts
 // how many objects use that finite
 // element (this is what the
-// <code>Subscriptor</code>/<code>SmartPointer</code>
+// <code>Subscriptor</code>/<code>ObserverPointer</code>
 // class pair is used for, in case
 // you want something like this for
 // your own programs; see step-7 for
index 163136c9ca78549e36ad98e873f479393444b4fb..07bbe7663e885e356a4a7c58926c8d177158f63d 100644 (file)
@@ -16,7 +16,7 @@
 // this file didn't compile at one point in time due to the private
 // inheritance of SparseMatrix by SparseLUDecomposition, and the
 // associated lack of accessibility of the Subscriptor functions to
-// the SmartPointer
+// the ObserverPointer
 //
 // it was fixed around 2003-05-22
 
@@ -34,7 +34,7 @@ main()
 {
   initlog();
 
-  SmartPointer<SparseLUDecomposition<double>> sparse_decomp;
+  ObserverPointer<SparseLUDecomposition<double>> sparse_decomp;
 
   deallog << "OK" << std::endl;
 
index 6ee0dd4f326cf917d9e710e83445056a25b80b8a..32f2fccbb22c6acd60b1a60a088c279ce0ea7970 100644 (file)
@@ -220,7 +220,7 @@ namespace LaplaceSolver
     n_dofs() const = 0;
 
   protected:
-    const SmartPointer<Triangulation<dim>> triangulation;
+    const ObserverPointer<Triangulation<dim>> triangulation;
   };
 
 
@@ -256,11 +256,11 @@ namespace LaplaceSolver
     n_dofs() const;
 
   protected:
-    const SmartPointer<const FiniteElement<dim>> fe;
-    const SmartPointer<const Quadrature<dim>>    quadrature;
-    DoFHandler<dim>                              dof_handler;
-    Vector<double>                               solution;
-    const SmartPointer<const Function<dim>>      boundary_values;
+    const ObserverPointer<const FiniteElement<dim>> fe;
+    const ObserverPointer<const Quadrature<dim>>    quadrature;
+    DoFHandler<dim>                                 dof_handler;
+    Vector<double>                                  solution;
+    const ObserverPointer<const Function<dim>>      boundary_values;
 
     virtual void
     assemble_rhs(Vector<double> &rhs) const = 0;
@@ -490,7 +490,7 @@ namespace LaplaceSolver
                  const Function<dim>      &boundary_values);
 
   protected:
-    const SmartPointer<const Function<dim>> rhs_function;
+    const ObserverPointer<const Function<dim>> rhs_function;
     virtual void
     assemble_rhs(Vector<double> &rhs) const;
   };
index 0d173ed2386d6e3640956aad962101c11784f2f7..7f744fa6382867e2693d1ade8ac3f613d40ef188 100644 (file)
@@ -287,7 +287,7 @@ namespace LaplaceSolver
     output_solution() const = 0;
 
   protected:
-    const SmartPointer<Triangulation<dim>> triangulation;
+    const ObserverPointer<Triangulation<dim>> triangulation;
 
     unsigned int refinement_cycle;
   };
@@ -335,12 +335,12 @@ namespace LaplaceSolver
     n_dofs() const;
 
   protected:
-    const SmartPointer<const FiniteElement<dim>>  fe;
-    const SmartPointer<const Quadrature<dim>>     quadrature;
-    const SmartPointer<const Quadrature<dim - 1>> face_quadrature;
-    DoFHandler<dim>                               dof_handler;
-    Vector<double>                                solution;
-    const SmartPointer<const Function<dim>>       boundary_values;
+    const ObserverPointer<const FiniteElement<dim>>  fe;
+    const ObserverPointer<const Quadrature<dim>>     quadrature;
+    const ObserverPointer<const Quadrature<dim - 1>> face_quadrature;
+    DoFHandler<dim>                                  dof_handler;
+    Vector<double>                                   solution;
+    const ObserverPointer<const Function<dim>>       boundary_values;
 
     virtual void
     assemble_rhs(Vector<double> &rhs) const = 0;
@@ -581,7 +581,7 @@ namespace LaplaceSolver
     output_solution() const;
 
   protected:
-    const SmartPointer<const Function<dim>> rhs_function;
+    const ObserverPointer<const Function<dim>> rhs_function;
     virtual void
     assemble_rhs(Vector<double> &rhs) const;
 
@@ -808,7 +808,7 @@ namespace LaplaceSolver
     refine_grid();
 
   private:
-    const SmartPointer<const Function<dim>> weighting_function;
+    const ObserverPointer<const Function<dim>> weighting_function;
   };
 
 
@@ -1254,7 +1254,7 @@ namespace LaplaceSolver
     postprocess(const Evaluation::EvaluationBase<dim> &postprocessor) const;
 
   protected:
-    const SmartPointer<const DualFunctional::DualFunctionalBase<dim>>
+    const ObserverPointer<const DualFunctional::DualFunctionalBase<dim>>
       dual_functional;
     virtual void
     assemble_rhs(Vector<double> &rhs) const;
@@ -1362,8 +1362,8 @@ namespace LaplaceSolver
 
     struct CellData
     {
-      FEValues<dim>                           fe_values;
-      const SmartPointer<const Function<dim>> right_hand_side;
+      FEValues<dim>                              fe_values;
+      const ObserverPointer<const Function<dim>> right_hand_side;
 
       std::vector<double>                  cell_residual;
       std::vector<double>                  rhs_values;
@@ -1911,7 +1911,7 @@ public:
     unsigned int primal_fe_degree;
     unsigned int dual_fe_degree;
 
-    SmartPointer<const Data::SetUpBase<dim>> data;
+    ObserverPointer<const Data::SetUpBase<dim>> data;
 
     enum RefinementCriterion
     {
@@ -1923,11 +1923,12 @@ public:
 
     RefinementCriterion refinement_criterion;
 
-    SmartPointer<const DualFunctional::DualFunctionalBase<dim>> dual_functional;
+    ObserverPointer<const DualFunctional::DualFunctionalBase<dim>>
+      dual_functional;
 
     EvaluatorList evaluator_list;
 
-    SmartPointer<const Function<dim>> kelly_weight;
+    ObserverPointer<const Function<dim>> kelly_weight;
 
     unsigned int max_degrees_of_freedom;
 
index 82ce1787d61981d5c7b8b4191e2684e0a5faa6c4..07a7a7fdd43e59e2887662a29308382116219619 100644 (file)
@@ -202,7 +202,7 @@ private:
   Triangulation<dim> triangulation;
   DoFHandler<dim>    dof_handler;
 
-  SmartPointer<const FiniteElement<dim>> fe;
+  ObserverPointer<const FiniteElement<dim>> fe;
 
   AffineConstraints<double> hanging_node_constraints;
 
index 884b4d5dbd59756a697049f688e0f21baee91279..e25e5bac037eb0c24c8219147342c6eab840244b 100644 (file)
@@ -86,7 +86,7 @@ private:
   double
   term_D(const Tensor<1, 3> &r, const Tensor<1, 3> &a1, const Tensor<1, 3> &a2);
 
-  SmartPointer<FEValues<dim, dim + 1>> fe_values;
+  ObserverPointer<FEValues<dim, dim + 1>> fe_values;
 };
 
 template <>
index 65f5e1f841fd5bfbefcfa75c59c9403a488742a2..857173b15730196a0365a8aeceeb89b9c3b78c7d 100644 (file)
@@ -39,7 +39,7 @@ main()
   DoFHandler<dim, spacedim> dh(tria);
   dh.distribute_dofs(fe);
 
-  SmartPointer<const FiniteElement<dim, spacedim>> fe_p(&dh.get_fe());
+  ObserverPointer<const FiniteElement<dim, spacedim>> fe_p(&dh.get_fe());
 
   dh.distribute_dofs(*fe_p);
 
index 96a23e0cc7204fa58956607e85d7ecd3cf40afcf..12947df1a5c6d1983c7ac7c34b75037d3f900632 100644 (file)
@@ -40,7 +40,7 @@ main()
   DoFHandler<dim, spacedim> dh(tria);
   dh.distribute_dofs(fe_collection);
 
-  SmartPointer<const hp::FECollection<dim, spacedim>> fe_p(
+  ObserverPointer<const hp::FECollection<dim, spacedim>> fe_p(
     &dh.get_fe_collection());
 
   dh.distribute_dofs(*fe_p);
index 27326e495893f8d98183f8280a4ead8b06739e8d..9859c9027b215ba075911b7dfac59bdec7067aa6 100644 (file)
@@ -86,10 +86,10 @@ namespace FEConforimityTest
                         const Vector<double>         &dof_vector,
                         std::vector<double>          &jumps);
 
-    SmartPointer<const FiniteElement<dim>> fe_ptr;
-    Triangulation<dim>                     triangulation;
-    DoFHandler<dim>                        dof_handler;
-    AffineConstraints<double>              constraints;
+    ObserverPointer<const FiniteElement<dim>> fe_ptr;
+    Triangulation<dim>                        triangulation;
+    DoFHandler<dim>                           dof_handler;
+    AffineConstraints<double>                 constraints;
 
     Vector<double> random_fe_function;
 
index 885b22ad9881678c63cbdd3f6f3687febf26c8a9..634fc10468d971696dd3561381afdea78f76ebcc 100644 (file)
@@ -321,8 +321,8 @@ namespace Step22
     vmult(Vector<double> &dst, const Vector<double> &src) const;
 
   private:
-    const SmartPointer<const Matrix>         matrix;
-    const SmartPointer<const Preconditioner> preconditioner;
+    const ObserverPointer<const Matrix>         matrix;
+    const ObserverPointer<const Preconditioner> preconditioner;
   };
 
 
@@ -364,8 +364,8 @@ namespace Step22
     vmult(Vector<double> &dst, const Vector<double> &src) const;
 
   private:
-    const SmartPointer<const BlockSparseMatrix<double>> system_matrix;
-    const SmartPointer<
+    const ObserverPointer<const BlockSparseMatrix<double>> system_matrix;
+    const ObserverPointer<
       const InverseMatrix<SparseMatrix<double>, Preconditioner>>
       A_inverse;
 
index dbe212f3c24c95b9d00917b4df7ecb48005c5b76..4581a8b4c2b367e73b71a3954689e3d08cf7b51d 100644 (file)
@@ -222,7 +222,7 @@ namespace LaplaceSolver
     n_dofs() const = 0;
 
   protected:
-    const SmartPointer<Triangulation<dim>> triangulation;
+    const ObserverPointer<Triangulation<dim>> triangulation;
   };
 
 
@@ -258,11 +258,11 @@ namespace LaplaceSolver
     n_dofs() const;
 
   protected:
-    const SmartPointer<const hp::FECollection<dim>> fe;
-    const SmartPointer<const hp::QCollection<dim>>  quadrature;
-    DoFHandler<dim>                                 dof_handler;
-    Vector<double>                                  solution;
-    const SmartPointer<const Function<dim>>         boundary_values;
+    const ObserverPointer<const hp::FECollection<dim>> fe;
+    const ObserverPointer<const hp::QCollection<dim>>  quadrature;
+    DoFHandler<dim>                                    dof_handler;
+    Vector<double>                                     solution;
+    const ObserverPointer<const Function<dim>>         boundary_values;
 
     virtual void
     assemble_rhs(Vector<double> &rhs) const = 0;
@@ -493,7 +493,7 @@ namespace LaplaceSolver
                  const Function<dim>         &boundary_values);
 
   protected:
-    const SmartPointer<const Function<dim>> rhs_function;
+    const ObserverPointer<const Function<dim>> rhs_function;
     virtual void
     assemble_rhs(Vector<double> &rhs) const;
   };
index 0650e19571a9f863cd8713a4ee62c8c6c792fbf9..944f4599d248995fa27e7f86ba6991e9eed69632 100644 (file)
@@ -204,7 +204,7 @@ private:
   Triangulation<dim> triangulation;
   DoFHandler<dim>    dof_handler;
 
-  SmartPointer<const hp::FECollection<dim>> fe;
+  ObserverPointer<const hp::FECollection<dim>> fe;
 
   AffineConstraints<double> hanging_node_constraints;
 
index b2964b54563ab8c0e280d924a9c0471d988ce198..3f2385974e2ff19a178731f2e2420dc9196a5159 100644 (file)
@@ -424,7 +424,7 @@ public:
   }
 
 private:
-  SmartPointer<const LAPLACEOPERATOR> laplace;
+  ObserverPointer<const LAPLACEOPERATOR> laplace;
 };
 
 
index f98533a34cdd6f5be4e0ac1227611d32dafc6f47..133f3d61f44a030ad4820ea569a940da85705c81 100644 (file)
@@ -436,7 +436,7 @@ public:
   }
 
 private:
-  SmartPointer<const LAPLACEOPERATOR> laplace;
+  ObserverPointer<const LAPLACEOPERATOR> laplace;
 };
 
 
index b6c16cb3a0673e1ef7c75f054e2a241da286ee0e..d0690705420d9202857568a04f0726a77d31667e 100644 (file)
@@ -433,7 +433,7 @@ public:
   }
 
 private:
-  SmartPointer<const LAPLACEOPERATOR> laplace;
+  ObserverPointer<const LAPLACEOPERATOR> laplace;
 };
 
 
index b3322d8ca813804b4d0dabef68430446948f7161..3abb0d92e912b8f7d45dca78a806df4d04a2cbdf 100644 (file)
@@ -193,8 +193,8 @@ namespace Step22
           const TrilinosWrappers::MPI::Vector &src) const;
 
   private:
-    const SmartPointer<const Matrix>         matrix;
-    const SmartPointer<const Preconditioner> preconditioner;
+    const ObserverPointer<const Matrix>         matrix;
+    const ObserverPointer<const Preconditioner> preconditioner;
 
     mutable TrilinosWrappers::MPI::Vector tmp;
   };
@@ -249,8 +249,9 @@ namespace Step22
           const TrilinosWrappers::MPI::Vector &src) const;
 
   private:
-    const SmartPointer<const TrilinosWrappers::BlockSparseMatrix> system_matrix;
-    const SmartPointer<
+    const ObserverPointer<const TrilinosWrappers::BlockSparseMatrix>
+      system_matrix;
+    const ObserverPointer<
       const InverseMatrix<TrilinosWrappers::SparseMatrix, Preconditioner>>
                                           A_inverse;
     mutable TrilinosWrappers::MPI::Vector tmp1, tmp2;
index c50a6ad6654bb60dbc12db9fd730de12fbcca549..f2900e10601b8bbe64105c78d5bc9bf5a10e57ee 100644 (file)
@@ -196,8 +196,8 @@ namespace Step22
           const TrilinosWrappers::MPI::Vector &src) const;
 
   private:
-    const SmartPointer<const Matrix>         matrix;
-    const SmartPointer<const Preconditioner> preconditioner;
+    const ObserverPointer<const Matrix>         matrix;
+    const ObserverPointer<const Preconditioner> preconditioner;
 
     mutable TrilinosWrappers::MPI::Vector tmp;
   };
@@ -252,8 +252,9 @@ namespace Step22
           const TrilinosWrappers::MPI::Vector &src) const;
 
   private:
-    const SmartPointer<const TrilinosWrappers::BlockSparseMatrix> system_matrix;
-    const SmartPointer<
+    const ObserverPointer<const TrilinosWrappers::BlockSparseMatrix>
+      system_matrix;
+    const ObserverPointer<
       const InverseMatrix<TrilinosWrappers::SparseMatrix, Preconditioner>>
                                           A_inverse;
     mutable TrilinosWrappers::MPI::Vector tmp1, tmp2;
index 6a58d9128271ad0d1187cbd4b2a408af94f17dce..97145887fdbd1b5b8f562327a55452983675c4a2 100644 (file)
@@ -118,8 +118,8 @@ namespace Step22
           const TrilinosWrappers::MPI::Vector &src) const;
 
   private:
-    const SmartPointer<const Matrix>         matrix;
-    const SmartPointer<const Preconditioner> preconditioner;
+    const ObserverPointer<const Matrix>         matrix;
+    const ObserverPointer<const Preconditioner> preconditioner;
 
     mutable TrilinosWrappers::MPI::Vector tmp;
   };
@@ -172,8 +172,9 @@ namespace Step22
           const TrilinosWrappers::MPI::Vector &src) const;
 
   private:
-    const SmartPointer<const TrilinosWrappers::BlockSparseMatrix> system_matrix;
-    const SmartPointer<
+    const ObserverPointer<const TrilinosWrappers::BlockSparseMatrix>
+      system_matrix;
+    const ObserverPointer<
       const InverseMatrix<TrilinosWrappers::SparseMatrix, Preconditioner>>
                                           A_inverse;
     mutable TrilinosWrappers::MPI::Vector tmp1, tmp2;
index a738e047abb8751ca0b5c36a517d935ea0c0b84d..7f36689221e5374f23732eda0d13084e854fcd6b 100644 (file)
@@ -424,7 +424,7 @@ public:
   }
 
 private:
-  SmartPointer<const LAPLACEOPERATOR> laplace;
+  ObserverPointer<const LAPLACEOPERATOR> laplace;
 };
 
 
index 866000a59b73e6afe746f5614ad3d77153b925ed..0cdc6ccecb6da30a027e1566f6c96fbdecc5062a 100644 (file)
@@ -436,7 +436,7 @@ public:
   }
 
 private:
-  SmartPointer<const LAPLACEOPERATOR> laplace;
+  ObserverPointer<const LAPLACEOPERATOR> laplace;
 };
 
 
index 8996fe80ff0d608374dea5e0b39e1d4226838ad8..8f0d4851c606006942e09952347a586b78254b12 100644 (file)
@@ -433,7 +433,7 @@ public:
   }
 
 private:
-  SmartPointer<const LAPLACEOPERATOR> laplace;
+  ObserverPointer<const LAPLACEOPERATOR> laplace;
 };
 
 
index 74ec9fd973c7985719a74fd3df383a0a567537e8..ba8133b504facb5bb92e5d2f262ebfa3af0a0961 100644 (file)
@@ -93,7 +93,7 @@ private:
   const FE_Q<dim>                             element;
   Triangulation<dim>                          triangulation;
   DoFHandler<dim>                             dof_handler;
-  const SmartPointer<const Mapping<dim>>      mapping;
+  const ObserverPointer<const Mapping<dim>>   mapping;
   NonMatching::ImmersedSurfaceQuadrature<dim> quadrature;
 };
 
index a6f70152f764fc64f3b5d4926f35f0166183ea00..022cd1cbc24eefb6cf4b4ccd110bfb39e70a6f0b 100644 (file)
@@ -213,8 +213,8 @@ public:
   vmult(Vector<double> &dst, const Vector<double> &src) const;
 
 private:
-  const SmartPointer<const MatrixType>         matrix;
-  const SmartPointer<const PreconditionerType> preconditioner;
+  const ObserverPointer<const MatrixType>         matrix;
+  const ObserverPointer<const PreconditionerType> preconditioner;
 };
 
 
@@ -254,8 +254,8 @@ public:
   vmult(Vector<double> &dst, const Vector<double> &src) const;
 
 private:
-  const SmartPointer<const BlockSparseMatrix<double>> system_matrix;
-  const SmartPointer<
+  const ObserverPointer<const BlockSparseMatrix<double>> system_matrix;
+  const ObserverPointer<
     const InverseMatrix<SparseMatrix<double>, PreconditionerType>>
     A_inverse;
 
index 5e900aada6698af06f9344f25f90a53cee4065e9..95c416e3b1ef0d8eb7c040182a82086a22fb0e7e 100644 (file)
@@ -303,8 +303,8 @@ public:
   }
 
 private:
-  SmartPointer<const MGSmootherBase<VectorType>> coarse_smooth;
-  const std::vector<unsigned int>               *constrained_dofs;
+  ObserverPointer<const MGSmootherBase<VectorType>> coarse_smooth;
+  const std::vector<unsigned int>                  *constrained_dofs;
 
   mutable VectorType src_copy;
 };
index 4df5021b48135fd90375f6794987c69875befe0d..0a0a9f60c68a3eaf28e0f65a1d3db188c211d696 100644 (file)
@@ -211,8 +211,8 @@ public:
   vmult(Vector<double> &dst, const Vector<double> &src) const;
 
 private:
-  const SmartPointer<const MatrixType>         matrix;
-  const SmartPointer<const PreconditionerType> preconditioner;
+  const ObserverPointer<const MatrixType>         matrix;
+  const ObserverPointer<const PreconditionerType> preconditioner;
 };
 
 
@@ -252,8 +252,8 @@ public:
   vmult(Vector<double> &dst, const Vector<double> &src) const;
 
 private:
-  const SmartPointer<const BlockSparseMatrix<double>> system_matrix;
-  const SmartPointer<
+  const ObserverPointer<const BlockSparseMatrix<double>> system_matrix;
+  const ObserverPointer<
     const InverseMatrix<SparseMatrix<double>, PreconditionerType>>
     A_inverse;
 
index 6925de738e18d8af31f9220876266bb33c790f16..894a94ced6d7bd0b66d9724f8e7c6e00881fc87d 100644 (file)
@@ -209,7 +209,7 @@ namespace Step7
     Triangulation<dim> triangulation;
     DoFHandler<dim>    dof_handler;
 
-    SmartPointer<const FiniteElement<dim>> fe;
+    ObserverPointer<const FiniteElement<dim>> fe;
 
     AffineConstraints<double> hanging_node_constraints;
 
index 465cb37b48ac98a5b0884613a23e881c8f654453..1c609ce6e39705d43d9f29402956c1405f277170 100644 (file)
@@ -139,8 +139,8 @@ namespace Step31
       vmult(VectorType &dst, const VectorType &src) const;
 
     private:
-      const SmartPointer<const MatrixType> matrix;
-      const PreconditionerType            &preconditioner;
+      const ObserverPointer<const MatrixType> matrix;
+      const PreconditionerType               &preconditioner;
     };
     template <class MatrixType, class PreconditionerType>
     InverseMatrix<MatrixType, PreconditionerType>::InverseMatrix(
@@ -182,10 +182,10 @@ namespace Step31
             const TrilinosWrappers::MPI::BlockVector &src) const;
 
     private:
-      const SmartPointer<const TrilinosWrappers::BlockSparseMatrix>
+      const ObserverPointer<const TrilinosWrappers::BlockSparseMatrix>
         stokes_matrix;
-      const SmartPointer<const InverseMatrix<TrilinosWrappers::SparseMatrix,
-                                             PreconditionerTypeMp>>
+      const ObserverPointer<const InverseMatrix<TrilinosWrappers::SparseMatrix,
+                                                PreconditionerTypeMp>>
                                             m_inverse;
       const PreconditionerTypeA            &a_preconditioner;
       mutable TrilinosWrappers::MPI::Vector tmp;
index 26cc9c9c325d9a4eeb5537c9caf025a4c5346d70..3535122595f7972e09cfab7f9d9047d3a723b0fd 100644 (file)
@@ -128,8 +128,8 @@ namespace Step55
       vmult(VectorType &dst, const VectorType &src) const;
 
     private:
-      const SmartPointer<const Matrix> matrix;
-      const Preconditioner            &preconditioner;
+      const ObserverPointer<const Matrix> matrix;
+      const Preconditioner               &preconditioner;
     };
 
 

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.