]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Patch by Denis Davydov: Introduce n_global_active_cells() also in dealii::Triangulation.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 19 Jun 2014 23:34:38 +0000 (23:34 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 19 Jun 2014 23:34:38 +0000 (23:34 +0000)
git-svn-id: https://svn.dealii.org/trunk@33062 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/include/deal.II/distributed/tria.h
deal.II/include/deal.II/grid/tria.h
deal.II/source/grid/tria.cc

index 7b1c9edc11a976b27e18f88b6d556db2088ffecc..957f6ddb4db5212a05167a8bb49a48ad14eb9ed0 100644 (file)
@@ -162,6 +162,11 @@ inconvenience this causes.
   (Denis Davydov, 2014/06/15)
   </li>
 
+  <li> New: There is now function Triangulation::n_global_active_cells().
+  <br>
+  (Denis Davydov, 2014/06/19)
+  </li>
+
   <li> New: There is now a class FEEvaluationQ_DG0 that does
   optimized matrix-free evaluation for FE_Q_DG0 elements.
   <br>
index 7e0f4e06db18080ef37d9bb7029d391c89550122..ea3e88bc09351e67242a032de29abf1b97001a5f 100644 (file)
@@ -492,7 +492,7 @@ namespace parallel
        * cells owned by each processor. This equals the overall number
        * of active cells in the distributed triangulation.
        */
-      types::global_dof_index n_global_active_cells () const;
+      virtual types::global_dof_index n_global_active_cells () const;
 
       /**
        * Returns the global maximum level. This may be bigger than
index f60fd6e5455dd450821ad96bd0a4d6f3484e92b8..a8f715434219fc68bca29ef9378eaaad48d1273a 100644 (file)
@@ -2850,6 +2850,16 @@ public:
    */
   unsigned int n_active_cells () const;
 
+  /**
+   * Return the total number of active cells. For the current class, this is
+   * the same as n_active_cells(). However, the function may be overloaded in
+   * derived classes (e.g., in parallel::distributed::Triangulation) where it
+   * may return a value greater than the number of active cells reported by
+   * the triangulation object on the current processor.
+   */
+  virtual types::global_dof_index n_global_active_cells () const;
+
+
   /**
    * Return total number of active cells on
    * level @p level.  Maps to
index 2193762bea52bb7cc25dd55b94747df0378dcbc4..6d1a05492008bca836dcb572cff81c31de52183e 100644 (file)
@@ -11462,6 +11462,13 @@ unsigned int Triangulation<dim, spacedim>::n_active_cells () const
   return internal::Triangulation::n_active_cells (number_cache);
 }
 
+template <int dim, int spacedim>
+types::global_dof_index Triangulation<dim, spacedim>::n_global_active_cells () const
+{
+  return n_active_cells();
+}
+
+
 
 template <int dim, int spacedim>
 unsigned int Triangulation<dim, spacedim>::n_faces () const

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.