Reference documentation for deal.II version 8.5.1
tria_base.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2008 - 2016 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii__distributed__tria_base_h
17 #define dealii__distributed__tria_base_h
18 
19 
20 #include <deal.II/base/config.h>
21 #include <deal.II/base/subscriptor.h>
22 #include <deal.II/base/smartpointer.h>
23 #include <deal.II/base/template_constraints.h>
24 #include <deal.II/base/mpi.h>
25 #include <deal.II/grid/tria.h>
26 
27 #include <deal.II/base/std_cxx1x/function.h>
28 #include <deal.II/base/std_cxx1x/tuple.h>
29 
30 #include <set>
31 #include <vector>
32 #include <list>
33 #include <utility>
34 
35 
36 DEAL_II_NAMESPACE_OPEN
37 
38 namespace parallel
39 {
45  template <int dim, int spacedim = dim>
46  class Triangulation : public ::Triangulation<dim,spacedim>
47  {
48  public:
49 
54  const typename ::Triangulation<dim,spacedim>::MeshSmoothing smooth_grid = (::Triangulation<dim,spacedim>::none),
55  const bool check_for_distorted_cells = false);
56 
60  virtual ~Triangulation ();
61 
65  virtual MPI_Comm get_communicator () const;
66 
70  virtual void copy_triangulation (const ::Triangulation<dim, spacedim> &old_tria);
71 
78  const std::vector<unsigned int> &
80 
81 
100  unsigned int n_locally_owned_active_cells () const;
101 
108 
112  virtual std::size_t memory_consumption () const;
113 
114 
122  virtual unsigned int n_global_levels () const;
123 
131 
140  const std::set<types::subdomain_id> &
141  ghost_owners () const;
142 
152  const std::set<types::subdomain_id> &
153  level_ghost_owners () const;
154 
155  protected:
162 
168 
173 
178  struct NumberCache
179  {
184  std::vector<unsigned int> n_locally_owned_active_cells;
195  unsigned int n_global_levels;
200  std::set<types::subdomain_id> ghost_owners;
205  std::set<types::subdomain_id> level_ghost_owners;
206 
207  NumberCache();
208  };
209 
210  NumberCache number_cache;
211 
215  virtual void update_number_cache ();
216  };
217 
218 } // namespace parallel
219 
220 DEAL_II_NAMESPACE_CLOSE
221 
222 #endif
types::global_dof_index n_global_active_cells
Definition: tria_base.h:189
const std::vector< unsigned int > & n_locally_owned_active_cells_per_processor() const
Definition: tria_base.cc:139
types::subdomain_id my_subdomain
Definition: tria_base.h:167
std::set< types::subdomain_id > ghost_owners
Definition: tria_base.h:200
virtual void copy_triangulation(const ::Triangulation< dim, spacedim > &old_tria)
Definition: tria_base.cc:63
const std::set< types::subdomain_id > & ghost_owners() const
Definition: tria_base.cc:238
std::set< types::subdomain_id > level_ghost_owners
Definition: tria_base.h:205
std::vector< unsigned int > n_locally_owned_active_cells
Definition: tria_base.h:184
const bool check_for_distorted_cells
Definition: tria.h:3471
unsigned int global_dof_index
Definition: types.h:88
virtual void update_number_cache()
Definition: tria_base.cc:154
virtual MPI_Comm get_communicator() const
Definition: tria_base.cc:146
virtual types::global_dof_index n_global_active_cells() const
Definition: tria_base.cc:132
virtual std::size_t memory_consumption() const
Definition: tria_base.cc:88
unsigned int subdomain_id
Definition: types.h:42
virtual unsigned int n_global_levels() const
Definition: tria_base.cc:125
const std::set< types::subdomain_id > & level_ghost_owners() const
Definition: tria_base.cc:246
unsigned int n_locally_owned_active_cells() const
Definition: tria_base.cc:118
MeshSmoothing smooth_grid
Definition: tria.h:3185
Triangulation(MPI_Comm mpi_communicator, const typename ::Triangulation< dim, spacedim >::MeshSmoothing smooth_grid=(::Triangulation< dim, spacedim >::none), const bool check_for_distorted_cells=false)
Definition: tria_base.cc:42
types::subdomain_id locally_owned_subdomain() const
Definition: tria_base.cc:230
types::subdomain_id n_subdomains
Definition: tria_base.h:172