]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Merge the changes made to the sources on the branch_deprecated branch. This introduce...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 6 Jan 2013 01:55:02 +0000 (01:55 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 6 Jan 2013 01:55:02 +0000 (01:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@27942 0785d39b-7218-0410-832d-ea1e28bc413d

76 files changed:
deal.II/include/deal.II/base/mg_level_object.h
deal.II/include/deal.II/base/table.h
deal.II/include/deal.II/base/thread_management.h
deal.II/include/deal.II/base/timer.h
deal.II/include/deal.II/base/types.h
deal.II/include/deal.II/base/utilities.h
deal.II/include/deal.II/dofs/dof_handler.h
deal.II/include/deal.II/dofs/dof_renumbering.h
deal.II/include/deal.II/dofs/dof_tools.h
deal.II/include/deal.II/fe/fe.h
deal.II/include/deal.II/fe/fe_base.h
deal.II/include/deal.II/fe/fe_values.h
deal.II/include/deal.II/fe/mapping.h
deal.II/include/deal.II/fe/mapping_q_eulerian.h
deal.II/include/deal.II/grid/grid_tools.h
deal.II/include/deal.II/grid/tria.h
deal.II/include/deal.II/grid/tria_accessor.h
deal.II/include/deal.II/grid/tria_accessor.templates.h
deal.II/include/deal.II/grid/tria_levels.h
deal.II/include/deal.II/lac/block_list.h
deal.II/include/deal.II/lac/block_matrix_array.h
deal.II/include/deal.II/lac/block_sparsity_pattern.h
deal.II/include/deal.II/lac/block_vector.h
deal.II/include/deal.II/lac/full_matrix.templates.h
deal.II/include/deal.II/lac/parallel_block_vector.h
deal.II/include/deal.II/lac/parallel_vector.h
deal.II/include/deal.II/lac/parallel_vector.templates.h
deal.II/include/deal.II/lac/precondition_block.h
deal.II/include/deal.II/lac/precondition_block.templates.h
deal.II/include/deal.II/lac/relaxation_block.h
deal.II/include/deal.II/lac/sparse_decomposition.h
deal.II/include/deal.II/lac/sparse_direct.h
deal.II/include/deal.II/lac/sparse_ilu.h
deal.II/include/deal.II/lac/sparse_matrix.h
deal.II/include/deal.II/lac/sparse_mic.h
deal.II/include/deal.II/lac/sparsity_pattern.h
deal.II/include/deal.II/lac/swappable_vector.h
deal.II/include/deal.II/lac/swappable_vector.templates.h
deal.II/include/deal.II/lac/trilinos_block_vector.h
deal.II/include/deal.II/lac/trilinos_parallel_block_vector.h
deal.II/include/deal.II/lac/trilinos_vector_base.h
deal.II/include/deal.II/lac/vector.h
deal.II/include/deal.II/lac/vector.templates.h
deal.II/include/deal.II/lac/vector_memory.h
deal.II/include/deal.II/multigrid/mg_matrix.h
deal.II/include/deal.II/multigrid/mg_smoother.h
deal.II/include/deal.II/multigrid/mg_tools.h
deal.II/include/deal.II/multigrid/multigrid.h
deal.II/include/deal.II/numerics/data_postprocessor.h
deal.II/include/deal.II/numerics/error_estimator.h
deal.II/include/deal.II/numerics/point_value_history.h
deal.II/include/deal.II/numerics/vector_tools.h
deal.II/include/deal.II/numerics/vector_tools.templates.h
deal.II/source/base/function_derivative.cc
deal.II/source/base/logstream.cc
deal.II/source/base/mpi.cc
deal.II/source/base/polynomial.cc
deal.II/source/base/polynomials_raviart_thomas.cc
deal.II/source/base/subscriptor.cc
deal.II/source/base/thread_management.cc
deal.II/source/base/timer.cc
deal.II/source/base/utilities.cc
deal.II/source/distributed/tria.cc
deal.II/source/dofs/dof_handler_policy.cc
deal.II/source/dofs/dof_tools.cc
deal.II/source/fe/fe_tools.cc
deal.II/source/fe/mapping_q_eulerian.cc
deal.II/source/grid/grid_generator.cc
deal.II/source/grid/tria.cc
deal.II/source/grid/tria_accessor.cc
deal.II/source/lac/block_matrix_array.cc
deal.II/source/lac/lapack_full_matrix.cc
deal.II/source/lac/sparse_direct.cc
deal.II/source/lac/vector_memory.cc
deal.II/source/numerics/error_estimator.cc
deal.II/source/numerics/matrix_tools.cc

index 89dae1ab3047a8ab8016c242b11eb13eb19ce401..eca7a5f5343cd5186307fd6039bd408976706759 100644 (file)
@@ -100,12 +100,12 @@ public:
   /**
    * @deprecated Replaced by min_level()
    */
-  unsigned int get_minlevel () const;
+  unsigned int get_minlevel () const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Replaced by max_level()
    */
-  unsigned int get_maxlevel () const;
+  unsigned int get_maxlevel () const DEAL_II_DEPRECATED;
 
   /**
    * Memory used by this object.
index fc28f61f8285efe84ead4106da70535442d09493..607eb1a7ebbe8ed08b65db0e631429e5bf5577b3 100644 (file)
@@ -700,7 +700,7 @@ protected:
    * cast from const), otherwise,
    * keep away!
    */
-  typename std::vector<T>::const_pointer data () const;
+  typename std::vector<T>::const_pointer data () const DEAL_II_DEPRECATED;
 
 protected:
   /**
index 2e0f5691f0465b41426c93b10165776ca5b710ae..c97ad381a58781b7d19ee3f295aaa65c491da659 100644 (file)
@@ -571,7 +571,7 @@ namespace Threads
    *
    * @deprecated
    */
-  typedef Mutex     ThreadMutex;
+  typedef Mutex ThreadMutex DEAL_II_DEPRECATED;
 
   /**
    * Provide a backward compatible name (we
@@ -581,7 +581,7 @@ namespace Threads
    *
    * @deprecated
    */
-  typedef ConditionVariable ThreadCondition;
+  typedef ConditionVariable ThreadCondition DEAL_II_DEPRECATED;
 
   /**
    * If using POSIX functions, then
@@ -589,7 +589,7 @@ namespace Threads
    * to the names we use throughout
    * the library.
    */
-  typedef PosixThreadBarrier   Barrier;
+  typedef PosixThreadBarrier Barrier;
 
 #else
   /**
index 553445e70fa7c7bdba7c388d22fa43c6a3802297..fed57a32bd70704b4fa3423c67aafa668809346c 100644 (file)
@@ -516,7 +516,7 @@ private:
    * class gives reasonable results even
    * when used with several threads.
    */
-  Threads::ThreadMutex mutex;
+  Threads::Mutex mutex;
 };
 
 
index 87b2d5531d381d4b7ecf9e23ba95c75b5b5f43e2..a8cfcc677674ca8a1f8aee11bae707165a53ac93 100644 (file)
@@ -40,17 +40,17 @@ namespace types
   /**
    * @deprecated Old name for the typedef above.
    */
-  typedef subdomain_id subdomain_id_t;
+  typedef subdomain_id subdomain_id_t DEAL_II_DEPRECATED;
 
   /**
   * @deprecated Use numbers::invalid_subdomain_id
    */
-  const unsigned int invalid_subdomain_id = static_cast<subdomain_id>(-1);
+  const unsigned int invalid_subdomain_id DEAL_II_DEPRECATED = static_cast<subdomain_id>(-1);
 
   /**
    * @deprecated Use numbers::artificial_subdomain_id
    */
-  const unsigned int artificial_subdomain_id = static_cast<subdomain_id>(-2);
+  const unsigned int artificial_subdomain_id DEAL_II_DEPRECATED = static_cast<subdomain_id>(-2);
 
   /**
    * The type used to denote global dof
@@ -61,7 +61,7 @@ namespace types
   /**
   *  @deprecated Use numbers::invalid_dof_index
    */
-  const global_dof_index invalid_dof_index = static_cast<global_dof_index>(-1);
+  const global_dof_index invalid_dof_index DEAL_II_DEPRECATED = static_cast<global_dof_index>(-1);
 
   /**
    * The type used to denote boundary indicators associated with every
@@ -79,7 +79,7 @@ namespace types
   /**
    * @deprecated Old name for the typedef above.
    */
-  typedef boundary_id boundary_id_t;
+  typedef boundary_id boundary_id_t DEAL_II_DEPRECATED;
 
   /**
    * The type used to denote material indicators associated with every
@@ -93,7 +93,7 @@ namespace types
   /**
    * @deprecated Old name for the typedef above.
    */
-  typedef material_id material_id_t;
+  typedef material_id material_id_t DEAL_II_DEPRECATED;
 
 }
 
index 657472427dfa4a63d16968444d7609c20f875581..54ef56638fd69ae9c4b01c5684de80e0822f5a31 100644 (file)
@@ -410,7 +410,7 @@ namespace Utilities
      *
      * @deprecated
      */
-    bool program_uses_mpi ();
+    bool program_uses_mpi () DEAL_II_DEPRECATED;
 
     /**
      * @name Functions that work
@@ -428,7 +428,7 @@ namespace Utilities
      *
      * @deprecated
      */
-    unsigned int get_n_mpi_processes (const MPI_Comm &mpi_communicator);
+    unsigned int get_n_mpi_processes (const MPI_Comm &mpi_communicator) DEAL_II_DEPRECATED;
 
     /**
      * This function is an alias for
@@ -436,7 +436,7 @@ namespace Utilities
      *
      * @deprecated
      */
-    unsigned int get_this_mpi_process (const MPI_Comm &mpi_communicator);
+    unsigned int get_this_mpi_process (const MPI_Comm &mpi_communicator) DEAL_II_DEPRECATED;
 
 
     /**
@@ -472,7 +472,7 @@ namespace Utilities
     void
     calculate_collective_mpi_min_max_avg (const MPI_Comm &mpi_communicator,
                                           const double my_value,
-                                          MinMaxAvg &result);
+                                          MinMaxAvg &result) DEAL_II_DEPRECATED;
 
     /**
      * An alias for Utilities::MPI::MPI_InitFinalize.
index 972d1c18647e0b352ca96e0c8d56f5700f2991b8..9deec237d0b402991cf7b3e3010165fcd5ee75da 100644 (file)
@@ -464,7 +464,7 @@ public:
    * found in the implementation of this
    * function.
    *
-   * Note that this function is most often
+   * @note This function is most often
    * used to determine the maximal row
    * length for sparsity
    * patterns. Unfortunately, while the
@@ -486,7 +486,7 @@ public:
    * is also discussed in the documentation
    * of the module on @ref Sparsity.
    */
-  unsigned int max_couplings_between_dofs () const;
+  unsigned int max_couplings_between_dofs () const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Use
@@ -503,7 +503,7 @@ public:
    * max_couplings_between_dofs() in one
    * dimension less.
    */
-  unsigned int max_couplings_between_boundary_dofs () const;
+  unsigned int max_couplings_between_boundary_dofs () const DEAL_II_DEPRECATED;
 
   /*--------------------------------------*/
 
index 93c3c1b8c7298acb2fb4c910d66a79f768b9ed5a..1595102000972b7c36ce9f0ddf3bae7b15fde0fa 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 by the deal.II authors
+//    Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1078,12 +1078,27 @@ namespace DoFRenumbering
               const Point<DH::space_dimension>  &direction,
               const bool         dof_wise_renumbering = false);
 
-  // The following three are only temporary for compatibility reasons and will be removed in 8.0
+  /**
+   * This function does the downstream numbering for the individual
+   * levels of a multigrid hierarchy, but not for the global degrees
+   * of freedom.
+   *
+   * @deprecated Call downstream() function that takes a level
+   * argument for each of the levels of the multigrid hierarchy.
+   */
   template <int dim, int spacedim>
   void
   downstream (MGDoFHandler<dim,spacedim>               &dof_handler,
               const Point<spacedim> &direction,
-              const bool        dof_wise_renumbering = false);
+              const bool        dof_wise_renumbering = false) DEAL_II_DEPRECATED;
+
+  /**
+   * @deprecated Use downstream() instead.
+   */
+  template <class DH>
+  void
+  downstream_dg (DH &dof,
+                 const Point<DH::space_dimension> &direction) DEAL_II_DEPRECATED;
 
   template <class DH>
   void
@@ -1093,6 +1108,16 @@ namespace DoFRenumbering
     downstream(dof, direction);
   }
 
+
+  /**
+   * @deprecated Use downstream() instead.
+   */
+  template <class DH>
+  void
+  downstream_dg (DH &dof,
+                 unsigned int level,
+                 const Point<DH::space_dimension> &direction) DEAL_II_DEPRECATED;
+
   template <class DH>
   void
   downstream_dg (DH &dof,
index 432b04b2b8ff07aea015d42024d94b27eb97cf34..fbdb8625bac0431cb2e21e9fd4cb75a1213cd6dc 100644 (file)
@@ -497,7 +497,7 @@ namespace DoFTools
                          SparsityPattern        &sparsity_pattern,
                          const ConstraintMatrix &constraints = ConstraintMatrix(),
                          const bool              keep_constrained_dofs = true,
-                         const types::subdomain_id subdomain_id = types::invalid_subdomain_id);
+                         const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id);
 
   /**
    * Locate non-zero entries for
@@ -659,7 +659,7 @@ namespace DoFTools
                          SparsityPattern          &sparsity_pattern,
                          const ConstraintMatrix   &constraints = ConstraintMatrix(),
                          const bool                keep_constrained_dofs = true,
-                         const types::subdomain_id subdomain_id = types::invalid_subdomain_id);
+                         const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id);
 
   /**
    * @deprecated This is the old
@@ -677,7 +677,7 @@ namespace DoFTools
   void
   make_sparsity_pattern (const DH                              &dof,
                          const std::vector<std::vector<bool> > &mask,
-                         SparsityPattern                       &sparsity_pattern);
+                         SparsityPattern                       &sparsity_pattern) DEAL_II_DEPRECATED;
 
   /**
    * Construct a sparsity pattern that
@@ -2298,7 +2298,7 @@ namespace DoFTools
   void
   count_dofs_per_component (const DoFHandler<dim,spacedim>     &dof_handler,
                             std::vector<unsigned int> &dofs_per_component,
-                            std::vector<unsigned int>  target_component);
+                            std::vector<unsigned int>  target_component) DEAL_II_DEPRECATED;
 
   /**
    * This function can be used when
index 6c018ffbe3ae4afc22f10b6f796e05c3bd01b90f..70565a9095cfa0cd387697c232b381c4032be19e 100644 (file)
@@ -2875,7 +2875,7 @@ FiniteElement<dim,spacedim>::face_system_to_component_index (const unsigned int
   //
   // in 1d, the face index is equal
   // to the cell index
-  Assert (is_primitive(this->face_to_equivalent_cell_index(index)),
+  Assert (is_primitive(this->face_to_cell_index(0, index)),
           (typename FiniteElement<dim,spacedim>::ExcShapeFunctionNotPrimitive(index)) );
 
   return face_system_to_component_table[index];
index 4c9e71463ccf650afcb91c2e00a897f273b48425..5b7aa6373dd6663adbb9e5dd4eca347a3376f7a5 100644 (file)
@@ -450,7 +450,7 @@ public:
    * @endcode
    *
    */
-  unsigned int face_to_equivalent_cell_index (const unsigned int index) const;
+  unsigned int face_to_equivalent_cell_index (const unsigned int index) const DEAL_II_DEPRECATED;
 
   /**
    * Comparison operator.
index f5ad8363e419e1a5be0969751cfee56d4685ebb4..8b465e3c8a401e74a50501983d44d817762d1134 100644 (file)
@@ -1853,7 +1853,7 @@ public:
    */
   const Tensor<2,spacedim> &
   shape_2nd_derivative (const unsigned int function_no,
-                        const unsigned int point_no) const;
+                        const unsigned int point_no) const DEAL_II_DEPRECATED;
 
 
   /**
@@ -1897,7 +1897,7 @@ public:
   Tensor<2,spacedim>
   shape_2nd_derivative_component (const unsigned int function_no,
                                   const unsigned int point_no,
-                                  const unsigned int component) const;
+                                  const unsigned int component) const DEAL_II_DEPRECATED;
 
 
   //@}
@@ -2285,7 +2285,7 @@ public:
    */
   template <class InputVector>
   void get_function_grads (const InputVector      &fe_function,
-                           std::vector<Tensor<1,spacedim> > &gradients) const;
+                           std::vector<Tensor<1,spacedim> > &gradients) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Use
@@ -2293,7 +2293,7 @@ public:
    */
   template <class InputVector>
   void get_function_grads (const InputVector               &fe_function,
-                           std::vector<std::vector<Tensor<1,spacedim> > > &gradients) const;
+                           std::vector<std::vector<Tensor<1,spacedim> > > &gradients) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Use
@@ -2302,7 +2302,7 @@ public:
   template <class InputVector>
   void get_function_grads (const InputVector &fe_function,
                            const VectorSlice<const std::vector<unsigned int> > &indices,
-                           std::vector<Tensor<1,spacedim> > &gradients) const;
+                           std::vector<Tensor<1,spacedim> > &gradients) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Use
@@ -2312,7 +2312,7 @@ public:
   void get_function_grads (const InputVector &fe_function,
                            const VectorSlice<const std::vector<unsigned int> > &indices,
                            std::vector<std::vector<Tensor<1,spacedim> > > &gradients,
-                           bool quadrature_points_fastest = false) const;
+                           bool quadrature_points_fastest = false) const DEAL_II_DEPRECATED;
 
   //@}
   /// @name Access to second derivatives (Hessian matrices and Laplacians) of global finite element fields
@@ -2464,7 +2464,7 @@ public:
   template <class InputVector>
   void
   get_function_2nd_derivatives (const InputVector &,
-                                std::vector<Tensor<2,spacedim> > &) const;
+                                std::vector<Tensor<2,spacedim> > &) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Wrapper for get_function_hessians()
@@ -2473,7 +2473,7 @@ public:
   void
   get_function_2nd_derivatives (const InputVector &,
                                 std::vector<std::vector<Tensor<2,spacedim> > > &,
-                                bool = false) const;
+                                bool = false) const DEAL_II_DEPRECATED;
 
   /**
    * Compute the (scalar) Laplacian (i.e. the trace of the tensor of second
@@ -2775,7 +2775,7 @@ public:
    * point. The length of the vector
    * is normalized to one.
    */
-  const Point<spacedim> &cell_normal_vector (const unsigned int i) const;
+  const Point<spacedim> &cell_normal_vector (const unsigned int i) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Use
@@ -2785,7 +2785,7 @@ public:
    * the cell in each of the
    * quadrature points.
    */
-  const std::vector<Point<spacedim> > &get_cell_normal_vectors () const;
+  const std::vector<Point<spacedim> > &get_cell_normal_vectors () const DEAL_II_DEPRECATED;
 
   //@}
 
index 73a327eded942ba6d4f6ecb8adae755a6112264a..3a5dc6077707aad3792e623761a82daf4ac940a3 100644 (file)
@@ -609,7 +609,7 @@ public:
   transform_covariant (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
                        const unsigned int                                    offset,
                        VectorSlice<std::vector<Tensor<1,spacedim> > >        output,
-                       const InternalDataBase &internal) const;
+                       const InternalDataBase &internal) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Use transform() instead.
@@ -618,7 +618,7 @@ public:
   transform_covariant (const VectorSlice<const std::vector<DerivativeForm<1, dim ,spacedim> > > input,
                        const unsigned int                 offset,
                        VectorSlice<std::vector<Tensor<2,spacedim> > >      output,
-                       const InternalDataBase &internal) const;
+                       const InternalDataBase &internal) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Use transform() instead.
@@ -627,7 +627,7 @@ public:
   transform_contravariant (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
                            const unsigned int                 offset,
                            VectorSlice<std::vector<Tensor<1,spacedim> > >      output,
-                           const typename Mapping<dim,spacedim>::InternalDataBase &internal) const;
+                           const typename Mapping<dim,spacedim>::InternalDataBase &internal) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Use transform() instead.
@@ -637,7 +637,7 @@ public:
   transform_contravariant (const VectorSlice<const std::vector<DerivativeForm<1, dim,spacedim> > > input,
                            const unsigned int                 offset,
                            const VectorSlice<std::vector<Tensor<2,spacedim> > > output,
-                           const typename Mapping<dim,spacedim>::InternalDataBase &internal) const;
+                           const typename Mapping<dim,spacedim>::InternalDataBase &internal) const DEAL_II_DEPRECATED;
 
   /**
    * The transformed (generalized)
index df7b0946835d25ea07750d5e0283d5d9733ee9ec..e887c0c5e30ddc7b74098dc877ec299f1914f2ce 100644 (file)
@@ -220,7 +220,7 @@ private:
    * A variable to guard access to
    * the fe_values variable.
    */
-  mutable Threads::ThreadMutex fe_values_mutex;
+  mutable Threads::Mutex fe_values_mutex;
 
   /**
    * Compute the positions of the
index 6abe79967948528289eec8a62288b9680eff34ac..f9face699a5037d5e80fd75487735d5e38ca9279 100644 (file)
@@ -267,22 +267,9 @@ namespace GridTools
                        const Point<spacedim>     &p);
 
   /**
-  * @deprecated This function might
-   * be acceptable to find a patch
-   * around a single vertex, but it
-   * wastes resources creating
-   * patches around all vertices. The
-   * function mail fail on
-   * anisotropic meshes, and an easy
-   * fix is not obvious. Therefore,
-   * it should be replaced by a
-   * function which computes all
-   * active vertex patches by looping
-   * over cells.
-   *
    * Find and return a vector of
    * iterators to active cells that
-   * surround a given vertex @p vertex.
+   * surround a given vertex with index @p vertex_index.
    * The type of the first parameter
    * may be either Triangulation,
    * DoFHandler, hp::DoFHandler, or
@@ -292,14 +279,18 @@ namespace GridTools
    * vertex itself might not be a vertex
    * of all adjacent cells that are returned.
    * However, it will
-   * always be either a vertex of a cell of be
+   * always be either a vertex of a cell or be
    * a hanging node located on a face or an
    * edge of it.
+   *
+   * @note It isn't entirely clear at this time whether the function
+   * does the right thing with anisotropically refined meshes. It needs
+   * to be checked for this case.
    */
   template<int dim, template <int, int> class Container, int spacedim>
   std::vector<typename Container<dim,spacedim>::active_cell_iterator>
   find_cells_adjacent_to_vertex (const Container<dim,spacedim> &container,
-                                 const unsigned int    vertex);
+                                 const unsigned int    vertex_index);
 
 
   /**
index 703116ba20deb3186eb4d371b19b439502f29fcb..888acd678e6181a7e95c6291d23862365b05f1eb 100644 (file)
@@ -1475,7 +1475,7 @@ public:
      *
      * @deprecated
      */
-    virtual ~RefinementListener ();
+    virtual ~RefinementListener () DEAL_II_DEPRECATED;
 
     /**
      * Before refinement is actually
@@ -1493,7 +1493,7 @@ public:
      */
     virtual
     void
-    pre_refinement_notification (const Triangulation<dim, spacedim> &tria);
+    pre_refinement_notification (const Triangulation<dim, spacedim> &tria) DEAL_II_DEPRECATED;
 
     /**
      * After refinement is actually
@@ -1511,7 +1511,7 @@ public:
      */
     virtual
     void
-    post_refinement_notification (const Triangulation<dim, spacedim> &tria);
+    post_refinement_notification (const Triangulation<dim, spacedim> &tria) DEAL_II_DEPRECATED;
 
     /**
      * At the end of a call to
@@ -1537,7 +1537,7 @@ public:
     virtual
     void
     copy_notification (const Triangulation<dim, spacedim> &old_tria,
-                       const Triangulation<dim, spacedim> &new_tria);
+                       const Triangulation<dim, spacedim> &new_tria) DEAL_II_DEPRECATED;
 
     /**
      * At the end of a call to
@@ -1559,7 +1559,8 @@ public:
      */
     virtual
     void
-    create_notification (const Triangulation<dim, spacedim> &tria);
+    create_notification (const Triangulation<dim, spacedim> &tria) DEAL_II_DEPRECATED;
+
   };
 
   /**
@@ -2196,7 +2197,7 @@ public:
    *
    * @deprecated
    */
-  void add_refinement_listener (RefinementListener &listener) const;
+  void add_refinement_listener (RefinementListener &listener) const DEAL_II_DEPRECATED;
 
   /**
    *  Remove a
@@ -2214,7 +2215,7 @@ public:
    *
    * @deprecated
    */
-  void remove_refinement_listener (RefinementListener &listener) const;
+  void remove_refinement_listener (RefinementListener &listener) const DEAL_II_DEPRECATED;
 
   /**
    * A structure that has boost::signal objects for a number of actions that a
@@ -2460,7 +2461,7 @@ public:
    *  Clear all user pointers.
   *  See also @ref GlossUserData .
    */
-  void clear_user_pointers ();
+  void clear_user_pointers () DEAL_II_DEPRECATED;
 
   /**
    * Save all user indices. The
index 2c565fb292cd1011286317f6072d8e93de77b658..e90be3648e75f950971a86662132616c2fc67862 100644 (file)
@@ -2702,12 +2702,12 @@ public:
   /**
    * Get the level subdomain id of this cell. This is used for parallel multigrid.
    */
-  types::subdomain_id_t level_subdomain_id () const;
+  types::subdomain_id level_subdomain_id () const;
 
   /**
    * Set the level subdomain id of this cell. This is used for parallel multigrid.
    */
-  void set_level_subdomain_id (const types::subdomain_id_t new_level_subdomain_id) const;
+  void set_level_subdomain_id (const types::subdomain_id new_level_subdomain_id) const;
 
 
   /**
index 4bc326d50a58a0222ff55bdd3cbd9f58d83f1ce5..b34c505fcb8b82d0b86e76c0af92562708d076eb 100644 (file)
@@ -2887,7 +2887,7 @@ CellAccessor<dim,spacedim>::is_locally_owned () const
   return true;
 #else
   const types::subdomain_id subdomain = this->subdomain_id();
-  if (subdomain == types::artificial_subdomain_id)
+  if (subdomain == numbers::artificial_subdomain_id)
     return false;
 
   const parallel::distributed::Triangulation<dim,spacedim> *pdt
@@ -2910,7 +2910,7 @@ CellAccessor<dim,spacedim>::is_ghost () const
   return false;
 #else
   const types::subdomain_id subdomain = this->subdomain_id();
-  if (subdomain == types::artificial_subdomain_id)
+  if (subdomain == numbers::artificial_subdomain_id)
     return false;
 
   const parallel::distributed::Triangulation<dim,spacedim> *pdt
@@ -2933,7 +2933,7 @@ CellAccessor<dim,spacedim>::is_artificial () const
 #ifndef DEAL_II_USE_P4EST
   return false;
 #else
-  return (this->subdomain_id() == types::artificial_subdomain_id);
+  return (this->subdomain_id() == numbers::artificial_subdomain_id);
 #endif
 }
 
index 8fa3eb101a4f4dd0a2794b224b13b51a5356ccc9..70f35c0a4dace61316a7857fddb4c016da36df1c 100644 (file)
@@ -143,7 +143,7 @@ namespace internal
       /**
        * for parallel multigrid
        */
-      std::vector<types::subdomain_id_t> level_subdomain_ids;
+      std::vector<types::subdomain_id> level_subdomain_ids;
 
       /**
        * One integer for every consecutive
@@ -248,7 +248,7 @@ namespace internal
       std::vector<bool> coarsen_flags;
       std::vector<std::pair<int,int> > neighbors;
       std::vector<types::subdomain_id> subdomain_ids;
-      std::vector<types::subdomain_id_t> level_subdomain_ids;
+      std::vector<types::subdomain_id> level_subdomain_ids;
       std::vector<int> parents;
 
       // The following is not used
index d40c9c9814c051d40e9c337419bc87e8a28f6883..04c312d8065782e63e8ffd0422c0b55c7ef9242c 100644 (file)
@@ -135,7 +135,7 @@ public:
   template <typename ITERATOR>
   void initialize_mg(unsigned int n_blocks,
                      const ITERATOR begin,
-                     const typename identity<ITERATOR>::type end);
+                     const typename identity<ITERATOR>::type end) DEAL_II_DEPRECATED;
 
   /**
    * @deprecated This function will
@@ -173,7 +173,7 @@ public:
                   const ITERATOR begin,
                   const typename identity<ITERATOR>::type end,
                   const std::vector<bool> &selected_dofs,
-                  unsigned int offset = 0);
+                  unsigned int offset = 0) DEAL_II_DEPRECATED;
   /**
    * @deprecated This function will
    * move to DoFTools.
@@ -210,7 +210,7 @@ public:
                      const ITERATOR begin,
                      const typename identity<ITERATOR>::type end,
                      const std::vector<bool> &selected_dofs,
-                     unsigned int offset = 0);
+                     unsigned int offset = 0) DEAL_II_DEPRECATED;
 
   /**
    * @deprecated This function will
@@ -228,7 +228,7 @@ public:
                                     const ITERATOR begin,
                                     const typename identity<ITERATOR>::type end,
                                     const std::vector<bool> &selected_dofs = std::vector<bool>(),
-                                    unsigned int offset = 0);
+                                    unsigned int offset = 0) DEAL_II_DEPRECATED;
 
   /**
    * @deprecated This function will
@@ -241,7 +241,7 @@ public:
   unsigned int count_vertex_patches(
     const ITERATOR begin,
     const typename identity<ITERATOR>::type end,
-    bool same_level_only) const;
+    bool same_level_only) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated This function will
@@ -250,7 +250,7 @@ public:
    */
   template <int dim, typename ITERATOR>
   bool cell_generates_vertex_patch(const ITERATOR cell,
-                                   bool same_level_only) const;
+                                   bool same_level_only) const DEAL_II_DEPRECATED;
 
   /**
    * The number of blocks.
@@ -284,7 +284,7 @@ private:
    * The container for t he index sets.
    */
   std::vector<block_container> index_sets;
-};
+} DEAL_II_DEPRECATED;
 
 
 inline
index 028ead966e59ee517a3d71336e1b13372d221821..73ae0d19a0dcf98ec3d6b2e6ba8f58d5793e44fc 100644 (file)
@@ -144,9 +144,6 @@ public:
    * function to call for an object
    * created by the default
    * constructor.
-   *
-   * @deprecated the last argument
-   * is ignored.
    */
   void initialize (const unsigned int n_block_rows,
                    const unsigned int n_block_cols);
@@ -160,7 +157,7 @@ public:
    */
   BlockMatrixArray (const unsigned int n_block_rows,
                     const unsigned int n_block_cols,
-                    VectorMemory<Vector<number> > &mem);
+                    VectorMemory<Vector<number> > &mem) DEAL_II_DEPRECATED;
 
   /**
    * Initialize object
@@ -174,7 +171,7 @@ public:
    */
   void initialize (const unsigned int n_block_rows,
                    const unsigned int n_block_cols,
-                   VectorMemory<Vector<number> > &mem);
+                   VectorMemory<Vector<number> > &mem) DEAL_II_DEPRECATED;
 
   /**
    * Adjust the matrix to a new
@@ -224,7 +221,7 @@ public:
                   const unsigned int row,
                   const unsigned int col,
                   const double       prefix = 1.,
-                  const bool         transpose = false);
+                  const bool         transpose = false) DEAL_II_DEPRECATED;
 
 
   /**
@@ -500,7 +497,7 @@ public:
    */
   BlockTrianglePrecondition (unsigned int n_block_rows,
                              VectorMemory<Vector<number> > &mem,
-                             bool backward = false);
+                             bool backward = false) DEAL_II_DEPRECATED;
 
   /**
    * Initialize object
@@ -514,7 +511,7 @@ public:
    */
   void initialize (const unsigned int n_block_rows,
                    VectorMemory<Vector<number> > &mem,
-                   bool backward = false);
+                   bool backward = false) DEAL_II_DEPRECATED;
 
   /**
    * Resize preconditioner to a new
@@ -554,7 +551,7 @@ public:
                   const unsigned int row,
                   const unsigned int col,
                   const double       prefix = 1.,
-                  const bool         transpose = false);
+                  const bool         transpose = false) DEAL_II_DEPRECATED;
 
   /**
    * Preconditioning.
index ef700e921881814e65f671d717411514db9bee60..9b412967b02bfb639c38a88c74319ab9f0e70dc1 100644 (file)
@@ -745,7 +745,7 @@ public:
  *
  * @deprecated
  */
-typedef BlockCompressedSparsityPattern CompressedBlockSparsityPattern;
+typedef BlockCompressedSparsityPattern CompressedBlockSparsityPattern DEAL_II_DEPRECATED;
 
 
 
index c090a14a517195f8b405f0e67dd5d93148334120..2ce6364d1b6b632dff6356138ac425abf500ffdf 100644 (file)
@@ -368,7 +368,7 @@ public:
    * @deprecated Use <tt>operator*=</tt>
    * instead.
    */
-  void scale (const value_type factor);
+  void scale (const value_type factor) DEAL_II_DEPRECATED;
 
   /**
    * Multiply each element of this
index 735bf1f2a3eb91ed18ddb93545236fc5fa737462..d7adfc766f90ff7d9e9bb49052119f23b098bf68 100644 (file)
@@ -130,8 +130,8 @@ FullMatrix<number>::all_zero () const
 {
   Assert (!this->empty(), ExcEmptyMatrix());
 
-  const number *p = this->data();
-  const number *const e = this->data() + this->n_elements();
+  const number *p = &this->values[0];
+  const number *const e = &this->values[0] + this->n_elements();
   while (p!=e)
     if (*p++ != number(0.0))
       return false;
@@ -194,7 +194,7 @@ FullMatrix<number>::vmult (Vector<number2> &dst,
 
   Assert (&src != &dst, ExcSourceEqualsDestination());
 
-  const number *e = this->data();
+  const number *e = &this->values[0];
   // get access to the data in order to
   // avoid copying it when using the ()
   // operator
@@ -224,7 +224,7 @@ void FullMatrix<number>::Tvmult (Vector<number2>       &dst,
 
   Assert (&src != &dst, ExcSourceEqualsDestination());
 
-  const number *e = this->data();
+  const number *e = &this->values[0];
   number2 *dst_ptr = &dst(0);
   const unsigned int size_m = m(), size_n = n();
 
@@ -370,7 +370,7 @@ void FullMatrix<number>::fill_permutation (const FullMatrix<number2> &src,
 /*  void FullMatrix<number>::fill (const number2* entries) */
 /*  { */
 /*      if (n_cols()*n_rows() != 0) */
-/*        std::copy (entries, entries+n_rows()*n_cols(), this->data()); */
+/*        std::copy (entries, entries+n_rows()*n_cols(), &this->values[0]); */
 /*  } */
 
 
@@ -949,7 +949,7 @@ FullMatrix<number>::matrix_norm_square (const Vector<number2> &v) const
 
   number2 sum = 0.;
   const unsigned int n_rows = m();
-  const number *val_ptr = this->data();
+  const number *val_ptr = &this->values[0];
   const number2 *v_ptr;
 
   for (unsigned int row=0; row<n_rows; ++row)
@@ -981,7 +981,7 @@ FullMatrix<number>::matrix_scalar_product (const Vector<number2> &u,
   number2 sum = 0.;
   const unsigned int n_rows = m();
   const unsigned int n_cols = n();
-  const number *val_ptr = this->data();
+  const number *val_ptr = &this->values[0];
   const number2 *v_ptr;
 
   for (unsigned int row=0; row<n_rows; ++row)
@@ -1215,16 +1215,8 @@ template <typename number>
 bool
 FullMatrix<number>::operator == (const FullMatrix<number> &M) const
 {
-  // the matrices may either be both
-  // empty, or of same size and with
-  // same values, if they shall be
-  // equal
-  bool result = (this->data()==0) && (M.data()==0);
-  result = result || ((m()==M.m()) && (n()==M.n()) &&
-                      std::equal (this->data(), this->data()+m()*n(),
-                                  M.data()));
-
-  return result;
+  // simply pass down to the base class
+  return Table<2,number>::operator==(M);
 }
 
 
@@ -1284,7 +1276,7 @@ FullMatrix<number>::frobenius_norm () const
 
   real_type s = 0.;
   for (unsigned int i=0; i<this->n_rows()*this->n_cols(); ++i)
-    s += numbers::NumberTraits<number>::abs_square(this->data()[i]);
+    s += numbers::NumberTraits<number>::abs_square(this->values[i]);
   return std::sqrt(s);
 }
 
index 76c81f708a737bdb7f15665e6fa480ec12bd5a4c..221570efd034cc1c7492677538529a795e74c56a 100644 (file)
@@ -284,7 +284,7 @@ namespace parallel
        * @deprecated Use <tt>operator*=</tt>
        * instead.
        */
-      void scale (const value_type factor);
+      void scale (const value_type factor) DEAL_II_DEPRECATED;
 
       /**
        * Multiply each element of this
index 9404d915b21ebc37d2f07421d836a4051787456b..a10ad71f34dbba768df69657ea6734f64bcaf171 100644 (file)
@@ -754,7 +754,7 @@ namespace parallel
        * <tt>operator *=</tt> and
        * <tt>operator /=</tt> instead.
        */
-      void scale (const Number factor);
+      void scale (const Number factor) DEAL_II_DEPRECATED;
 
 
       /**
@@ -947,7 +947,7 @@ namespace parallel
        * when used with several
        * threads.
        */
-      mutable Threads::ThreadMutex mutex;
+      mutable Threads::Mutex mutex;
 
       /**
        * A helper function that clears the
index d841e0a1f5813d4a7f3f4f10fe7ae3e547185ca0..10b601f0cd66296f080b9768d3dbbb67e49a18b0 100644 (file)
@@ -211,7 +211,7 @@ namespace parallel
         return;
 
       // make this function thread safe
-      Threads::ThreadMutex::ScopedLock lock (mutex);
+      Threads::Mutex::ScopedLock lock (mutex);
 
       const unsigned int n_import_targets = part.import_targets().size();
       const unsigned int n_ghost_targets  = part.ghost_targets().size();
@@ -292,7 +292,7 @@ namespace parallel
         return;
 
       // make this function thread safe
-      Threads::ThreadMutex::ScopedLock lock (mutex);
+      Threads::Mutex::ScopedLock lock (mutex);
 
       const unsigned int n_import_targets = part.import_targets().size();
       const unsigned int n_ghost_targets  = part.ghost_targets().size();
@@ -357,7 +357,7 @@ namespace parallel
         return;
 
       // make this function thread safe
-      Threads::ThreadMutex::ScopedLock lock (mutex);
+      Threads::Mutex::ScopedLock lock (mutex);
 
       const unsigned int n_import_targets = part.import_targets().size();
       const unsigned int n_ghost_targets = part.ghost_targets().size();
@@ -452,7 +452,7 @@ namespace parallel
       if (update_ghost_values_requests.size() > 0)
         {
           // make this function thread safe
-          Threads::ThreadMutex::ScopedLock lock (mutex);
+          Threads::Mutex::ScopedLock lock (mutex);
 
           int ierr;
           ierr = MPI_Waitall (update_ghost_values_requests.size(),
index d9e4711c10760dd8c111cf494c2965dfbdfed9ea..d3d7feb3edf4bbf9ffb4f9920617ea4bd3123923 100644 (file)
@@ -376,7 +376,7 @@ public:
    * The number of blocks of the
    * matrix.
    */
-  unsigned int n_blocks() const;
+  unsigned int n_blocks() const DEAL_II_DEPRECATED;
 
   /**
    * Determine an estimate for the
@@ -1087,7 +1087,7 @@ Accessor (const PreconditionBlockJacobi<MATRIX, inverse_type> *matrix,
 
   // This is the end accessor, which
   // does not hava a valid block.
-  if (a_block == matrix->n_blocks())
+  if (a_block == matrix->size())
     return;
 
   const unsigned int r = row % bs;
@@ -1095,8 +1095,8 @@ Accessor (const PreconditionBlockJacobi<MATRIX, inverse_type> *matrix,
   b_iterator = matrix->inverse(a_block).begin(r);
   b_end = matrix->inverse(a_block).end();
 
-  Assert (a_block < matrix->n_blocks(),
-          ExcIndexRange(a_block, 0, matrix->n_blocks()));
+  Assert (a_block < matrix->size(),
+          ExcIndexRange(a_block, 0, matrix->size()));
 }
 
 
@@ -1105,7 +1105,7 @@ inline
 unsigned int
 PreconditionBlockJacobi<MATRIX, inverse_type>::const_iterator::Accessor::row() const
 {
-  Assert (a_block < matrix->n_blocks(),
+  Assert (a_block < matrix->size(),
           ExcIteratorPastEnd());
 
   return bs * a_block + b_iterator->row();
@@ -1117,7 +1117,7 @@ inline
 unsigned int
 PreconditionBlockJacobi<MATRIX, inverse_type>::const_iterator::Accessor::column() const
 {
-  Assert (a_block < matrix->n_blocks(),
+  Assert (a_block < matrix->size(),
           ExcIteratorPastEnd());
 
   return bs * a_block + b_iterator->column();
@@ -1129,7 +1129,7 @@ inline
 inverse_type
 PreconditionBlockJacobi<MATRIX, inverse_type>::const_iterator::Accessor::value() const
 {
-  Assert (a_block < matrix->n_blocks(),
+  Assert (a_block < matrix->size(),
           ExcIteratorPastEnd());
 
   return b_iterator->value();
@@ -1158,7 +1158,7 @@ PreconditionBlockJacobi<MATRIX, inverse_type>::const_iterator::operator++ ()
     {
       ++accessor.a_block;
 
-      if (accessor.a_block < accessor.matrix->n_blocks())
+      if (accessor.a_block < accessor.matrix->size())
         {
           accessor.b_iterator = accessor.matrix->inverse(accessor.a_block).begin();
           accessor.b_end = accessor.matrix->inverse(accessor.a_block).end();
@@ -1192,7 +1192,7 @@ bool
 PreconditionBlockJacobi<MATRIX, inverse_type>::const_iterator::
 operator == (const const_iterator &other) const
 {
-  if (accessor.a_block == accessor.matrix->n_blocks() &&
+  if (accessor.a_block == accessor.matrix->size() &&
       accessor.a_block == other.accessor.a_block)
     return true;
 
@@ -1240,7 +1240,7 @@ inline
 typename PreconditionBlockJacobi<MATRIX, inverse_type>::const_iterator
 PreconditionBlockJacobi<MATRIX, inverse_type>::end () const
 {
-  return const_iterator(this, this->n_blocks() * this->block_size());
+  return const_iterator(this, this->size() * this->block_size());
 }
 
 
index 1379139aefa363796241e448af4eb96729df5ba1..41fc24ad955b791abc6a3db75c9c282effae7145 100644 (file)
@@ -625,7 +625,7 @@ void PreconditionBlockJacobi<MATRIX,inverse_type>
 
         begin_diag_block+=this->blocksize;
       }
-  dst.scale(this->relaxation);
+  dst *= this->relaxation;
 }
 
 
index 6a2d94fc250d04100c426cbf05c64429d3252e8e..c4414385d8ab87bcb619840240f70e5904ff0fe8 100644 (file)
@@ -86,7 +86,7 @@ public:
     AdditionalData (const BlockList &block_list,
                     const double relaxation = 1.,
                     const bool invert_diagonal = true,
-                    const bool same_diagonal = false);
+                    const bool same_diagonal = false) DEAL_II_DEPRECATED;
 
 
     /**
index 19abf9986c07df5f545c4c3e2154856bf79ee604..17e25c9bd79ac066bdd2811ad53e7910ae756c31 100644 (file)
@@ -153,7 +153,7 @@ protected:
    * compability. It will be removed
    * in later versions.
    */
-  SparseLUDecomposition (const SparsityPattern &sparsity);
+  SparseLUDecomposition (const SparsityPattern &sparsity) DEAL_II_DEPRECATED;
 
 public:
   /**
@@ -302,7 +302,7 @@ public:
    *
    * @deprecated
    */
-  void reinit (const SparsityPattern &sparsity);
+  void reinit (const SparsityPattern &sparsity) DEAL_II_DEPRECATED;
 
   /**
    * This method is deprecated,
@@ -314,7 +314,7 @@ public:
    */
   template <typename somenumber>
   void decompose (const SparseMatrix<somenumber> &matrix,
-                  const double                    strengthen_diagonal=0.);
+                  const double                    strengthen_diagonal=0.) DEAL_II_DEPRECATED;
 
   /**
    * This method is deprecated,
@@ -324,7 +324,7 @@ public:
    *
    * @deprecated
    */
-  virtual bool is_decomposed () const;
+  virtual bool is_decomposed () const DEAL_II_DEPRECATED;
 
   /**
    * Return whether the object is
index 03b3e1ce078e67a76e269376f6c8dc3ba6d549ca..db7c679161dd2380b03c5fbbdcde3a8a58d520ec 100644 (file)
@@ -331,7 +331,7 @@ public:
    * this class for more
    * information.
    */
-  Threads::ThreadMutex &get_synchronisation_lock () const;
+  Threads::Mutex &get_synchronisation_lock () const;
 
   /** @addtogroup Exceptions
    * @{ */
@@ -520,8 +520,8 @@ private:
    * Mutexes for synchronising access
    * to this class.
    */
-  static Threads::ThreadMutex static_synchronisation_lock;
-  mutable Threads::ThreadMutex non_static_synchronisation_lock;
+  static Threads::Mutex static_synchronisation_lock;
+  mutable Threads::Mutex non_static_synchronisation_lock;
 
   /**
    * Fill the <tt>A</tt> array from the
@@ -801,7 +801,7 @@ public:
    * this class for more
    * information.
    */
-  Threads::ThreadMutex &get_synchronisation_lock () const;
+  Threads::Mutex &get_synchronisation_lock () const;
 
   /** @addtogroup Exceptions
    * @{ */
@@ -948,7 +948,7 @@ private:
    * Mutex for synchronising access
    * to this class.
    */
-  static Threads::ThreadMutex synchronisation_lock;
+  static Threads::Mutex synchronisation_lock;
 
   /**
    * Fill the <tt>A</tt> array from the
index 7569b432609d8c07000899da9f6fbf3b9aab5207..900c85723253644bfbf598c609a18f6defd3deb9 100644 (file)
@@ -67,7 +67,7 @@ public:
    * backward compability. It will
    * be removed in later versions.
    */
-  SparseILU (const SparsityPattern &sparsity);
+  SparseILU (const SparsityPattern &sparsity) DEAL_II_DEPRECATED;
 
   /**
    * Make
@@ -122,7 +122,7 @@ public:
    */
   template <typename somenumber>
   void decompose (const SparseMatrix<somenumber> &matrix,
-                  const double                    strengthen_diagonal=0.);
+                  const double                    strengthen_diagonal=0.) DEAL_II_DEPRECATED;
 
   /**
    * This method is deprecated, and
@@ -132,7 +132,7 @@ public:
    */
   template <typename somenumber>
   void apply_decomposition (Vector<somenumber>       &dst,
-                            const Vector<somenumber> &src) const;
+                            const Vector<somenumber> &src) const DEAL_II_DEPRECATED;
 
   /**
    * Apply the incomplete decomposition,
index 9092530630d276188d6485fcd872cb3cc43cd90b..7b150ae63886dfa40c0f4ba1c1be06e77d6c5a29 100644 (file)
@@ -908,7 +908,7 @@ public:
    * @deprecated Use iterator or const_iterator instead!
    */
   number raw_entry (const unsigned int row,
-                    const unsigned int index) const;
+                    const unsigned int index) const DEAL_II_DEPRECATED;
 
   /**
    * This is for hackers. Get access to the <i>i</i>th element of this
@@ -923,14 +923,14 @@ public:
    *
    * @internal @deprecated Use iterator or const_iterator instead!
    */
-  number global_entry (const unsigned int i) const;
+  number global_entry (const unsigned int i) const DEAL_II_DEPRECATED;
 
   /**
    * Same as above, but with write access.  You certainly know what you do?
    *
    * @internal @deprecated Use iterator or const_iterator instead!
    */
-  number &global_entry (const unsigned int i);
+  number &global_entry (const unsigned int i) DEAL_II_DEPRECATED;
 
 //@}
   /**
@@ -1497,6 +1497,16 @@ private:
    */
   std::size_t max_len;
 
+  /**
+   * Return the value of the <tt>index</tt>th entry in <tt>row</tt>. Here,
+   * <tt>index</tt> refers to the internal representation of the matrix, not
+   * the column. This is an internal function because it exposes the actual
+   * format in which data is stored -- be sure to understand what you are
+   * doing here.
+   */
+  number nth_entry_in_row (const unsigned int row,
+                          const unsigned int index) const;
+
   // make all other sparse matrices friends
   template <typename somenumber> friend class SparseMatrix;
   template <typename somenumber> friend class SparseLUDecomposition;
@@ -1506,6 +1516,13 @@ private:
    * To allow it calling private prepare_add() and prepare_set().
    */
   template <typename> friend class BlockMatrixBase;
+
+  /**
+   * Also give access to internal details to the iterator/accessor
+   * classes.
+   */
+  template <typename,bool> friend class SparseMatrixIterators::Iterator;
+  template <typename,bool> friend class SparseMatrixIterators::Accessor;
 };
 
 /**
@@ -1812,6 +1829,20 @@ inline
 number
 SparseMatrix<number>::raw_entry (const unsigned int row,
                                  const unsigned int index) const
+{
+  // this is the (deprecated) public version of the
+  // nth_entry_in_row() function. this function will soon
+  // go away.
+  return nth_entry_in_row (row, index);
+}
+
+
+
+template <typename number>
+inline
+number
+SparseMatrix<number>::nth_entry_in_row (const unsigned int row,
+                                       const unsigned int index) const
 {
   Assert(row<cols->rows, ExcIndexRange(row,0,cols->rows));
   Assert(index<cols->row_length(row),
@@ -1917,7 +1948,7 @@ namespace SparseMatrixIterators
   number
   Accessor<number, true>::value () const
   {
-    return matrix->raw_entry(a_row, a_index);
+    return matrix->nth_entry_in_row(a_row, a_index);
   }
 
 
@@ -1946,8 +1977,8 @@ namespace SparseMatrixIterators
   inline
   Accessor<number, false>::Reference::operator number() const
   {
-    return accessor->matrix->raw_entry(accessor->a_row,
-                                       accessor->a_index);
+    return accessor->matrix->nth_entry_in_row(accessor->a_row,
+                                             accessor->a_index);
   }
 
 
index 3e82b16e99ce8690137a4ba2d14a9872512b012a..f4ba0fbc2bb485941d35abdc0929d2dcbe8efd77 100644 (file)
@@ -85,7 +85,7 @@ public:
    * compability. It will be
    * removed in later versions.
    */
-  void reinit (const SparsityPattern &sparsity);
+  void reinit (const SparsityPattern &sparsity) DEAL_II_DEPRECATED;
 
   /**
    * Same as @p decompose.
@@ -102,7 +102,7 @@ public:
    */
   template <typename somenumber>
   void decompose (const SparseMatrix<somenumber> &matrix,
-                  const double                   strengthen_diagonal=0.);
+                  const double                   strengthen_diagonal=0.) DEAL_II_DEPRECATED;
 
   /**
    * Apply the incomplete decomposition,
index fe87da3f19aa9e2ca5ab68655ccd57e9bb229187..a31894c2c88491a9f5ce6960aa04457675eb35ac 100644 (file)
@@ -790,7 +790,13 @@ public:
    * complexity of this function is <i>log(m)</i> if the sparsity pattern is
    * compressed.
    *
-   * @deprecated Use SparseMatrix::const_iterator
+   * @note This function is not cheap since it has to search through all
+   * of the elements of the given row <tt>i</tt> to find whether index
+   * <tt>j</tt> exists. Thus, it is more expensive than necessary in cases
+   * where you want to loop over all of the nonzero elements of this
+   * sparsity pattern (or of a sparse matrix associated with it) or of a
+   * single row. In such cases, it is more efficient to use iterators over
+   * the elements of the sparsity pattern or of the sparse matrix.
    */
   unsigned int operator() (const unsigned int i,
                            const unsigned int j) const;
@@ -949,7 +955,7 @@ public:
    * done by calling @p GridTools::partition_triangulation.
    */
   void partition (const unsigned int         n_partitions,
-                  std::vector<unsigned int> &partition_indices) const;
+                  std::vector<unsigned int> &partition_indices) const DEAL_II_DEPRECATED;
 
 
   /**
index 47464dd98edccf05adf6592a667f6306e15c7c32..02db61b6254705d5adfa7dda0e1e5ba397e01c7f 100644 (file)
@@ -253,7 +253,7 @@ private:
    * we can as well get away
    * with it.
    */
-  Threads::ThreadMutex lock;
+  Threads::Mutex lock;
 
   /**
    * Flag by which the @p alert
index 92577e585a7a7f713b791e2f78757e9d134c4b7c..e8780cd9689712bc07dfc83ab2cc4d11f1ac868f 100644 (file)
@@ -66,7 +66,7 @@ SwappableVector<number>::operator= (const SwappableVector<number> &v)
   // if in MT mode, block all other
   // operations. if not in MT mode,
   // this is a no-op
-  Threads::ThreadMutex::ScopedLock lock(this->lock);
+  Threads::Mutex::ScopedLock lock(this->lock);
 
   Vector<number>::operator = (v);
   data_is_preloaded = false;
@@ -94,7 +94,7 @@ void SwappableVector<number>::swap_out (const std::string &name)
   // if in MT mode, block all other
   // operations. if not in MT mode,
   // this is a no-op
-  Threads::ThreadMutex::ScopedLock lock(this->lock);
+  Threads::Mutex::ScopedLock lock(this->lock);
 
   //  check that we have not called
   //  @p alert without the respective
@@ -206,7 +206,7 @@ void SwappableVector<number>::kill_file ()
   // (there should be none, but who
   // knows). if not in MT mode,
   // this is a no-op
-  Threads::ThreadMutex::ScopedLock lock(this->lock);
+  Threads::Mutex::ScopedLock lock(this->lock);
 
   // this is too bad: someone
   // requested the vector in advance,
index 8c898ed3bb126bae94b910e25b208fba0ecf46b3..2a6dd0f02bae38f2efefce71d147a66052a323b6 100644 (file)
@@ -195,7 +195,7 @@ namespace TrilinosWrappers
     * distributed objects" for more
     * information.
     */
-    void compress (const Epetra_CombineMode last_action);
+    void compress (const Epetra_CombineMode last_action) DEAL_II_DEPRECATED;
 
     /**
      * so it is not hidden
index 34b7bd28e32367d3f67e31cf76dc29c5454fe907..df5bb65a798bb82b545fae0e1d52996bae948cf9 100644 (file)
@@ -316,7 +316,7 @@ namespace TrilinosWrappers
        * distributed objects" for more
        * information.
        */
-      void compress (const Epetra_CombineMode last_action);
+      void compress (const Epetra_CombineMode last_action) DEAL_II_DEPRECATED;
 
       /**
        * so it is not hidden
index 6e386f86bf942ef87c5a796da97bbd33e6e32e68..234677f9fded90dde64b48e3e0a569168548d42c 100644 (file)
@@ -351,7 +351,7 @@ namespace TrilinosWrappers
     /**
     * @deprecated
     */
-    void compress (const Epetra_CombineMode last_action);
+    void compress (const Epetra_CombineMode last_action) DEAL_II_DEPRECATED;
 
     /**
      * Returns the state of the
index fccc27c794cfe825ed11499417187f3143e898ba..ca8980b1240e8a49f4c3e19b64ae2ad6118bd683 100644 (file)
@@ -800,7 +800,10 @@ public:
    * <tt>operator *=</tt> and
    * <tt>operator /=</tt> instead.
    */
-  void scale (const Number factor);
+  void scale (const Number factor) DEAL_II_DEPRECATED
+  {
+    this->operator *= (factor);
+  }
 
 
   /**
@@ -1265,19 +1268,6 @@ Number &Vector<Number>::operator[] (const unsigned int i)
 
 
 
-template <typename Number>
-inline
-Vector<Number> &Vector<Number>::operator *= (const Number factor)
-{
-
-  Assert (numbers::is_finite(factor),ExcNumberNotFinite());
-
-  scale (factor);
-  return *this;
-}
-
-
-
 template <typename Number>
 inline
 Vector<Number> &
index e7f981240d8226d3575837b37fb260491402cb32..ddd7128aa9bd3e009291c71c88d36e0aab509fdf 100644 (file)
@@ -430,8 +430,7 @@ Vector<std::complex<float> >::operator = (const std::complex<float> s)
 
 
 template <typename Number>
-void
-Vector<Number>::scale (const Number factor)
+Vector<Number> &Vector<Number>::operator *= (const Number factor)
 {
   Assert (numbers::is_finite(factor),ExcNumberNotFinite());
 
@@ -442,6 +441,8 @@ Vector<Number>::scale (const Number factor)
                        val,
                        (factor*boost::lambda::_1),
                        internal::Vector::minimum_parallel_grain_size);
+
+  return *this;
 }
 
 
index ec8926a42cf016d9fd279b27d6d100b98bf31f4c..a5f35ac422eb423489940d96824b69c4d759de52 100644 (file)
@@ -396,7 +396,7 @@ private:
    * internal data of this object
    * from multiple threads.
    */
-  static Threads::ThreadMutex mutex;
+  static Threads::Mutex mutex;
 };
 
 /*@}*/
index befb99f9987a9168c15231cf24aab289cc41b005..dcba1d20b70069ad1fe66e3196adff4f98e52ebc 100644 (file)
@@ -109,7 +109,7 @@ public:
   std::size_t memory_consumption () const;
 private:
   SmartPointer<MGLevelObject<MATRIX>,MGMatrix<MATRIX,VECTOR> > matrix;
-};
+} DEAL_II_DEPRECATED;
 
 
 /**
index 6f05959715795481767b7101e01be7d186cdf6c2..c3737cffd3a06b38e01cac33dd76d4b78381900c 100644 (file)
@@ -68,7 +68,7 @@ public:
              const unsigned int steps = 1,
              const bool variable = false,
              const bool symmetric = false,
-             const bool transpose = false);
+             const bool transpose = false) DEAL_II_DEPRECATED;
 
   /**
    * Modify the number of smoothing
index aca7bcfaa15d1552a561ed21db83f8804eebdb14..e2d05f0fd34275c86f229412c3df09b1caf720bc 100644 (file)
@@ -205,7 +205,7 @@ namespace MGTools
   void
   count_dofs_per_component (const DoFHandler<dim,spacedim> &mg_dof,
                             std::vector<std::vector<unsigned int> > &result,
-                            std::vector<unsigned int> target_component);
+                            std::vector<unsigned int> target_component) DEAL_II_DEPRECATED;
 
   /**
    * Generate a list of those
index 04692f7996d1819f21e29e55298f000cd8445502..4116300ad5c071abc52bf401585b9743376690ee 100644 (file)
@@ -176,7 +176,7 @@ public:
    * level of this Multigrid
    * object.
    */
-  void vmult(VECTOR &dst, const VECTOR &src) const;
+  void vmult(VECTOR &dst, const VECTOR &src) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated This function is
@@ -194,7 +194,7 @@ public:
    * level of this Multigrid
    * object.
    */
-  void vmult_add(VECTOR &dst, const VECTOR &src) const;
+  void vmult_add(VECTOR &dst, const VECTOR &src) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Even worse than
@@ -204,7 +204,7 @@ public:
    * objects relying on it can be
    * constructed.
    */
-  void Tvmult(VECTOR &dst, const VECTOR &src) const;
+  void Tvmult(VECTOR &dst, const VECTOR &src) const DEAL_II_DEPRECATED;
 
   /**
    * @deprecated Even worse than
@@ -214,7 +214,7 @@ public:
    * objects relying on it can be
    * constructed.
    */
-  void Tvmult_add(VECTOR &dst, const VECTOR &src) const;
+  void Tvmult_add(VECTOR &dst, const VECTOR &src) const DEAL_II_DEPRECATED;
 
   /**
    * Set additional matrices to
index 912b65fc7d58811d32ea66cc6501f0668b3e25fc..f8101e16343342f2952f2d92de4f8f5a409756a7 100644 (file)
@@ -124,7 +124,7 @@ public:
                                      const std::vector<Tensor<1,dim> > &duh,
                                      const std::vector<Tensor<2,dim> > &dduh,
                                      const std::vector<Point<dim> >    &normals,
-                                     std::vector<Vector<double> >      &computed_quantities) const;
+                                     std::vector<Vector<double> >      &computed_quantities) const DEAL_II_DEPRECATED;
 
   /**
    * This is the main function which actually
@@ -182,7 +182,7 @@ public:
                                      const std::vector<std::vector<Tensor<1,dim> > > &duh,
                                      const std::vector<std::vector<Tensor<2,dim> > > &dduh,
                                      const std::vector<Point<dim> >                  &normals,
-                                     std::vector<Vector<double> >                    &computed_quantities) const;
+                                     std::vector<Vector<double> >                    &computed_quantities) const DEAL_II_DEPRECATED;
 
   /**
    * Same as the
index a17ce5ae7002eeffabe93080a0413983a9522a5e..4bbba974eba335370505a8f7e60d60bc2caf1eea 100644 (file)
@@ -349,7 +349,7 @@ public:
                         const ComponentMask &component_mask = ComponentMask(),
                         const Function<spacedim>     *coefficients   = 0,
                         const unsigned int       n_threads = numbers::invalid_unsigned_int,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id       material_id = numbers::invalid_material_id);
 
   /**
@@ -366,7 +366,7 @@ public:
                         const ComponentMask &component_mask = ComponentMask(),
                         const Function<spacedim>     *coefficients   = 0,
                         const unsigned int       n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id       material_id = numbers::invalid_material_id);
 
   /**
@@ -406,7 +406,7 @@ public:
                         const ComponentMask     &component_mask = ComponentMask(),
                         const Function<spacedim>         *coefficients   = 0,
                         const unsigned int           n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id           material_id = numbers::invalid_material_id);
 
   /**
@@ -423,7 +423,7 @@ public:
                         const ComponentMask     &component_mask = ComponentMask(),
                         const Function<spacedim>         *coefficients   = 0,
                         const unsigned int           n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id          material_id = numbers::invalid_material_id);
 
 
@@ -443,7 +443,7 @@ public:
                         const ComponentMask &component_mask = ComponentMask(),
                         const Function<spacedim>     *coefficients   = 0,
                         const unsigned int       n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id       material_id = numbers::invalid_material_id);
 
 
@@ -462,7 +462,7 @@ public:
                         const ComponentMask &component_mask = ComponentMask(),
                         const Function<spacedim>     *coefficients   = 0,
                         const unsigned int       n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id       material_id = numbers::invalid_material_id);
 
 
@@ -482,7 +482,7 @@ public:
                         const ComponentMask     &component_mask = ComponentMask(),
                         const Function<spacedim>         *coefficients   = 0,
                         const unsigned int           n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id           material_id = numbers::invalid_material_id);
 
 
@@ -501,7 +501,7 @@ public:
                         const ComponentMask     &component_mask = ComponentMask(),
                         const Function<spacedim>    *coefficients   = 0,
                         const unsigned int           n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id           material_id = numbers::invalid_material_id);
 
 
@@ -612,7 +612,7 @@ public:
                         const ComponentMask &component_mask = ComponentMask(),
                         const Function<spacedim>     *coefficients   = 0,
                         const unsigned int       n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id       material_id = numbers::invalid_material_id);
 
   /**
@@ -629,7 +629,7 @@ public:
                         const ComponentMask &component_mask = ComponentMask(),
                         const Function<spacedim>     *coefficients   = 0,
                         const unsigned int       n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id       material_id = numbers::invalid_material_id);
 
   /**
@@ -669,7 +669,7 @@ public:
                         const ComponentMask     &component_mask = ComponentMask(),
                         const Function<spacedim>         *coefficients   = 0,
                         const unsigned int           n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id           material_id = numbers::invalid_material_id);
 
   /**
@@ -686,7 +686,7 @@ public:
                         const ComponentMask     &component_mask = ComponentMask(),
                         const Function<spacedim>         *coefficients   = 0,
                         const unsigned int           n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id           material_id = numbers::invalid_material_id);
 
 
@@ -706,7 +706,7 @@ public:
                         const ComponentMask &component_mask = ComponentMask(),
                         const Function<spacedim>     *coefficients   = 0,
                         const unsigned int       n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id       material_id = numbers::invalid_material_id);
 
 
@@ -725,7 +725,7 @@ public:
                         const ComponentMask &component_mask = ComponentMask(),
                         const Function<spacedim>     *coefficients   = 0,
                         const unsigned int       n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id       material_id = numbers::invalid_material_id);
 
 
@@ -745,7 +745,7 @@ public:
                         const ComponentMask     &component_mask = ComponentMask(),
                         const Function<spacedim>         *coefficients   = 0,
                         const unsigned int           n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id           material_id = numbers::invalid_material_id);
 
 
@@ -764,7 +764,7 @@ public:
                         const ComponentMask     &component_mask = ComponentMask(),
                         const Function<spacedim>         *coefficients   = 0,
                         const unsigned int           n_threads = multithread_info.n_default_threads,
-                        const types::subdomain_id subdomain_id = types::invalid_subdomain_id,
+                        const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id,
                         const types::material_id           material_id = numbers::invalid_material_id);
 
   /**
index b8178902e98bfd2270a71f2177dabd83396bdad4..0e7877caf16e8149fc1376131976881d0c5dfd3b 100644 (file)
@@ -554,7 +554,7 @@ public:
   *
   * @deprecated
    */
-  Vector<double> mark_locations();
+  Vector<double> mark_locations() DEAL_II_DEPRECATED;
 
 
   /**
index 1f2160480ad2eb9a3749cc0360b3d1427aea2edd..99cf1511f084fd230087263dba50adf8ee9618f2 100644 (file)
@@ -751,9 +751,6 @@ namespace VectorTools
                                const ComponentMask       &component_mask = ComponentMask());
 
   /**
-   * @deprecated This function exists mainly
-   * for backward compatibility.
-   *
    * Same function as above, but
    * taking only one pair of
    * boundary indicator and
@@ -893,9 +890,6 @@ namespace VectorTools
                                const ComponentMask       &component_mask = ComponentMask());
 
   /**
-   * @deprecated This function exists
-   * only for backward compatibility.
-   *
    * Same function as above, but taking
    * only one pair of boundary indicator
    * and corresponding boundary
index a96dfb3a24072e4ad9a769b6ff2ad5ac77d29d20..33c30e9dfa4346943159c810d287b6f334ed03df 100644 (file)
@@ -25,6 +25,7 @@
 #include <deal.II/lac/trilinos_vector.h>
 #include <deal.II/lac/trilinos_block_vector.h>
 #include <deal.II/lac/sparse_matrix.h>
+#include <deal.II/lac/compressed_sparsity_pattern.h>
 #include <deal.II/lac/compressed_simple_sparsity_pattern.h>
 #include <deal.II/lac/precondition.h>
 #include <deal.II/lac/solver_cg.h>
@@ -1688,7 +1689,7 @@ namespace VectorTools
               std::vector<Point<dim-1> > unit_support_points (fe.dofs_per_face);
 
               for (unsigned int i=0; i<fe.dofs_per_face; ++i)
-                if (fe.is_primitive (fe.face_to_equivalent_cell_index(i)))
+                if (fe.is_primitive (fe.face_to_cell_index(0,i)))
                   if (component_mask[fe.face_system_to_component_index(i).first]
                       == true)
                     unit_support_points[i] = fe.unit_face_support_point(i);
@@ -2140,17 +2141,20 @@ namespace VectorTools
     DoFTools::map_dof_to_boundary_indices (dof, selected_boundary_components,
                                            dof_to_boundary_mapping);
 
-    // Done if no degrees of freedom on
-    // the boundary
+    // Done if no degrees of freedom on the boundary
     if (dof.n_boundary_dofs (boundary_functions) == 0)
       return;
+
     // set up sparsity structure
-    SparsityPattern sparsity(dof.n_boundary_dofs (boundary_functions),
-                             dof.max_couplings_between_boundary_dofs());
+    CompressedSparsityPattern c_sparsity(dof.n_dofs());
     DoFTools::make_boundary_sparsity_pattern (dof,
                                               boundary_functions,
                                               dof_to_boundary_mapping,
-                                              sparsity);
+                                              c_sparsity);
+    SparsityPattern sparsity;
+    sparsity.copy_from(c_sparsity);
+
+
 
     // note: for three or more dimensions, there
     // may be constrained nodes on the boundary
index 09b8bfd80e036e26eb9a4bca667c6fcff9971c0b..cfa5c9f20a96fe0d5e93a110a0be457cfc664b39 100644 (file)
@@ -130,7 +130,7 @@ FunctionDerivative<dim>::vector_value (
       result.add(-8., aux);
       f.vector_value(p+incr[0], aux);
       result.add(8., aux);
-      result.scale(1./(12*h));
+      result/=(12.*h);
       return;
     default:
       Assert(false, ExcInvalidFormula());
index 8fb571cb3d0987ca5fd4b8b87565555a7d3d35dd..67852cb616da770751d39d8ee068e75322565e39 100644 (file)
@@ -35,8 +35,8 @@ DEAL_II_NAMESPACE_OPEN
 
 namespace
 {
-  Threads::ThreadMutex log_lock;
-  Threads::ThreadMutex write_lock;
+  Threads::Mutex log_lock;
+  Threads::Mutex write_lock;
 }
 
 
@@ -151,7 +151,7 @@ LogStream::~LogStream()
 void
 LogStream::test_mode(bool on)
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   if (on)
     {
       double_threshold = 1.e-10;
@@ -180,7 +180,7 @@ LogStream::operator<< (std::ostream& (*p) (std::ostream &))
   std::ostream & (* const p_endl) (std::ostream &) = &std::endl;
   if (p == p_endl)
     {
-      Threads::ThreadMutex::ScopedLock lock(write_lock);
+      Threads::Mutex::ScopedLock lock(write_lock);
       print_line_head();
       std::ostringstream &stream = get_stream();
       if (prefixes.size() <= std_depth)
@@ -200,7 +200,7 @@ std::ostringstream &
 LogStream::get_stream()
 {
 //TODO: use a ThreadLocalStorage object here
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   const unsigned int id = Threads::this_thread_id();
 
   // if necessary allocate a stream object
@@ -217,7 +217,7 @@ LogStream::get_stream()
 void
 LogStream::attach(std::ostream &o)
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   file = &o;
   o.setf(std::ios::showpoint | std::ios::left);
   o << dealjobid();
@@ -226,14 +226,14 @@ LogStream::attach(std::ostream &o)
 
 void LogStream::detach ()
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   file = 0;
 }
 
 
 void LogStream::log_cerr ()
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   if (old_cerr == 0)
     {
       old_cerr = std::cerr.rdbuf(file->rdbuf());
@@ -278,7 +278,7 @@ LogStream::get_prefix() const
 void
 LogStream::push (const std::string &text)
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   std::string pre=prefixes.top();
   pre += text;
   pre += std::string(":");
@@ -288,7 +288,7 @@ LogStream::push (const std::string &text)
 
 void LogStream::pop ()
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   if (prefixes.size() > 1)
     prefixes.pop();
 }
@@ -297,7 +297,7 @@ void LogStream::pop ()
 unsigned int
 LogStream::depth_console (const unsigned int n)
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   const unsigned int h = std_depth;
   std_depth = n;
   return h;
@@ -307,7 +307,7 @@ LogStream::depth_console (const unsigned int n)
 unsigned int
 LogStream::depth_file (const unsigned int n)
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   const unsigned int h = file_depth;
   file_depth = n;
   return h;
@@ -317,7 +317,7 @@ LogStream::depth_file (const unsigned int n)
 void
 LogStream::threshold_double (const double t)
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   double_threshold = t;
 }
 
@@ -325,7 +325,7 @@ LogStream::threshold_double (const double t)
 void
 LogStream::threshold_float (const float t)
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   float_threshold = t;
 }
 
@@ -333,7 +333,7 @@ LogStream::threshold_float (const float t)
 bool
 LogStream::log_execution_time (const bool flag)
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   const bool h = print_utime;
   print_utime = flag;
   return h;
@@ -343,7 +343,7 @@ LogStream::log_execution_time (const bool flag)
 bool
 LogStream::log_time_differences (const bool flag)
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   const bool h = diff_utime;
   diff_utime = flag;
   return h;
@@ -353,7 +353,7 @@ LogStream::log_time_differences (const bool flag)
 bool
 LogStream::log_thread_id (const bool flag)
 {
-  Threads::ThreadMutex::ScopedLock lock(log_lock);
+  Threads::Mutex::ScopedLock lock(log_lock);
   const bool h = print_thread_id;
   print_thread_id = flag;
   return h;
index 15917ddfb9858a393fb928d74e85aa66a9e7c22b..4ad632d34835a9a36f79e663c4ba834d3651496a 100644 (file)
@@ -392,7 +392,7 @@ namespace Utilities
 
       int MPI_has_been_started = 0;
       MPI_Initialized(&MPI_has_been_started);
-      if (Utilities::System::program_uses_mpi() == true && owns_mpi == true &&
+      if (Utilities::System::job_supports_mpi() == true && owns_mpi == true &&
           MPI_has_been_started != 0)
         {
           if (std::uncaught_exception())
index 7f1a627bcbe5495e870a7112c462f9d64d7d5320..0664ce5e2ac7c648211a2675fa76b188456bfbaf 100644 (file)
@@ -34,7 +34,7 @@ DEAL_II_NAMESPACE_OPEN
 // more fine-grained solution
 namespace
 {
-  Threads::ThreadMutex coefficients_lock;
+  Threads::Mutex coefficients_lock;
 }
 
 
@@ -888,7 +888,7 @@ namespace Polynomials
     // operation of this function;
     // for this, acquire the lock
     // until we quit this function
-    Threads::ThreadMutex::ScopedLock lock(coefficients_lock);
+    Threads::Mutex::ScopedLock lock(coefficients_lock);
 
     // The first 2 coefficients are hard-coded
     if (k==0)
@@ -1021,7 +1021,7 @@ namespace Polynomials
     // then get a pointer to the array
     // of coefficients. do that in a MT
     // safe way
-    Threads::ThreadMutex::ScopedLock lock (coefficients_lock);
+    Threads::Mutex::ScopedLock lock (coefficients_lock);
     return *shifted_coefficients[k];
   }
 
@@ -1153,7 +1153,7 @@ namespace Polynomials
     // of this function
     // for this, acquire the lock
     // until we quit this function
-    Threads::ThreadMutex::ScopedLock lock(coefficients_lock);
+    Threads::Mutex::ScopedLock lock(coefficients_lock);
 
     // The first 2 coefficients
     // are hard-coded
@@ -1288,7 +1288,7 @@ namespace Polynomials
     // then get a pointer to the array
     // of coefficients. do that in a MT
     // safe way
-    Threads::ThreadMutex::ScopedLock lock (coefficients_lock);
+    Threads::Mutex::ScopedLock lock (coefficients_lock);
     return *recursive_coefficients[k];
   }
 
index aa0ee7137f61d5d5fc76b06b7a29eae8a18a4c01..367b2443e16f9af05ac5cd414db5f3d4729e53c0 100644 (file)
@@ -78,8 +78,8 @@ PolynomialsRaviartThomas<dim>::compute (const Point<dim>            &unit_point,
   // deal.II/create_mass_matrix_05)
   // will start to produce random
   // results in multithread mode
-  static Threads::ThreadMutex mutex;
-  Threads::ThreadMutex::ScopedLock lock(mutex);
+  static Threads::Mutex mutex;
+  Threads::Mutex::ScopedLock lock(mutex);
 
   static std::vector<double> p_values;
   static std::vector<Tensor<1,dim> > p_grads;
index dad0b8aafb94b989c909e6f7dba74315b0f6ffd2..46c965b9c4c752d140936ec78dd4465b324cac79 100644 (file)
@@ -34,7 +34,7 @@ namespace
 // operates on a per-object base (in which case we would have to
 // include the huge <thread_management.h> file into the
 // <subscriptor.h> file).
-  Threads::ThreadMutex subscription_lock;
+  Threads::Mutex subscription_lock;
 }
 
 
@@ -144,7 +144,7 @@ void Subscriptor::do_subscribe (const char *id) const
 #ifdef DEBUG
   if (object_info == 0)
     object_info = &typeid(*this);
-  Threads::ThreadMutex::ScopedLock lock (subscription_lock);
+  Threads::Mutex::ScopedLock lock (subscription_lock);
   ++counter;
 
 #if DEAL_USE_MT == 0
@@ -171,7 +171,7 @@ void Subscriptor::do_unsubscribe (const char *id) const
   if (counter == 0)
     return;
 
-  Threads::ThreadMutex::ScopedLock lock (subscription_lock);
+  Threads::Mutex::ScopedLock lock (subscription_lock);
   --counter;
 
 #if DEAL_USE_MT == 0
index 7eb404cc31d957776f184dde72cfafaca8a558d4..f6bcb4ecb5a73da75e4e9dc4b06c1f2fd29ae298 100644 (file)
@@ -34,12 +34,12 @@ namespace Threads
     // counter and access mutex for the
     // number of threads
     volatile unsigned int n_existing_threads_counter = 1;
-    ThreadMutex  n_existing_threads_mutex;
+    Mutex  n_existing_threads_mutex;
 
 
     void register_thread ()
     {
-      ThreadMutex::ScopedLock lock (n_existing_threads_mutex);
+      Mutex::ScopedLock lock (n_existing_threads_mutex);
       ++n_existing_threads_counter;
     }
 
@@ -47,7 +47,7 @@ namespace Threads
 
     void deregister_thread ()
     {
-      ThreadMutex::ScopedLock lock (n_existing_threads_mutex);
+      Mutex::ScopedLock lock (n_existing_threads_mutex);
       --n_existing_threads_counter;
       Assert (n_existing_threads_counter >= 1,
               ExcInternalError());
@@ -127,7 +127,7 @@ namespace Threads
 
   unsigned int n_existing_threads ()
   {
-    ThreadMutex::ScopedLock lock (internal::n_existing_threads_mutex);
+    Mutex::ScopedLock lock (internal::n_existing_threads_mutex);
     return internal::n_existing_threads_counter;
   }
 
index e7bfbdb8f2d8a4eb27ab33449ed03d7826df6592..f8c0df85cfb41999bc961c89455609c175d10774 100644 (file)
@@ -336,7 +336,7 @@ TimerOutput::~TimerOutput()
 void
 TimerOutput::enter_subsection (const std::string &section_name)
 {
-  Threads::ThreadMutex::ScopedLock lock (mutex);
+  Threads::Mutex::ScopedLock lock (mutex);
 
   Assert (section_name.empty() == false,
           ExcMessage ("Section string is empty."));
@@ -368,7 +368,7 @@ TimerOutput::leave_subsection (const std::string &section_name)
   Assert (!active_sections.empty(),
           ExcMessage("Cannot exit any section because none has been entered!"));
 
-  Threads::ThreadMutex::ScopedLock lock (mutex);
+  Threads::Mutex::ScopedLock lock (mutex);
 
   if (section_name != "")
     {
index 3b0f832fc88945535756035dd659ad7856983b56..b96b284b278009ecdcc973aa9d75a44d8d0fd894 100644 (file)
@@ -553,13 +553,6 @@ namespace Utilities
 
     bool job_supports_mpi ()
     {
-      return program_uses_mpi();
-    }
-
-
-    bool
-    program_uses_mpi ()
-    {
 #ifdef DEAL_II_COMPILER_SUPPORTS_MPI
       int MPI_has_been_started = 0;
       MPI_Initialized(&MPI_has_been_started);
@@ -571,6 +564,13 @@ namespace Utilities
     }
 
 
+    bool
+    program_uses_mpi ()
+    {
+      return job_supports_mpi();
+    }
+
+
     unsigned int get_n_mpi_processes (const MPI_Comm &mpi_communicator)
     {
       return MPI::n_mpi_processes (mpi_communicator);
index 8419530180e75b7806b48e18138fe6e06702d8cd..33405c73c6bcbbdca690230d5415933ce10305d6 100644 (file)
@@ -1133,7 +1133,7 @@ namespace
                   // not local.
                   delete_all_children<dim,spacedim> (dealii_cell->child(c));
                   dealii_cell->child(c)
-                  ->recursively_set_subdomain_id(types::artificial_subdomain_id);
+                  ->recursively_set_subdomain_id(numbers::artificial_subdomain_id);
                 }
               else
                 {
@@ -2066,7 +2066,7 @@ namespace parallel
         {
           std::string fname=std::string(filename)+".info";
           std::ofstream f(fname.c_str());
-          f << Utilities::System::get_n_mpi_processes (mpi_communicator) << " "
+          f << Utilities::MPI::n_mpi_processes (mpi_communicator) << " "
             << real_data_size << " "
             << attached_data_pack_callbacks.size() << std::endl;
         }
@@ -2108,7 +2108,7 @@ namespace parallel
         std::string fname=std::string(filename)+".info";
         std::ifstream f(fname.c_str());
         f >> numcpus >> attached_size >> attached_count;
-        if (numcpus != Utilities::System::get_n_mpi_processes (mpi_communicator))
+        if (numcpus != Utilities::MPI::n_mpi_processes (mpi_communicator))
           throw ExcInternalError();
       }
 
@@ -2552,7 +2552,7 @@ namespace parallel
            cell = this->begin(0);
            cell != this->end(0);
            ++cell)
-        cell->recursively_set_subdomain_id(types::artificial_subdomain_id);
+        cell->recursively_set_subdomain_id(numbers::artificial_subdomain_id);
 
       do
         {
@@ -2574,7 +2574,7 @@ namespace parallel
                   == false)
                 {
                   delete_all_children<dim,spacedim> (cell);
-                  cell->set_subdomain_id (types::artificial_subdomain_id);
+                  cell->set_subdomain_id (numbers::artificial_subdomain_id);
                 }
 
               else
@@ -2681,7 +2681,7 @@ namespace parallel
         {
           if (cell->subdomain_id() != my_subdomain
               &&
-              cell->subdomain_id() != types::artificial_subdomain_id)
+              cell->subdomain_id() != numbers::artificial_subdomain_id)
             ++num_ghosts;
         }
 
index f6bd0c8242b1c2d5595cb7b4c8e5bfd7e5aa5076..475b14699d209c0277781e831d67aa4a8c0019e8 100644 (file)
@@ -215,7 +215,7 @@ namespace internal
         /**
          * Distribute degrees of freedom on all cells, or on cells with the
          * correct subdomain_id if the corresponding argument is not equal to
-         * types::invalid_subdomain_id. Return the total number of dofs
+         * numbers::invalid_subdomain_id. Return the total number of dofs
          * returned.
          */
         template <int dim, int spacedim>
@@ -243,7 +243,7 @@ namespace internal
           endc = dof_handler.end();
 
           for (; cell != endc; ++cell)
-            if ((subdomain_id == types::invalid_subdomain_id)
+            if ((subdomain_id == numbers::invalid_subdomain_id)
                 ||
                 (cell->subdomain_id() == subdomain_id))
               next_free_dof
@@ -254,7 +254,7 @@ namespace internal
           // update the cache used for cell dof indices
           for (typename DoFHandler<dim,spacedim>::level_cell_iterator
                cell = dof_handler.begin(); cell != dof_handler.end(); ++cell)
-            if (cell->subdomain_id() != types::artificial_subdomain_id)
+            if (cell->subdomain_id() != numbers::artificial_subdomain_id)
               cell->update_cell_dof_indices_cache ();
 
           // finally restore the user flags
@@ -871,7 +871,7 @@ namespace internal
       {
         const unsigned int n_dofs =
           Implementation::distribute_dofs (0,
-                                           types::invalid_subdomain_id,
+                                           numbers::invalid_subdomain_id,
                                            dof_handler);
 
         // now set the elements of the
@@ -2570,8 +2570,7 @@ namespace internal
           // * Create global_dof_indexsets by
           // transferring our own owned_dofs to
           // every other machine.
-          const unsigned int n_cpus = Utilities::System::
-                                      get_n_mpi_processes (tr->get_communicator());
+          const unsigned int n_cpus = Utilities::MPI::n_mpi_processes (tr->get_communicator());
 
           // Serialize our IndexSet and
           // determine size.
index a5bcc642583c3bc0a9c10aba4b332d4ff9f07fce..6165c9ed588532cc63b4d8a92db280b01a290ab0 100644 (file)
@@ -72,9 +72,9 @@ namespace DoFTools
     // subdomain. Not setting a subdomain is also okay, because we skip
     // ghost cells in the loop below.
     Assert (
-      (dof.get_tria().locally_owned_subdomain() == types::invalid_subdomain_id)
+      (dof.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id)
       ||
-      (subdomain_id == types::invalid_subdomain_id)
+      (subdomain_id == numbers::invalid_subdomain_id)
       ||
       (subdomain_id == dof.get_tria().locally_owned_subdomain()),
       ExcMessage ("For parallel::distributed::Triangulation objects and "
@@ -90,7 +90,7 @@ namespace DoFTools
     // type, we only have to do the work if the current cell is owned by
     // the calling processor. Otherwise, just continue.
     for (; cell!=endc; ++cell)
-      if (((subdomain_id == types::invalid_subdomain_id)
+      if (((subdomain_id == numbers::invalid_subdomain_id)
            ||
            (subdomain_id == cell->subdomain_id()))
           &&
@@ -135,9 +135,9 @@ namespace DoFTools
     // subdomain. Not setting a subdomain is also okay, because we skip
     // ghost cells in the loop below.
     Assert (
-      (dof.get_tria().locally_owned_subdomain() == types::invalid_subdomain_id)
+      (dof.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id)
       ||
-      (subdomain_id == types::invalid_subdomain_id)
+      (subdomain_id == numbers::invalid_subdomain_id)
       ||
       (subdomain_id == dof.get_tria().locally_owned_subdomain()),
       ExcMessage ("For parallel::distributed::Triangulation objects and "
@@ -200,7 +200,7 @@ namespace DoFTools
     // type, we only have to do the work if the current cell is owned by
     // the calling processor. Otherwise, just continue.
     for (; cell!=endc; ++cell)
-      if (((subdomain_id == types::invalid_subdomain_id)
+      if (((subdomain_id == numbers::invalid_subdomain_id)
            ||
            (subdomain_id == cell->subdomain_id()))
           &&
@@ -502,9 +502,9 @@ namespace DoFTools
     // subdomain. Not setting a subdomain is also okay, because we skip
     // ghost cells in the loop below.
     Assert (
-      (dof.get_tria().locally_owned_subdomain() == types::invalid_subdomain_id)
+      (dof.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id)
       ||
-      (subdomain_id == types::invalid_subdomain_id)
+      (subdomain_id == numbers::invalid_subdomain_id)
       ||
       (subdomain_id == dof.get_tria().locally_owned_subdomain()),
       ExcMessage ("For parallel::distributed::Triangulation objects and "
@@ -527,7 +527,7 @@ namespace DoFTools
     // type, we only have to do the work if the current cell is owned by
     // the calling processor. Otherwise, just continue.
     for (; cell!=endc; ++cell)
-      if (((subdomain_id == types::invalid_subdomain_id)
+      if (((subdomain_id == numbers::invalid_subdomain_id)
            ||
            (subdomain_id == cell->subdomain_id()))
           &&
@@ -4139,7 +4139,7 @@ namespace DoFTools
 
     // preset all values by an invalid value
     std::fill_n (subdomain_association.begin(), dof_handler.n_dofs(),
-                 types::invalid_subdomain_id);
+                 numbers::invalid_subdomain_id);
 
     std::vector<unsigned int> local_dof_indices;
     local_dof_indices.reserve (max_dofs_per_cell(dof_handler));
@@ -4182,7 +4182,7 @@ namespace DoFTools
 
     Assert (std::find (subdomain_association.begin(),
                        subdomain_association.end(),
-                       types::invalid_subdomain_id)
+                       numbers::invalid_subdomain_id)
             == subdomain_association.end(),
             ExcInternalError());
   }
@@ -4213,7 +4213,7 @@ namespace DoFTools
     // If we have a distributed::Triangulation only allow locally_owned
     // subdomain.
     Assert (
-      (dof_handler.get_tria().locally_owned_subdomain() == types::invalid_subdomain_id)
+      (dof_handler.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id)
       ||
       (subdomain == dof_handler.get_tria().locally_owned_subdomain()),
       ExcMessage ("For parallel::distributed::Triangulation objects and "
@@ -4719,8 +4719,8 @@ namespace DoFTools
                   // since it should happen rather rarely that there are
                   // several threads operating on different intergrid
                   // weights, have only one mutex for all of them
-                  static Threads::ThreadMutex mutex;
-                  Threads::ThreadMutex::ScopedLock lock (mutex);
+                  static Threads::Mutex mutex;
+                  Threads::Mutex::ScopedLock lock (mutex);
                   for (unsigned int i=0; i<global_parameter_representation.size(); ++i)
                     // set this weight if it belongs to a parameter dof.
                     if (weight_mapping[i] != -1)
index 931cadf6607403369382ea3762562e1033418266..a6c044a8ab7413e54c49278ad8203a16a36afda2 100644 (file)
@@ -175,7 +175,7 @@ namespace
   // linking libraries for more than
   // one space dimension together
   static
-  Threads::ThreadMutex fe_name_map_lock;
+  Threads::Mutex fe_name_map_lock;
 
   // This is the map used by
   // FETools::get_fe_from_name and
@@ -1354,7 +1354,7 @@ namespace FETools
     for (; cell1!=endc1; ++cell1, ++cell2)
       if ((cell1->subdomain_id() == subdomain_id)
           ||
-          (subdomain_id == types::invalid_subdomain_id))
+          (subdomain_id == numbers::invalid_subdomain_id))
         {
           Assert(cell1->get_fe().n_components() == cell2->get_fe().n_components(),
                  ExcDimensionMismatch (cell1->get_fe().n_components(),
@@ -1508,7 +1508,7 @@ namespace FETools
     for (; cell!=endc; ++cell)
       if ((cell->subdomain_id() == subdomain_id)
           ||
-          (subdomain_id == types::invalid_subdomain_id))
+          (subdomain_id == numbers::invalid_subdomain_id))
         {
           if (hanging_nodes_not_allowed)
             for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
@@ -1581,7 +1581,7 @@ namespace FETools
     for (; cell!=endc; ++cell)
       if ((cell->subdomain_id() == subdomain_id)
           ||
-          (subdomain_id == types::invalid_subdomain_id))
+          (subdomain_id == numbers::invalid_subdomain_id))
         {
           Assert(cell->get_fe().n_components() == fe2.n_components(),
                  ExcDimensionMismatch(cell->get_fe().n_components(),
@@ -1755,7 +1755,7 @@ namespace FETools
     for (; cell!=endc; ++cell)
       if ((cell->subdomain_id() == subdomain_id)
           ||
-          (subdomain_id == types::invalid_subdomain_id))
+          (subdomain_id == numbers::invalid_subdomain_id))
         {
           if (hanging_nodes_not_allowed)
             for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
@@ -1951,7 +1951,7 @@ namespace FETools
     // operation of this function;
     // for this, acquire the lock
     // until we quit this function
-    Threads::ThreadMutex::ScopedLock lock(fe_name_map_lock);
+    Threads::Mutex::ScopedLock lock(fe_name_map_lock);
 
     Assert(fe_name_map_1d.find(name) == fe_name_map_1d.end(),
            ExcMessage("Cannot change existing element in finite element name list"));
@@ -1981,7 +1981,7 @@ namespace FETools
     // operation of this function;
     // for this, acquire the lock
     // until we quit this function
-    Threads::ThreadMutex::ScopedLock lock(fe_name_map_lock);
+    Threads::Mutex::ScopedLock lock(fe_name_map_lock);
 
     Assert(fe_name_map_2d.find(name) == fe_name_map_2d.end(),
            ExcMessage("Cannot change existing element in finite element name list"));
@@ -2010,7 +2010,7 @@ namespace FETools
     // operation of this function;
     // for this, acquire the lock
     // until we quit this function
-    Threads::ThreadMutex::ScopedLock lock(fe_name_map_lock);
+    Threads::Mutex::ScopedLock lock(fe_name_map_lock);
 
     Assert(fe_name_map_3d.find(name) == fe_name_map_3d.end(),
            ExcMessage("Cannot change existing element in finite element name list"));
@@ -2200,7 +2200,7 @@ namespace FETools
           {
             // Make sure no other thread
             // is just adding an element
-            Threads::ThreadMutex::ScopedLock lock (fe_name_map_lock);
+            Threads::Mutex::ScopedLock lock (fe_name_map_lock);
 
             AssertThrow (fe_name_map.find(name_part) != fe_name_map.end(),
                          ExcInvalidFEName(name));
index 2cf6197caa6fc9281f1e7b2158283c581686535a..a294849a02a44a6046c74ea0cae86002004d8342 100644 (file)
@@ -158,7 +158,7 @@ compute_mapping_support_points
   // fe_values variable isn't used
   // simulatenously from different
   // threads
-  Threads::ThreadMutex::ScopedLock lock(fe_values_mutex);
+  Threads::Mutex::ScopedLock lock(fe_values_mutex);
   fe_values.reinit(dof_cell);
   fe_values.get_function_values(*euler_vector, shift_vector);
 
index a2b6d02c6386bb0e0e88620bb8b079a4eb486b7e..b976ca453a436c0f1ae931ba97feeb15dd5a8810 100644 (file)
@@ -20,6 +20,7 @@
 #include <deal.II/lac/precondition.h>
 #include <deal.II/lac/solver_cg.h>
 #include <deal.II/lac/sparse_matrix.h>
+#include <deal.II/lac/compressed_sparsity_pattern.h>
 #include <deal.II/lac/constraint_matrix.h>
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/grid_reordering.h>
@@ -3196,9 +3197,14 @@ void GridGenerator::laplace_transformation (Triangulation<dim> &tria,
 
   DoFHandler<dim> dof_handler(tria);
   dof_handler.distribute_dofs(q1);
-  SparsityPattern sparsity_pattern (dof_handler.n_dofs (), dof_handler.n_dofs (),
-                                    dof_handler.max_couplings_between_dofs());
-  DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern);
+
+  CompressedSparsityPattern c_sparsity_pattern (dof_handler.n_dofs (),
+                                       dof_handler.n_dofs ());
+  DoFTools::make_sparsity_pattern (dof_handler, c_sparsity_pattern);
+  c_sparsity_pattern.compress ();
+
+  SparsityPattern sparsity_pattern;
+  sparsity_pattern.copy_from (c_sparsity_pattern);
   sparsity_pattern.compress ();
 
   SparseMatrix<double> S(sparsity_pattern);
index 6b0834b82b16cd9932af02f705923e177f4e7853..876a36e15e8fb67de2ab96f131b306121b833f3e 100644 (file)
@@ -12046,7 +12046,7 @@ template <int dim, int spacedim>
 types::subdomain_id
 Triangulation<dim,spacedim>::locally_owned_subdomain () const
 {
-  return types::invalid_subdomain_id;
+  return numbers::invalid_subdomain_id;
 }
 
 
index 64de72813fbe5a3f9f5f68f67743b220e0fdc524..0661e0369605779a4351f5700f60d04dd7bac827 100644 (file)
@@ -1348,7 +1348,7 @@ CellAccessor<dim, spacedim>::set_subdomain_id (const types::subdomain_id new_sub
 
 
 template <int dim, int spacedim>
-types::subdomain_id_t CellAccessor<dim, spacedim>::level_subdomain_id () const
+types::subdomain_id CellAccessor<dim, spacedim>::level_subdomain_id () const
 {
   Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
   return this->tria->levels[this->present_level]->level_subdomain_ids[this->present_index];
@@ -1358,7 +1358,7 @@ types::subdomain_id_t CellAccessor<dim, spacedim>::level_subdomain_id () const
 
 template <int dim, int spacedim>
 void
-CellAccessor<dim, spacedim>::set_level_subdomain_id (const types::subdomain_id_t new_level_subdomain_id) const
+CellAccessor<dim, spacedim>::set_level_subdomain_id (const types::subdomain_id new_level_subdomain_id) const
 {
   Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
   this->tria->levels[this->present_level]->level_subdomain_ids[this->present_index]
index ae8a5a3a80b87aa31cd2dc79c4f18c1ba8bf7838..3e1cb14ed04d1ad48b80849fe455e0f76c794409 100644 (file)
@@ -385,12 +385,12 @@ BlockTrianglePrecondition<number>::do_row (
           // First, divide by the current
           // factor, such that we can
           // multiply by it later.
-          aux.scale(1./m->prefix);
+          aux /= m->prefix;
           if (m->transpose)
             m->matrix->Tvmult_add(aux, dst.block(row_num));
           else
             m->matrix->vmult_add(aux, dst.block(row_num));
-          aux.scale(m->prefix);
+          aux *= m->prefix;
         }
       dst.block(row_num) = aux;
     }
index 2cbcc23c671d07d15c77cfd043d404d27cb7a0a8..5582ef2b5a83c2e4b062c781f954e7b44ce0e90b 100644 (file)
@@ -112,7 +112,7 @@ LAPACKFullMatrix<number>::vmult (
       AssertDimension(v.size(), this->n_cols());
       AssertDimension(w.size(), this->n_rows());
 
-      gemv("N", &mm, &nn, &alpha, this->data(), &mm, v.val, &one, &beta, w.val, &one);
+      gemv("N", &mm, &nn, &alpha, &this->values[0], &mm, v.val, &one, &beta, w.val, &one);
       break;
     }
     case svd:
@@ -121,12 +121,12 @@ LAPACKFullMatrix<number>::vmult (
       AssertDimension(w.size(), this->n_rows());
       // Compute V^T v
       work.resize(std::max(mm,nn));
-      gemv("N", &nn, &nn, &alpha, svd_vt->data(), &nn, v.val, &one, &null, &work[0], &one);
+      gemv("N", &nn, &nn, &alpha, &svd_vt->values[0], &nn, v.val, &one, &null, &work[0], &one);
       // Multiply by singular values
       for (unsigned int i=0; i<wr.size(); ++i)
         work[i] *= wr[i];
       // Multiply with U
-      gemv("N", &mm, &mm, &alpha, svd_u->data(), &mm, &work[0], &one, &beta, w.val, &one);
+      gemv("N", &mm, &mm, &alpha, &svd_u->values[0], &mm, &work[0], &one, &beta, w.val, &one);
       break;
     }
     case inverse_svd:
@@ -135,12 +135,12 @@ LAPACKFullMatrix<number>::vmult (
       AssertDimension(v.size(), this->n_rows());
       // Compute U^T v
       work.resize(std::max(mm,nn));
-      gemv("T", &mm, &mm, &alpha, svd_u->data(), &mm, v.val, &one, &null, &work[0], &one);
+      gemv("T", &mm, &mm, &alpha, &svd_u->values[0], &mm, v.val, &one, &null, &work[0], &one);
       // Multiply by singular values
       for (unsigned int i=0; i<wr.size(); ++i)
         work[i] *= wr[i];
       // Multiply with V
-      gemv("T", &nn, &nn, &alpha, svd_vt->data(), &nn, &work[0], &one, &beta, w.val, &one);
+      gemv("T", &nn, &nn, &alpha, &svd_vt->values[0], &nn, &work[0], &one, &beta, w.val, &one);
       break;
     }
     default:
@@ -170,7 +170,7 @@ LAPACKFullMatrix<number>::Tvmult (
       AssertDimension(w.size(), this->n_cols());
       AssertDimension(v.size(), this->n_rows());
 
-      gemv("T", &mm, &nn, &alpha, this->data(), &mm, v.val, &one, &beta, w.val, &one);
+      gemv("T", &mm, &nn, &alpha, &this->values[0], &mm, v.val, &one, &beta, w.val, &one);
       break;
     }
     case svd:
@@ -180,12 +180,12 @@ LAPACKFullMatrix<number>::Tvmult (
 
       // Compute U^T v
       work.resize(std::max(mm,nn));
-      gemv("T", &mm, &mm, &alpha, svd_u->data(), &mm, v.val, &one, &null, &work[0], &one);
+      gemv("T", &mm, &mm, &alpha, &svd_u->values[0], &mm, v.val, &one, &null, &work[0], &one);
       // Multiply by singular values
       for (unsigned int i=0; i<wr.size(); ++i)
         work[i] *= wr[i];
       // Multiply with V
-      gemv("T", &nn, &nn, &alpha, svd_vt->data(), &nn, &work[0], &one, &beta, w.val, &one);
+      gemv("T", &nn, &nn, &alpha, &svd_vt->values[0], &nn, &work[0], &one, &beta, w.val, &one);
       break;
       case inverse_svd:
       {
@@ -194,12 +194,12 @@ LAPACKFullMatrix<number>::Tvmult (
 
         // Compute V^T v
         work.resize(std::max(mm,nn));
-        gemv("N", &nn, &nn, &alpha, svd_vt->data(), &nn, v.val, &one, &null, &work[0], &one);
+        gemv("N", &nn, &nn, &alpha, &svd_vt->values[0], &nn, v.val, &one, &null, &work[0], &one);
         // Multiply by singular values
         for (unsigned int i=0; i<wr.size(); ++i)
           work[i] *= wr[i];
         // Multiply with U
-        gemv("N", &mm, &mm, &alpha, svd_u->data(), &mm, &work[0], &one, &beta, w.val, &one);
+        gemv("N", &mm, &mm, &alpha, &svd_u->values[0], &mm, &work[0], &one, &beta, w.val, &one);
         break;
       }
     }
@@ -216,7 +216,7 @@ LAPACKFullMatrix<number>::compute_lu_factorization()
   Assert(state == matrix, ExcState(state));
   const int mm = this->n_rows();
   const int nn = this->n_cols();
-  number *values = const_cast<number *> (this->data());
+  number *values = const_cast<number *> (&this->values[0]);
   ipiv.resize(mm);
   int info = 0;
   getrf(&mm, &nn, values, &mm, &ipiv[0], &info);
@@ -237,15 +237,15 @@ LAPACKFullMatrix<number>::compute_svd()
 
   const int mm = this->n_rows();
   const int nn = this->n_cols();
-  number *values = const_cast<number *> (this->data());
+  number *values = const_cast<number *> (&this->values[0]);
   wr.resize(std::max(mm,nn));
   std::fill(wr.begin(), wr.end(), 0.);
   ipiv.resize(8*mm);
 
   svd_u.reset (new LAPACKFullMatrix<number>(mm,mm));
   svd_vt.reset (new LAPACKFullMatrix<number>(nn,nn));
-  number *mu  = const_cast<number *> (svd_u->data());
-  number *mvt = const_cast<number *> (svd_vt->data());
+  number *mu  = const_cast<number *> (&svd_u->values[0]);
+  number *mvt = const_cast<number *> (&svd_vt->values[0]);
   int info = 0;
 
   // see comment on this #if
@@ -311,7 +311,7 @@ LAPACKFullMatrix<number>::invert()
   const int nn = this->n_cols();
   Assert (nn == mm, ExcNotQuadratic());
 
-  number *values = const_cast<number *> (this->data());
+  number *values = const_cast<number *> (&this->values[0]);
   ipiv.resize(mm);
   int info = 0;
 
@@ -344,7 +344,7 @@ LAPACKFullMatrix<number>::apply_lu_factorization(Vector<number> &v,
 
   const char *trans = transposed ? &T : &N;
   const int nn = this->n_cols();
-  const number *values = this->data();
+  const number *values = &this->values[0];
   int info = 0;
 
   getrs(trans, &nn, &one, values, &nn, &ipiv[0],
@@ -367,7 +367,7 @@ LAPACKFullMatrix<number>::compute_eigenvalues(
   if (right) vr.resize(nn*nn);
   if (left)  vl.resize(nn*nn);
 
-  number *values = const_cast<number *> (this->data());
+  number *values = const_cast<number *> (&this->values[0]);
 
   int info  = 0;
   int lwork = 1;
@@ -450,8 +450,8 @@ LAPACKFullMatrix<number>::compute_eigenvalues_symmetric(
   wr.resize(nn);
   LAPACKFullMatrix<number> matrix_eigenvectors(nn, nn);
 
-  number *values_A = const_cast<number *> (this->data());
-  number *values_eigenvectors = const_cast<number *> (matrix_eigenvectors.data());
+  number *values_A = const_cast<number *> (&this->values[0]);
+  number *values_eigenvectors = const_cast<number *> (&matrix_eigenvectors.values[0]);
 
   int info(0),
       lwork(1),
@@ -562,9 +562,9 @@ LAPACKFullMatrix<number>::compute_generalized_eigenvalues_symmetric(
   wr.resize(nn);
   LAPACKFullMatrix<number> matrix_eigenvectors(nn, nn);
 
-  number *values_A = const_cast<number *> (this->data());
-  number *values_B = const_cast<number *> (B.data());
-  number *values_eigenvectors = const_cast<number *> (matrix_eigenvectors.data());
+  number *values_A = const_cast<number *> (&this->values[0]);
+  number *values_B = const_cast<number *> (&B.values[0]);
+  number *values_eigenvectors = const_cast<number *> (&matrix_eigenvectors.values[0]);
 
   int info(0),
       lwork(1),
@@ -672,8 +672,8 @@ LAPACKFullMatrix<number>::compute_generalized_eigenvalues_symmetric (
   wi.resize(nn); //This is set purley for consistency reasons with the
   //eigenvalues() function.
 
-  number *values_A = const_cast<number *> (this->data());
-  number *values_B = const_cast<number *> (B.data());
+  number *values_A = const_cast<number *> (&this->values[0]);
+  number *values_B = const_cast<number *> (&B.values[0]);
 
   int info  = 0;
   int lwork = 1;
index 200a2d09def86233c7b8bcf4118d42ed7bfba9d6..9a7cf69508e3ecf84e0e7453a3f1d299d3125129 100644 (file)
@@ -254,7 +254,7 @@ namespace
 
 /* -------------------------- MA27 ---------------------------- */
 
-Threads::ThreadMutex SparseDirectMA27::static_synchronisation_lock;
+Threads::Mutex SparseDirectMA27::static_synchronisation_lock;
 
 
 struct SparseDirectMA27::DetachedModeData
@@ -264,7 +264,7 @@ struct SparseDirectMA27::DetachedModeData
    * thread is currently talking
    * through the pipe.
    */
-  Threads::ThreadMutex mutex;
+  Threads::Mutex mutex;
 
   /**
    * File handles for the pipe
@@ -387,7 +387,7 @@ SparseDirectMA27::~SparseDirectMA27()
     if (detached_mode_data != 0)
       {
         // close down client
-        Threads::ThreadMutex::ScopedLock lock (detached_mode_data->mutex);
+        Threads::Mutex::ScopedLock lock (detached_mode_data->mutex);
         // Assign the result of write
         // and reset the variable to
         // avoid compiler warnings
@@ -850,7 +850,7 @@ SparseDirectMA27::memory_consumption () const
 
 
 
-Threads::ThreadMutex &
+Threads::Mutex &
 SparseDirectMA27::get_synchronisation_lock () const
 {
   if (detached_mode)
@@ -928,7 +928,7 @@ void SparseDirectMA27::call_ma27ad (const unsigned int *N,
                         IKEEP, IW1, NSTEPS, IFLAG);
   else
     {
-      Threads::ThreadMutex::ScopedLock lock (detached_mode_data->mutex);
+      Threads::Mutex::ScopedLock lock (detached_mode_data->mutex);
       // first write the data we have
       // to push over, i.e. first
       // function index, then array
@@ -978,7 +978,7 @@ void SparseDirectMA27::call_ma27bd (const unsigned int *N,
       // basically, everything is
       // already over the line,
       // except for A and LA
-      Threads::ThreadMutex::ScopedLock lock (detached_mode_data->mutex);
+      Threads::Mutex::ScopedLock lock (detached_mode_data->mutex);
       detached_mode_data->put ("2", 1, "ACTION 2");
 
       detached_mode_data->put (LA, 1, "LA");
@@ -1026,7 +1026,7 @@ void SparseDirectMA27::call_ma27x1 (unsigned int *NRLNEC)
     HSL::MA27::ma27x1_ (NRLNEC);
   else
     {
-      Threads::ThreadMutex::ScopedLock lock (detached_mode_data->mutex);
+      Threads::Mutex::ScopedLock lock (detached_mode_data->mutex);
       // ma27x1 only reads data, so
       // don't send anything except
       // for the id
@@ -1043,7 +1043,7 @@ void SparseDirectMA27::call_ma27x2 (unsigned int *NIRNEC)
     HSL::MA27::ma27x2_ (NIRNEC);
   else
     {
-      Threads::ThreadMutex::ScopedLock lock (detached_mode_data->mutex);
+      Threads::Mutex::ScopedLock lock (detached_mode_data->mutex);
       // ma27x2 only reads data, so
       // don't send anything except
       // for the id
@@ -1060,7 +1060,7 @@ void SparseDirectMA27::call_ma27x3 (const unsigned int *LP)
     HSL::MA27::ma27x3_ (LP);
   else
     {
-      Threads::ThreadMutex::ScopedLock lock (detached_mode_data->mutex);
+      Threads::Mutex::ScopedLock lock (detached_mode_data->mutex);
       // ma27x2 only reads data, so
       // don't send anything except
       // for the id
@@ -1075,7 +1075,7 @@ void SparseDirectMA27::call_ma27x3 (const unsigned int *LP)
 
 /* -------------------------- MA47 ---------------------------- */
 
-Threads::ThreadMutex SparseDirectMA47::synchronisation_lock;
+Threads::Mutex SparseDirectMA47::synchronisation_lock;
 
 
 SparseDirectMA47::SparseDirectMA47 (const double LIW_factor_1,
@@ -1373,7 +1373,7 @@ SparseDirectMA47::memory_consumption () const
 
 
 
-Threads::ThreadMutex &
+Threads::Mutex &
 SparseDirectMA47::get_synchronisation_lock () const
 {
   return synchronisation_lock;
index b5019968f42e2833e57e0596e0edd5c674dc2d6b..2e138a26440389b84adb79969151ffcb020eb247 100644 (file)
@@ -31,7 +31,7 @@ template <typename VECTOR>
 typename GrowingVectorMemory<VECTOR>::Pool GrowingVectorMemory<VECTOR>::pool;
 
 template <typename VECTOR>
-Threads::ThreadMutex GrowingVectorMemory<VECTOR>::mutex;
+Threads::Mutex GrowingVectorMemory<VECTOR>::mutex;
 
 template <typename VECTOR>
 inline
@@ -96,7 +96,7 @@ GrowingVectorMemory<VECTOR>::GrowingVectorMemory (const unsigned int initial_siz
   current_alloc(0),
   log_statistics(log_statistics)
 {
-  Threads::ThreadMutex::ScopedLock lock(mutex);
+  Threads::Mutex::ScopedLock lock(mutex);
   pool.initialize(initial_size);
 }
 
@@ -123,7 +123,7 @@ inline
 VECTOR *
 GrowingVectorMemory<VECTOR>::alloc ()
 {
-  Threads::ThreadMutex::ScopedLock lock(mutex);
+  Threads::Mutex::ScopedLock lock(mutex);
   ++total_alloc;
   ++current_alloc;
   // see if there is a free vector
@@ -153,7 +153,7 @@ inline
 void
 GrowingVectorMemory<VECTOR>::free(const VECTOR *const v)
 {
-  Threads::ThreadMutex::ScopedLock lock(mutex);
+  Threads::Mutex::ScopedLock lock(mutex);
   for (typename std::vector<entry_type>::iterator i=pool.data->begin();
        i != pool.data->end(); ++i)
     {
@@ -174,7 +174,7 @@ inline
 void
 GrowingVectorMemory<VECTOR>::release_unused_memory ()
 {
-  Threads::ThreadMutex::ScopedLock lock(mutex);
+  Threads::Mutex::ScopedLock lock(mutex);
 
   std::vector<entry_type> new_data;
 
@@ -200,7 +200,7 @@ inline
 std::size_t
 GrowingVectorMemory<VECTOR>::memory_consumption () const
 {
-  Threads::ThreadMutex::ScopedLock lock(mutex);
+  Threads::Mutex::ScopedLock lock(mutex);
 
   std::size_t result = sizeof (*this);
   const typename std::vector<entry_type>::const_iterator
index 786fbc34ec94962d10834828c04fa8e0d298f5bb..6deea66bda1f8eabfb8873ef057f7ec477c82838 100644 (file)
@@ -903,7 +903,7 @@ namespace internal
           // material_id), or if one of the
           // neighbors behind the face is on
           // the subdomain we care for
-          if ( ! ( ((subdomain_id == types::invalid_subdomain_id)
+          if ( ! ( ((subdomain_id == numbers::invalid_subdomain_id)
                     ||
                     (cell->subdomain_id() == subdomain_id))
                    &&
@@ -923,7 +923,7 @@ namespace internal
               if (face->has_children() == false)
                 care_for_cell |= ((cell->neighbor(face_no)->subdomain_id()
                                    == subdomain_id) ||
-                                  (subdomain_id == types::invalid_subdomain_id))
+                                  (subdomain_id == numbers::invalid_subdomain_id))
                                  &&
                                  ((cell->neighbor(face_no)->material_id()
                                    == material_id) ||
@@ -941,7 +941,7 @@ namespace internal
                           ->material_id() == material_id)
                          &&
                          (subdomain_id ==
-                          types::invalid_subdomain_id)))
+                          numbers::invalid_subdomain_id)))
                       {
                         care_for_cell = true;
                         break;
@@ -1176,7 +1176,7 @@ estimate (const Mapping<1,spacedim>                    &mapping,
   if (dynamic_cast<const parallel::distributed::Triangulation<1,spacedim>*>
       (&dof_handler.get_tria())
       != 0)
-    Assert ((subdomain_id_ == types::invalid_subdomain_id)
+    Assert ((subdomain_id_ == numbers::invalid_subdomain_id)
             ||
             (subdomain_id_ ==
              dynamic_cast<const parallel::distributed::Triangulation<1,spacedim>&>
@@ -1287,7 +1287,7 @@ estimate (const Mapping<1,spacedim>                    &mapping,
   typename DH::active_cell_iterator cell = dof_handler.begin_active();
   for (unsigned int cell_index=0; cell != dof_handler.end();
        ++cell, ++cell_index)
-    if (((subdomain_id == types::invalid_subdomain_id)
+    if (((subdomain_id == numbers::invalid_subdomain_id)
          ||
          (cell->subdomain_id() == subdomain_id))
         &&
@@ -1527,7 +1527,7 @@ estimate (const Mapping<dim, spacedim>                  &mapping,
   if (dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
       (&dof_handler.get_tria())
       != 0)
-    Assert ((subdomain_id_ == types::invalid_subdomain_id)
+    Assert ((subdomain_id_ == numbers::invalid_subdomain_id)
             ||
             (subdomain_id_ ==
              dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>&>
@@ -1637,7 +1637,7 @@ estimate (const Mapping<dim, spacedim>                  &mapping,
   for (typename DH::active_cell_iterator cell=dof_handler.begin_active();
        cell!=dof_handler.end();
        ++cell, ++present_cell)
-    if ( ((subdomain_id == types::invalid_subdomain_id)
+    if ( ((subdomain_id == numbers::invalid_subdomain_id)
           ||
           (cell->subdomain_id() == subdomain_id))
          &&
index 9fe2a393d1ec7171ef113040336b71e0f1974f35..16eaf0ff75db26d1ef30c9f59b0911819300a78c 100644 (file)
@@ -825,7 +825,7 @@ namespace MatrixCreator
                                    const Function<spacedim> *const coefficient,
                                    const std::vector<unsigned int> &component_mapping,
                                    const MatrixCreator::internal::IteratorRange<DoFHandler<dim,spacedim> >   range,
-                                   Threads::ThreadMutex      &mutex)
+                                   Threads::Mutex      &mutex)
     {
       // All assertions for this function
       // are in the calling function
@@ -1060,7 +1060,7 @@ namespace MatrixCreator
                                      dofs_on_face_vector.end());
 
               // lock the matrix
-              Threads::ThreadMutex::ScopedLock lock (mutex);
+              Threads::Mutex::ScopedLock lock (mutex);
               for (unsigned int i=0; i<dofs_per_cell; ++i)
                 {
                   if (dof_is_on_face[i] && dof_to_boundary_mapping[dofs[i]] != numbers::invalid_unsigned_int)
@@ -1093,7 +1093,7 @@ namespace MatrixCreator
                                         const Function<3> *const ,
                                         const std::vector<unsigned int> &,
                                         const MatrixCreator::internal::IteratorRange<DoFHandler<2,3> > ,
-                                        Threads::ThreadMutex &)
+                                        Threads::Mutex &)
     {
       Assert(false,ExcNotImplemented());
     }
@@ -1112,7 +1112,7 @@ namespace MatrixCreator
                                         const Function<3> *const ,
                                         const std::vector<unsigned int> &,
                                         const MatrixCreator::internal::IteratorRange<DoFHandler<1,3> > ,
-                                        Threads::ThreadMutex &)
+                                        Threads::Mutex &)
     {
       Assert(false,ExcNotImplemented());
     }
@@ -1177,7 +1177,7 @@ namespace MatrixCreator
 
     // mutex to synchronise access to
     // the matrix
-    Threads::ThreadMutex mutex;
+    Threads::Mutex mutex;
 
     typedef std_cxx1x::tuple<const Mapping<dim,spacedim> &,
             const DoFHandler<dim,spacedim> &,
@@ -1193,7 +1193,7 @@ namespace MatrixCreator
      const Function<spacedim> *const coefficient,
      const std::vector<unsigned int> &component_mapping,
      const MatrixCreator::internal::IteratorRange<DoFHandler<dim,spacedim> >   range,
-     Threads::ThreadMutex      &mutex);
+     Threads::Mutex      &mutex);
     create_boundary_mass_matrix_1_t p
       = &create_boundary_mass_matrix_1<dim,spacedim>;
 
@@ -1225,7 +1225,7 @@ namespace MatrixCreator
                                    const Function<spacedim> *const coefficient,
                                    const std::vector<unsigned int> &component_mapping,
                                    const MatrixCreator::internal::IteratorRange<hp::DoFHandler<dim,spacedim> >   range,
-                                   Threads::ThreadMutex      &mutex)
+                                   Threads::Mutex      &mutex)
     {
       const hp::MappingCollection<dim,spacedim> &mapping = std_cxx1x::get<0>(commons);
       const hp::DoFHandler<dim,spacedim> &dof = std_cxx1x::get<1>(commons);
@@ -1522,7 +1522,7 @@ namespace MatrixCreator
 #endif
 
               // lock the matrix
-              Threads::ThreadMutex::ScopedLock lock (mutex);
+              Threads::Mutex::ScopedLock lock (mutex);
               for (unsigned int i=0; i<dofs_per_cell; ++i)
                 for (unsigned int j=0; j<dofs_per_cell; ++j)
                   if (dof_is_on_face[i] && dof_is_on_face[j])
@@ -1657,7 +1657,7 @@ namespace MatrixCreator
 
     // mutex to synchronise access to
     // the matrix
-    Threads::ThreadMutex mutex;
+    Threads::Mutex mutex;
 
     // then assemble in parallel
     typedef void (*create_boundary_mass_matrix_1_t)
@@ -1669,7 +1669,7 @@ namespace MatrixCreator
      const Function<spacedim> *const coefficient,
      const std::vector<unsigned int> &component_mapping,
      const MatrixCreator::internal::IteratorRange<hp::DoFHandler<dim,spacedim> >   range,
-     Threads::ThreadMutex      &mutex);
+     Threads::Mutex      &mutex);
     create_boundary_mass_matrix_1_t p = &create_boundary_mass_matrix_1<dim,spacedim>;
 
 //TODO: Use WorkStream here
@@ -1982,18 +1982,13 @@ namespace MatrixTools
         const unsigned int dof_number = dof->first;
         // for each boundary dof:
 
-        // set entries of this line
-        // to zero except for the diagonal
-        // entry. Note that the diagonal
-        // entry is always the first one
-        // for square matrices, i.e.
-        // we shall not set
-        // matrix.global_entry(
-        //     sparsity_rowstart[dof.first])
-        const unsigned int last = sparsity_rowstart[dof_number+1];
-        for (unsigned int j=sparsity_rowstart[dof_number]+1; j<last; ++j)
-          matrix.global_entry(j) = 0.;
-
+        // set entries of this line to zero except for the diagonal
+        // entry
+       for (typename SparseMatrix<number>::iterator
+              p = matrix.begin(dof_number);
+            p != matrix.end(dof_number); ++p)
+         if (p->column() != dof_number)
+           p->value() = 0.;
 
         // set right hand side to
         // wanted value: if main diagonal
@@ -2053,6 +2048,7 @@ namespace MatrixTools
             // since that is the
             // diagonal element and
             // thus the present row
+           const unsigned int last = sparsity_rowstart[dof_number+1];
             for (unsigned int j=sparsity_rowstart[dof_number]+1; j<last; ++j)
               {
                 const unsigned int row = sparsity_colnums[j];

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.