![]() |
Reference documentation for deal.II version 8.4.2
|
#include <deal.II/distributed/tria_base.h>
Classes | |
| struct | NumberCache |
Public Member Functions | |
| Triangulation (MPI_Comm mpi_communicator, const typename ::Triangulation< dim, spacedim >::MeshSmoothing smooth_grid=(::Triangulation< dim, spacedim >::none), const bool check_for_distorted_cells=false) | |
| virtual | ~Triangulation () |
| virtual MPI_Comm | get_communicator () const |
| virtual void | copy_triangulation (const ::Triangulation< dim, spacedim > &old_tria) |
| const std::vector< unsigned int > & | n_locally_owned_active_cells_per_processor () const |
| unsigned int | n_locally_owned_active_cells () const |
| virtual types::global_dof_index | n_global_active_cells () const |
| virtual std::size_t | memory_consumption () const |
| virtual unsigned int | n_global_levels () const |
| types::subdomain_id | locally_owned_subdomain () const |
| const std::set< unsigned int > & | ghost_owners () const |
| const std::set< unsigned int > & | level_ghost_owners () const |
Public Member Functions inherited from Triangulation< dim, spacedim > | |
| Triangulation (const MeshSmoothing smooth_grid=none, const bool check_for_distorted_cells=false) | |
| Triangulation (const Triangulation< dim, spacedim > &t) | |
| virtual void | clear () |
| virtual void | set_mesh_smoothing (const MeshSmoothing mesh_smoothing) |
| void | set_boundary (const types::manifold_id number, const Boundary< dim, spacedim > &boundary_object) |
| void | set_boundary (const types::manifold_id number) |
| void | set_manifold (const types::manifold_id number, const Manifold< dim, spacedim > &manifold_object) |
| void | set_manifold (const types::manifold_id number) |
| void | set_all_manifold_ids (const types::manifold_id number) |
| void | set_all_manifold_ids_on_boundary (const types::manifold_id number) |
| void | set_all_manifold_ids_on_boundary (const types::boundary_id b_id, const types::manifold_id number) |
| const Boundary< dim, spacedim > & | get_boundary (const types::manifold_id number) const |
| const Manifold< dim, spacedim > & | get_manifold (const types::manifold_id number) const |
| std::vector< types::boundary_id > | get_boundary_ids () const |
| std::vector< types::boundary_id > | get_boundary_indicators () const DEAL_II_DEPRECATED |
| std::vector< types::manifold_id > | get_manifold_ids () const |
| virtual void | copy_triangulation (const Triangulation< dim, spacedim > &old_tria) |
| virtual void | create_triangulation (const std::vector< Point< spacedim > > &vertices, const std::vector< CellData< dim > > &cells, const SubCellData &subcelldata) |
| virtual void | create_triangulation_compatibility (const std::vector< Point< spacedim > > &vertices, const std::vector< CellData< dim > > &cells, const SubCellData &subcelldata) |
| void | flip_all_direction_flags () |
| void | set_all_refine_flags () |
| void | refine_global (const unsigned int times=1) |
| virtual void | execute_coarsening_and_refinement () |
| virtual bool | prepare_coarsening_and_refinement () |
| void | save_refine_flags (std::ostream &out) const |
| void | save_refine_flags (std::vector< bool > &v) const |
| void | load_refine_flags (std::istream &in) |
| void | load_refine_flags (const std::vector< bool > &v) |
| void | save_coarsen_flags (std::ostream &out) const |
| void | save_coarsen_flags (std::vector< bool > &v) const |
| void | load_coarsen_flags (std::istream &out) |
| void | load_coarsen_flags (const std::vector< bool > &v) |
| bool | get_anisotropic_refinement_flag () const |
| void | clear_user_flags () |
| void | save_user_flags (std::ostream &out) const |
| void | save_user_flags (std::vector< bool > &v) const |
| void | load_user_flags (std::istream &in) |
| void | load_user_flags (const std::vector< bool > &v) |
| void | clear_user_flags_line () |
| void | save_user_flags_line (std::ostream &out) const |
| void | save_user_flags_line (std::vector< bool > &v) const |
| void | load_user_flags_line (std::istream &in) |
| void | load_user_flags_line (const std::vector< bool > &v) |
| void | clear_user_flags_quad () |
| void | save_user_flags_quad (std::ostream &out) const |
| void | save_user_flags_quad (std::vector< bool > &v) const |
| void | load_user_flags_quad (std::istream &in) |
| void | load_user_flags_quad (const std::vector< bool > &v) |
| void | clear_user_flags_hex () |
| void | save_user_flags_hex (std::ostream &out) const |
| void | save_user_flags_hex (std::vector< bool > &v) const |
| void | load_user_flags_hex (std::istream &in) |
| void | load_user_flags_hex (const std::vector< bool > &v) |
| void | clear_user_data () |
| void | save_user_indices (std::vector< unsigned int > &v) const |
| void | load_user_indices (const std::vector< unsigned int > &v) |
| void | save_user_pointers (std::vector< void *> &v) const |
| void | load_user_pointers (const std::vector< void *> &v) |
| void | save_user_indices_line (std::vector< unsigned int > &v) const |
| void | load_user_indices_line (const std::vector< unsigned int > &v) |
| void | save_user_indices_quad (std::vector< unsigned int > &v) const |
| void | load_user_indices_quad (const std::vector< unsigned int > &v) |
| void | save_user_indices_hex (std::vector< unsigned int > &v) const |
| void | load_user_indices_hex (const std::vector< unsigned int > &v) |
| void | save_user_pointers_line (std::vector< void *> &v) const |
| void | load_user_pointers_line (const std::vector< void *> &v) |
| void | save_user_pointers_quad (std::vector< void *> &v) const |
| void | load_user_pointers_quad (const std::vector< void *> &v) |
| void | save_user_pointers_hex (std::vector< void *> &v) const |
| void | load_user_pointers_hex (const std::vector< void *> &v) |
| cell_iterator | begin (const unsigned int level=0) const |
| active_cell_iterator | begin_active (const unsigned int level=0) const |
| cell_iterator | end () const |
| cell_iterator | end (const unsigned int level) const |
| active_cell_iterator | end_active (const unsigned int level) const |
| cell_iterator | last () const |
| active_cell_iterator | last_active () const |
| IteratorRange< cell_iterator > | cell_iterators () const |
| IteratorRange< active_cell_iterator > | active_cell_iterators () const |
| IteratorRange< cell_iterator > | cell_iterators_on_level (const unsigned int level) const |
| IteratorRange< active_cell_iterator > | active_cell_iterators_on_level (const unsigned int level) const |
| face_iterator | begin_face () const |
| active_face_iterator | begin_active_face () const |
| face_iterator | end_face () const |
| vertex_iterator | begin_vertex () const |
| active_vertex_iterator | begin_active_vertex () const |
| vertex_iterator | end_vertex () const |
| unsigned int | n_lines () const |
| unsigned int | n_lines (const unsigned int level) const |
| unsigned int | n_active_lines () const |
| unsigned int | n_active_lines (const unsigned int level) const |
| unsigned int | n_quads () const |
| unsigned int | n_quads (const unsigned int level) const |
| unsigned int | n_active_quads () const |
| unsigned int | n_active_quads (const unsigned int level) const |
| unsigned int | n_hexs () const |
| unsigned int | n_hexs (const unsigned int level) const |
| unsigned int | n_active_hexs () const |
| unsigned int | n_active_hexs (const unsigned int level) const |
| unsigned int | n_cells () const |
| unsigned int | n_cells (const unsigned int level) const |
| unsigned int | n_active_cells () const |
| unsigned int | n_active_cells (const unsigned int level) const |
| unsigned int | n_faces () const |
| unsigned int | n_active_faces () const |
| unsigned int | n_levels () const |
| virtual bool | has_hanging_nodes () const |
| unsigned int | n_vertices () const |
| const std::vector< Point< spacedim > > & | get_vertices () const |
| unsigned int | n_used_vertices () const |
| bool | vertex_used (const unsigned int index) const |
| const std::vector< bool > & | get_used_vertices () const |
| unsigned int | max_adjacent_cells () const |
| Triangulation< dim, spacedim > & | get_triangulation () |
| const Triangulation< dim, spacedim > & | get_triangulation () const |
| unsigned int | n_raw_lines () const |
| unsigned int | n_raw_lines (const unsigned int level) const |
| unsigned int | n_raw_quads () const |
| unsigned int | n_raw_quads (const unsigned int level) const |
| unsigned int | n_raw_hexs () const |
| unsigned int | n_raw_hexs (const unsigned int level) const |
| unsigned int | n_raw_cells (const unsigned int level) const |
| unsigned int | n_raw_faces () const |
| template<class Archive > | |
| void | save (Archive &ar, const unsigned int version) const |
| template<class Archive > | |
| void | load (Archive &ar, const unsigned int version) |
| DeclException1 (ExcInvalidLevel, int,<< "The given level "<< arg1<< " is not in the valid range!") | |
| DeclException2 (ExcTriangulationNotEmpty, int, int,<< "You are trying to perform an operation on a triangulation "<< "that is only allowed if the triangulation is currently empty. "<< "However, it currently stores "<< arg1<< " vertices and has "<< "cells on "<< arg2<< " levels.") | |
| DeclException0 (ExcGridReadError) | |
| DeclException0 (ExcFacesHaveNoLevel) | |
| DeclException1 (ExcEmptyLevel, int,<< "You tried to do something on level "<< arg1<< ", but this level is empty.") | |
| DeclException0 (ExcNonOrientableTriangulation) | |
| DeclException1 (ExcBoundaryIdNotFound, types::boundary_id,<< "The given boundary_id "<< arg1<< " is not defined in this Triangulation!") | |
Public Member Functions inherited from Subscriptor | |
| Subscriptor () | |
| Subscriptor (const Subscriptor &) | |
| virtual | ~Subscriptor () |
| Subscriptor & | operator= (const Subscriptor &) |
| void | subscribe (const char *identifier=0) const |
| void | unsubscribe (const char *identifier=0) const |
| unsigned int | n_subscriptions () const |
| void | list_subscribers () const |
| DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects."<< "\"<< "(Additional information: "<< arg3<< ")\"<< "See the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "a lot more information on what this error means and "<< "how to fix programs in which it happens.") | |
| DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier <"<< arg2<< "> subscribes to this object of class "<< arg1<< ". Consequently, it cannot be unsubscribed.") | |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int version) |
Protected Member Functions | |
| virtual void | update_number_cache () |
Protected Attributes | |
| MPI_Comm | mpi_communicator |
| types::subdomain_id | my_subdomain |
| types::subdomain_id | n_subdomains |
Protected Attributes inherited from Triangulation< dim, spacedim > | |
| MeshSmoothing | smooth_grid |
Additional Inherited Members | |
Public Types inherited from Triangulation< dim, spacedim > | |
| enum | MeshSmoothing { none = 0x0, limit_level_difference_at_vertices = 0x1, eliminate_unrefined_islands = 0x2, patch_level_1 = 0x4, coarsest_level_1 = 0x8, allow_anisotropic_smoothing = 0x10, eliminate_refined_inner_islands = 0x100, eliminate_refined_boundary_islands = 0x200, do_not_produce_unrefined_islands = 0x400, smoothing_on_refinement, smoothing_on_coarsening, maximum_smoothing = 0xffff ^ allow_anisotropic_smoothing } |
| typedef TriaIterator< CellAccessor< dim, spacedim > > | cell_iterator |
| typedef TriaActiveIterator< CellAccessor< dim, spacedim > > | active_cell_iterator |
| enum | CellStatus { CELL_PERSIST, CELL_REFINE, CELL_COARSEN, CELL_INVALID } |
Public Attributes inherited from Triangulation< dim, spacedim > | |
| Signals | signals |
Static Public Attributes inherited from Triangulation< dim, spacedim > | |
| static const StraightBoundary< dim, spacedim > | straight_boundary = StraightBoundary<dim,spacedim>() |
| static const unsigned int | dimension = dim |
| static const unsigned int | space_dimension = spacedim |
Static Protected Member Functions inherited from Triangulation< dim, spacedim > | |
| static void | write_bool_vector (const unsigned int magic_number1, const std::vector< bool > &v, const unsigned int magic_number2, std::ostream &out) |
| static void | read_bool_vector (const unsigned int magic_number1, std::vector< bool > &v, const unsigned int magic_number2, std::istream &in) |
This class describes the interface for all triangulation classes that work in parallel, namely parallel::distributed::Triangulation and parallel::shared::Triangulation.
Definition at line 49 of file tria_base.h.
| Triangulation< dim, spacedim >::Triangulation | ( | MPI_Comm | mpi_communicator, |
| const typename ::Triangulation< dim, spacedim >::MeshSmoothing | smooth_grid = (::Triangulation<dim,spacedim>::none), |
||
| const bool | check_for_distorted_cells = false |
||
| ) |
Constructor.
Definition at line 41 of file tria_base.cc.
|
virtual |
Destructor.
Reimplemented from Triangulation< dim, spacedim >.
Reimplemented in parallel::distributed::Triangulation< 1, spacedim >, parallel::distributed::Triangulation< dim, spacedim >, and parallel::shared::Triangulation< dim, spacedim >.
Definition at line 90 of file tria_base.cc.
|
virtual |
Return MPI communicator used by this triangulation.
Definition at line 135 of file tria_base.cc.
|
virtual |
Implementation of the same function as in the base class.
Definition at line 60 of file tria_base.cc.
| const std::vector< unsigned int > & Triangulation< dim, spacedim >::n_locally_owned_active_cells_per_processor | ( | ) | const |
Return the number of active cells owned by each of the MPI processes that contribute to this triangulation. The element of this vector indexed by locally_owned_subdomain() equals the result of n_locally_owned_active_cells().
Definition at line 128 of file tria_base.cc.
| unsigned int Triangulation< dim, spacedim >::n_locally_owned_active_cells | ( | ) | const |
Return the number of active cells in the triangulation that are locally owned, i.e. that have a subdomain_id equal to locally_owned_subdomain(). Note that there may be more active cells in the triangulation stored on the present processor, such as for example ghost cells, or cells further away from the locally owned block of cells but that are needed to ensure that the triangulation that stores this processor's set of active cells still remains balanced with respect to the 2:1 size ratio of adjacent cells.
As a consequence of the remark above, the result of this function is always smaller or equal to the result of the function with the same name in the Triangulation base class, which includes the active ghost and artificial cells (see also GlossArtificialCell and GlossGhostCell).
Definition at line 107 of file tria_base.cc.
|
virtual |
Return the sum over all processors of the number of active cells owned by each processor. This equals the overall number of active cells in the triangulation.
Reimplemented from Triangulation< dim, spacedim >.
Definition at line 121 of file tria_base.cc.
|
virtual |
Return the local memory consumption in bytes.
Reimplemented from Triangulation< dim, spacedim >.
Reimplemented in parallel::distributed::Triangulation< dim, spacedim >.
Definition at line 76 of file tria_base.cc.
|
virtual |
Returns the global maximum level. This may be bigger than the number Triangulation::n_levels() (a function in this class's base class) returns if the current processor only stores cells in parts of the domain that are not very refined, but if other processors store cells in more deeply refined parts of the domain.
Reimplemented from Triangulation< dim, spacedim >.
Definition at line 114 of file tria_base.cc.
|
virtual |
Return the subdomain id of those cells that are owned by the current processor. All cells in the triangulation that do not have this subdomain id are either owned by another processor or have children that only exist on other processors.
Reimplemented from Triangulation< dim, spacedim >.
Definition at line 218 of file tria_base.cc.
| const std::set< unsigned int > & Triangulation< dim, spacedim >::ghost_owners | ( | ) | const |
Returns a set of MPI ranks of the processors that have at least one ghost cell adjacent to the cells of the local processor. In other words, this is the set of subdomain_id() for all ghost cells.
i is contained in the list of processor j, then j will also be contained in the list of processor i. Definition at line 227 of file tria_base.cc.
| const std::set< unsigned int > & Triangulation< dim, spacedim >::level_ghost_owners | ( | ) | const |
Returns a set of MPI ranks of the processors that have at least one level ghost cell adjacent to our cells used in geometric multigrid. In other words, this is the set of level_subdomain_id() for all level ghost cells.
i is contained in the list of processor j, then j will also be contained in the list of processor i. Definition at line 235 of file tria_base.cc.
|
protectedvirtual |
Update the number_cache variable after mesh creation or refinement.
Reimplemented in parallel::distributed::Triangulation< dim, spacedim >.
Definition at line 143 of file tria_base.cc.
|
protected |
MPI communicator to be used for the triangulation. We create a unique communicator for this class, which is a duplicate of the one passed to the constructor.
Definition at line 162 of file tria_base.h.
|
protected |
The subdomain id to be used for the current processor. This is the MPI rank.
Definition at line 168 of file tria_base.h.
|
protected |
The total number of subdomains (or the size of the MPI communicator).
Definition at line 173 of file tria_base.h.
1.8.12