Gather information about a Triangulation. More...
#include <grid_info.h>
Public Member Functions | |
GridInfo (const unsigned int info_level=0) | |
Construct a new (empty) Grid Info object. More... | |
template<int dim, int spacedim> | |
GridInfo (const Triangulation< dim, spacedim > &tria, const unsigned int info_level=0) | |
Construct a new Grid Info object, and gather all information about the Triangulation tria . More... | |
template<int dim, int spacedim> | |
void | build_info (const Triangulation< dim, spacedim > &tria) |
Actually build the information about the Triangulation. More... | |
template<typename StreamType > | |
void | print_info (StreamType &out) |
Print all gathered information about the Triangulation. More... | |
Public Attributes | |
unsigned int | info_level = 0 |
Level of information to gather. More... | |
unsigned int | n_active_cells = 0 |
Number of active cells. More... | |
unsigned int | n_vertices = 0 |
Number of vertices. More... | |
unsigned int | n_used_vertices = 0 |
Number of used vertices. More... | |
unsigned int | n_levels = 0 |
Number of levels. More... | |
std::vector< unsigned int > | n_active_cells_at_level |
Number of active cells at each level. More... | |
std::vector< unsigned int > | n_cells_at_level |
Number of cells at each level. More... | |
std::vector< types::boundary_id > | boundary_ids |
Boundary ids. More... | |
std::vector< types::material_id > | material_ids |
Material ids. More... | |
std::vector< types::manifold_id > | manifold_ids |
Manifold ids. More... | |
std::vector< ReferenceCell > | reference_cell_types |
Reference cell types. More... | |
std::map< types::boundary_id, unsigned int > | faces_per_boundary_id |
Number of faces per boundary id. More... | |
std::map< types::material_id, unsigned int > | cells_per_material_id |
Number of cells per boundary id. More... | |
std::map< types::manifold_id, unsigned int > | faces_per_manifold_id |
Number of faces per manifold id. More... | |
std::map< types::manifold_id, unsigned int > | cells_per_manifold_id |
Number of cells per manifold id. More... | |
std::map< ReferenceCell, unsigned int > | cells_per_reference_cell_type |
Number of cells per reference cell type. More... | |
Gather information about a Triangulation.
This class can be used to store information about a Triangulation, such as the number of cells, the number of vertices, etc.
It is particularly useful when building robust programs w.r.t. boundary conditions, boundary indicators, manifold indicators, etc.
Definition at line 148 of file grid_info.h.
|
inline |
Construct a new (empty) Grid Info object.
info_level | Level of information to gather. The higher the number, the more expensive the operation. |
Definition at line 156 of file grid_info.h.
|
inline |
Construct a new Grid Info object, and gather all information about the Triangulation tria
.
tria | The Triangulation to gather information from. |
info_level | Level of information to gather. The higher the number, the more expensive the operation. |
Definition at line 169 of file grid_info.h.
References build_info().
|
inline |
Actually build the information about the Triangulation.
tria | The Triangulation to gather information from. |
Definition at line 183 of file grid_info.h.
References Triangulation< int dim, int spacedim >::active_cell_iterators(), Triangulation< int dim, int spacedim >::active_face_iterators(), boundary_ids, cells_per_manifold_id, cells_per_material_id, cells_per_reference_cell_type, faces_per_boundary_id, faces_per_manifold_id, Triangulation< int dim, int spacedim >::get_boundary_ids(), Triangulation< int dim, int spacedim >::get_manifold_ids(), Triangulation< int dim, int spacedim >::get_reference_cells(), info_level, manifold_ids, material_ids, Triangulation< int dim, int spacedim >::n_active_cells(), n_active_cells, n_active_cells_at_level, Triangulation< int dim, int spacedim >::n_cells(), n_cells_at_level, Triangulation< int dim, int spacedim >::n_levels(), n_levels, Triangulation< int dim, int spacedim >::n_used_vertices(), n_used_vertices, Triangulation< int dim, int spacedim >::n_vertices(), n_vertices, and reference_cell_types.
Referenced by ParsedTools::BoundaryConditions< spacedim >::check_consistency(), and GridInfo().
|
inline |
Print all gathered information about the Triangulation.
out | The stream to print to. |
Definition at line 251 of file grid_info.h.
References boundary_ids, cells_per_manifold_id, cells_per_material_id, cells_per_reference_cell_type, faces_per_boundary_id, faces_per_manifold_id, info_level, manifold_ids, material_ids, n_active_cells, n_active_cells_at_level, n_cells_at_level, n_levels, n_used_vertices, n_vertices, reference_cell_types, and Patterns::Tools::to_string().
Referenced by main(), and MeshHandler< dim, spacedim >::run().
unsigned int ParsedTools::GridInfo::info_level = 0 |
Level of information to gather.
Definition at line 300 of file grid_info.h.
Referenced by build_info(), and print_info().
unsigned int ParsedTools::GridInfo::n_active_cells = 0 |
Number of active cells.
Definition at line 303 of file grid_info.h.
Referenced by build_info(), and print_info().
unsigned int ParsedTools::GridInfo::n_vertices = 0 |
Number of vertices.
Definition at line 306 of file grid_info.h.
Referenced by build_info(), and print_info().
unsigned int ParsedTools::GridInfo::n_used_vertices = 0 |
Number of used vertices.
Definition at line 309 of file grid_info.h.
Referenced by build_info(), and print_info().
unsigned int ParsedTools::GridInfo::n_levels = 0 |
Number of levels.
Definition at line 312 of file grid_info.h.
Referenced by build_info(), and print_info().
std::vector<unsigned int> ParsedTools::GridInfo::n_active_cells_at_level |
Number of active cells at each level.
Definition at line 315 of file grid_info.h.
Referenced by build_info(), and print_info().
std::vector<unsigned int> ParsedTools::GridInfo::n_cells_at_level |
Number of cells at each level.
Definition at line 318 of file grid_info.h.
Referenced by build_info(), and print_info().
std::vector<types::boundary_id> ParsedTools::GridInfo::boundary_ids |
Boundary ids.
Definition at line 321 of file grid_info.h.
Referenced by build_info(), and print_info().
std::vector<types::material_id> ParsedTools::GridInfo::material_ids |
Material ids.
Definition at line 324 of file grid_info.h.
Referenced by build_info(), and print_info().
std::vector<types::manifold_id> ParsedTools::GridInfo::manifold_ids |
Manifold ids.
Definition at line 327 of file grid_info.h.
Referenced by build_info(), and print_info().
std::vector<ReferenceCell> ParsedTools::GridInfo::reference_cell_types |
Reference cell types.
Definition at line 330 of file grid_info.h.
Referenced by build_info(), and print_info().
std::map<types::boundary_id, unsigned int> ParsedTools::GridInfo::faces_per_boundary_id |
Number of faces per boundary id.
Definition at line 333 of file grid_info.h.
Referenced by build_info(), and print_info().
std::map<types::material_id, unsigned int> ParsedTools::GridInfo::cells_per_material_id |
Number of cells per boundary id.
Definition at line 336 of file grid_info.h.
Referenced by build_info(), and print_info().
std::map<types::manifold_id, unsigned int> ParsedTools::GridInfo::faces_per_manifold_id |
Number of faces per manifold id.
Definition at line 339 of file grid_info.h.
Referenced by build_info(), and print_info().
std::map<types::manifold_id, unsigned int> ParsedTools::GridInfo::cells_per_manifold_id |
Number of cells per manifold id.
Definition at line 342 of file grid_info.h.
Referenced by build_info(), and print_info().
std::map<ReferenceCell, unsigned int> ParsedTools::GridInfo::cells_per_reference_cell_type |
Number of cells per reference cell type.
Definition at line 345 of file grid_info.h.
Referenced by build_info(), and print_info().