Reference documentation for deal.II version 9.6.0
|
#include <deal.II/grid/cell_id_translator.h>
Public Member Functions | |
CellIDTranslator (const types::global_cell_index n_coarse_cells, const types::global_cell_index n_global_levels) | |
types::global_cell_index | size () const |
template<typename Accessor > | |
types::global_cell_index | translate (const TriaIterator< Accessor > &cell) const |
template<typename Accessor > | |
types::global_cell_index | translate (const TriaIterator< Accessor > &cell, const types::global_cell_index i) const |
CellId | to_cell_id (const types::global_cell_index id) const |
Static Private Member Functions | |
static types::global_cell_index | convert_cell_id_binary_type_to_level_coarse_cell_id (const typename CellId::binary_type &binary_representation) |
Private Attributes | |
const types::global_cell_index | n_coarse_cells |
const types::global_cell_index | n_global_levels |
std::vector< types::global_cell_index > | tree_sizes |
A class that helps to translate between CellIDs and globally unique indices. The resulting index space might be non-contiguous in the case of locally refined meshes.
The following code snippet shows how to set up an IndexSet for active cells, using this class:
Definition at line 54 of file cell_id_translator.h.
internal::CellIDTranslator< dim >::CellIDTranslator | ( | const types::global_cell_index | n_coarse_cells, |
const types::global_cell_index | n_global_levels ) |
Constructor taking the number of global coarse cells and number of global levels of a triangulation.
Definition at line 120 of file cell_id_translator.h.
types::global_cell_index internal::CellIDTranslator< dim >::size | ( | ) | const |
Return maximum number of cells, i.e., in the case the triangulation were globally refined n_global_levels - 1
times.
Definition at line 171 of file cell_id_translator.h.
types::global_cell_index internal::CellIDTranslator< dim >::translate | ( | const TriaIterator< Accessor > & | cell | ) | const |
Convert a cell
of type TriaAccessor, CellAccessor, DoFAccessor, or DoFCellAccessor to an index.
Definition at line 184 of file cell_id_translator.h.
types::global_cell_index internal::CellIDTranslator< dim >::translate | ( | const TriaIterator< Accessor > & | cell, |
const types::global_cell_index | i ) const |
Convert the i-th
child of to
an index.
Definition at line 207 of file cell_id_translator.h.
CellId internal::CellIDTranslator< dim >::to_cell_id | ( | const types::global_cell_index | id | ) | const |
Convert an index to a CellId.
Definition at line 223 of file cell_id_translator.h.
|
staticprivate |
Convert a binary representation to a index.
Definition at line 254 of file cell_id_translator.h.
|
private |
Number of global coarse cells.
Definition at line 104 of file cell_id_translator.h.
|
private |
Number of global levels.
Definition at line 109 of file cell_id_translator.h.
|
private |
Offset of each level in the index space.
Definition at line 114 of file cell_id_translator.h.