Reference documentation for deal.II version 9.2.0
|
#include <deal.II/grid/tria_accessor.h>
Classes | |
struct | BoundaryOrMaterialId |
struct | UserData |
Public Member Functions | |
TriaObjects () | |
void | reserve_space (const unsigned int new_objs_in_pairs, const unsigned int new_objs_single=0) |
template<int dim, int spacedim> | |
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > | next_free_single_object (const Triangulation< dim, spacedim > &tria) |
template<int dim, int spacedim> | |
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > | next_free_pair_object (const Triangulation< dim, spacedim > &tria) |
template<int dim, int spacedim> | |
Triangulation< dim, spacedim >::raw_hex_iterator | next_free_hex (const Triangulation< dim, spacedim > &tria, const unsigned int level) |
void | clear () |
bool | face_orientation (const unsigned int cell, const unsigned int face) const |
void *& | user_pointer (const unsigned int i) |
const void * | user_pointer (const unsigned int i) const |
unsigned int & | user_index (const unsigned int i) |
unsigned int | user_index (const unsigned int i) const |
void | clear_user_data (const unsigned int i) |
void | clear_user_data () |
void | clear_user_flags () |
void | monitor_memory (const unsigned int true_dimension) const |
std::size_t | memory_consumption () const |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
template<int dim, int spacedim> | |
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > | next_free_single_object (const Triangulation< dim, spacedim > &tria) |
template<int dim, int spacedim> | |
::TriaRawIterator<::TriaAccessor< G::dimension, dim, spacedim > > | next_free_pair_object (const Triangulation< dim, spacedim > &tria) |
void | monitor_memory (const unsigned int) const |
typename::Triangulation< dim, spacedim >::raw_hex_iterator | next_free_hex (const ::Triangulation< dim, spacedim > &tria, const unsigned int level) |
void | monitor_memory (const unsigned int) const |
void | monitor_memory (const unsigned int) const |
Static Public Member Functions | |
static ::ExceptionBase & | ExcMemoryInexact (int arg1, int arg2) |
static ::ExceptionBase & | ExcPointerIndexClash () |
Public Attributes | |
std::vector< G > | cells |
std::vector< int > | children |
std::vector< RefinementCase< G::dimension > > | refinement_cases |
std::vector< bool > | used |
std::vector< bool > | user_flags |
std::vector< BoundaryOrMaterialId > | boundary_or_material_id |
std::vector< types::manifold_id > | manifold_id |
Protected Types | |
enum | UserDataType { data_unknown, data_pointer, data_index } |
Protected Attributes | |
unsigned int | next_free_single |
unsigned int | next_free_pair |
bool | reverse_order_next_free_single |
std::vector< UserData > | user_data |
UserDataType | user_data_type |
General template for information belonging to the geometrical objects of a triangulation, i.e. lines, quads, hexahedra... Apart from the vector of objects additional information is included, namely vectors indicating the children, the used-status, user-flags, material-ids..
Objects of these classes are included in the TriaLevel and TriaFaces classes.
Definition at line 58 of file tria_accessor.h.
|
protected |
Enum describing the possible types of userdata.
Enumerator | |
---|---|
data_unknown | No userdata used yet. |
data_pointer | UserData contains pointers. |
data_index | UserData contains indices. |
Definition at line 393 of file tria_objects.h.
|
inline |
Constructor resetting some data.
Definition at line 679 of file tria_objects.h.
void internal::TriangulationImplementation::TriaObjects< G >::reserve_space | ( | const unsigned int | new_objs_in_pairs, |
const unsigned int | new_objs_single = 0 |
||
) |
Assert that enough space is allocated to accommodate new_objs_in_pairs
new objects, stored in pairs, plus new_obj_single
stored individually. This function does not only call vector::reserve()
, but does really append the needed elements.
In 2D e.g. refined lines have to be stored in pairs, whereas new lines in the interior of refined cells can be stored as single lines.
Definition at line 36 of file tria_objects.cc.
::TriaRawIterator<::TriaAccessor<G::dimension, dim, spacedim> > internal::TriangulationImplementation::TriaObjects< G >::next_free_single_object | ( | const Triangulation< dim, spacedim > & | tria | ) |
Return an iterator to the next free slot for a single object. This function is only used by Triangulation::execute_refinement() in 3D.
::TriaRawIterator<::TriaAccessor<G::dimension, dim, spacedim> > internal::TriangulationImplementation::TriaObjects< G >::next_free_pair_object | ( | const Triangulation< dim, spacedim > & | tria | ) |
Return an iterator to the next free slot for a pair of objects. This function is only used by Triangulation::execute_refinement() in 3D.
Triangulation<dim, spacedim>::raw_hex_iterator internal::TriangulationImplementation::TriaObjects< G >::next_free_hex | ( | const Triangulation< dim, spacedim > & | tria, |
const unsigned int | level | ||
) |
Return an iterator to the next free slot for a pair of hexes. Only implemented for G=Hexahedron
.
void internal::TriangulationImplementation::TriaObjects< G >::clear |
Clear all the data contained in this object.
Definition at line 390 of file tria_objects.cc.
|
inline |
The orientation of the face number face
of the cell with number cell
. The return value is true
, if the normal vector points the usual way (GeometryInfo::unit_normal_orientation) and false
else.
The result is always true
in this class, but derived classes will reimplement this.
Definition at line 623 of file tria_objects.h.
|
inline |
Access to user pointers.
Definition at line 632 of file tria_objects.h.
|
inline |
Read-only access to user pointers.
Definition at line 645 of file tria_objects.h.
|
inline |
Access to user indices.
Definition at line 658 of file tria_objects.h.
|
inline |
Read-only access to user pointers.
Definition at line 689 of file tria_objects.h.
|
inline |
Reset user data to zero.
Definition at line 671 of file tria_objects.h.
|
inline |
Clear all user pointers or indices and reset their type, such that the next access may be either or.
Definition at line 702 of file tria_objects.h.
|
inline |
Clear all user flags.
Definition at line 712 of file tria_objects.h.
void internal::TriangulationImplementation::TriaObjects< G >::monitor_memory | ( | const unsigned int | true_dimension | ) | const |
Check the memory consistency of the different containers. Should only be called with the preprocessor flag DEBUG
set. The function should be called from the functions of the higher TriaLevel classes.
std::size_t internal::TriangulationImplementation::TriaObjects< G >::memory_consumption |
Determine an estimate for the memory consumption (in bytes) of this object.
Definition at line 424 of file tria_objects.cc.
void internal::TriangulationImplementation::TriaObjects< G >::serialize | ( | Archive & | ar, |
const unsigned int | version | ||
) |
Read or write the data of this object to or from a stream for the purpose of serialization
Definition at line 732 of file tria_objects.h.
::TriaRawIterator<::TriaAccessor<G::dimension, dim, spacedim> > internal::TriangulationImplementation::TriaObjects< G >::next_free_single_object | ( | const Triangulation< dim, spacedim > & | tria | ) |
Definition at line 794 of file tria_objects.h.
::TriaRawIterator<::TriaAccessor<G::dimension, dim, spacedim> > internal::TriangulationImplementation::TriaObjects< G >::next_free_pair_object | ( | const Triangulation< dim, spacedim > & | tria | ) |
Definition at line 847 of file tria_objects.h.
void internal::TriangulationImplementation::TriaObjects< TriaObject< 2 > >::monitor_memory | ( | const unsigned int | ) | const |
typename::Triangulation< dim, spacedim >::raw_hex_iterator internal::TriangulationImplementation::TriaObjects< TriaObject< 3 > >::next_free_hex | ( | const ::Triangulation< dim, spacedim > & | tria, |
const unsigned int | level | ||
) |
Definition at line 141 of file tria_objects.cc.
void internal::TriangulationImplementation::TriaObjects< TriaObject< 1 > >::monitor_memory | ( | const unsigned int | ) | const |
Definition at line 306 of file tria_objects.cc.
void internal::TriangulationImplementation::TriaObjects< TriaObject< 2 > >::monitor_memory | ( | const unsigned int | ) | const |
Definition at line 325 of file tria_objects.cc.
std::vector<G> internal::TriangulationImplementation::TriaObjects< G >::cells |
Vector of the objects belonging to this level. The index of the object equals the index in this container.
Definition at line 81 of file tria_objects.h.
std::vector<int> internal::TriangulationImplementation::TriaObjects< G >::children |
Index of the even children of an object. Since when objects are refined, all children are created at the same time, they are appended to the list at least in pairs after each other. We therefore only store the index of the even children, the uneven follow immediately afterwards.
If an object has no children, -1 is stored in this list. An object is called active if it has no children. The function TriaAccessorBase::has_children() tests for this.
Definition at line 94 of file tria_objects.h.
std::vector<RefinementCase<G::dimension> > internal::TriangulationImplementation::TriaObjects< G >::refinement_cases |
Store the refinement case each of the cells is refined with. This vector might be replaced by vector<vector<bool> > (dim, vector<bool> (n_cells)) which is more memory efficient.
Definition at line 101 of file tria_objects.h.
std::vector<bool> internal::TriangulationImplementation::TriaObjects< G >::used |
Vector storing whether an object is used in the cells
vector.
Since it is difficult to delete elements in a vector
, when an element is not needed any more (e.g. after derefinement), it is not deleted from the list, but rather the according used
flag is set to false
.
Definition at line 111 of file tria_objects.h.
std::vector<bool> internal::TriangulationImplementation::TriaObjects< G >::user_flags |
Make available a field for user data, one bit per object. This field is usually used when an operation runs over all cells and needs information whether another cell (e.g. a neighbor) has already been processed.
You can clear all used flags using Triangulation::clear_user_flags().
Definition at line 122 of file tria_objects.h.
std::vector<BoundaryOrMaterialId> internal::TriangulationImplementation::TriaObjects< G >::boundary_or_material_id |
Store boundary and material data. For example, in one dimension, this field stores the material id of a line, which is a number between 0 and numbers::invalid_material_id-1. In more than one dimension, lines have no material id, but they may be at the boundary; then, we store the boundary indicator in this field, which denotes to which part of the boundary this line belongs and which boundary conditions hold on this part. The boundary indicator also is a number between zero and numbers::internal_face_boundary_id-1; the id numbers::internal_face_boundary_id is reserved for lines in the interior and may be used to check whether a line is at the boundary or not, which otherwise is not possible if you don't know which cell it belongs to.
Definition at line 172 of file tria_objects.h.
std::vector<types::manifold_id> internal::TriangulationImplementation::TriaObjects< G >::manifold_id |
Store manifold ids. This field stores the manifold id of each object, which is a number between 0 and numbers::flat_manifold_id-1.
Definition at line 178 of file tria_objects.h.
|
protected |
Counter for next_free_single_* functions
Definition at line 346 of file tria_objects.h.
|
protected |
Counter for next_free_pair_* functions
Definition at line 351 of file tria_objects.h.
|
protected |
Bool flag for next_free_single_* functions
Definition at line 356 of file tria_objects.h.
|
protected |
Pointer which is not used by the library but may be accessed and set by the user to handle data local to a line/quad/etc.
Definition at line 408 of file tria_objects.h.
|
mutableprotected |
In order to avoid confusion between user pointers and indices, this enum is set by the first function accessing either and subsequent access will not be allowed to change the type of data accessed.
Definition at line 415 of file tria_objects.h.