Reference documentation for deal.II version 9.5.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
internal::TriangulationImplementation::TriaObjectsOrientations Class Reference

#include <deal.II/grid/tria_objects_orientations.h>

Public Member Functions

 TriaObjectsOrientations ()
 
 TriaObjectsOrientations (const unsigned int n_objects)
 
unsigned int n_objects () const
 
void reinit (const unsigned int n_objects)
 
void resize (const unsigned int n_objects)
 
std::size_t memory_consumption () const
 
unsigned char get_combined_orientation (const unsigned int object) const
 
bool get_orientation (const unsigned int object) const
 
bool get_rotation (const unsigned int object) const
 
bool get_flip (const unsigned int object) const
 
void set_combined_orientation (const unsigned int object, const unsigned char value)
 
void set_orientation (const unsigned int object, const bool value)
 
void set_rotation (const unsigned int object, const bool value)
 
void set_flip (const unsigned int object, const bool value)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

unsigned int n_stored_objects
 
std::vector< unsigned char > flags
 

Detailed Description

Class storing orientation information for various objects in a Triangulation.

In deal.II, we express the orientation of an object with three Booleans: orientation, rotate, and flip. The default values for these are true, false, and false. These are represented either as individual booleans or as a 'combined' orientation: the combined format places orientation in the least significant bit, then rotate, then flip.

For a quadrilateral, these values correspond to

For a triangle, these values correspond to

Here, 'clockwise' is relative to the vector defined by the cross product of two lines in their standard orientation (which, e.g., points into the hexahedron for face 0 but out of the hexahedron for face 1).

For triangles, to enable indexing from the combined orientation, we do not consider flip-rotate or flip-orient-rotate as those cases are equivalent, respectively, to the identity operation or the orientation = true case as flip-rotate is equal to the identity operation. This choice ensures that the integer value of the combined orientation is in \([0, 5]\).

Definition at line 68 of file tria_objects_orientations.h.

Constructor & Destructor Documentation

◆ TriaObjectsOrientations() [1/2]

internal::TriangulationImplementation::TriaObjectsOrientations::TriaObjectsOrientations ( )
inline

Constructor.

Definition at line 181 of file tria_objects_orientations.h.

◆ TriaObjectsOrientations() [2/2]

internal::TriangulationImplementation::TriaObjectsOrientations::TriaObjectsOrientations ( const unsigned int  n_objects)
inline

Constructor. Sets up objects in the default orientation (orientation = true).

Definition at line 188 of file tria_objects_orientations.h.

Member Function Documentation

◆ n_objects()

unsigned int internal::TriangulationImplementation::TriaObjectsOrientations::n_objects ( ) const
inline

Return number of geometric objects stored by this class.

Definition at line 227 of file tria_objects_orientations.h.

◆ reinit()

void internal::TriangulationImplementation::TriaObjectsOrientations::reinit ( const unsigned int  n_objects)
inline

Reset the object to a default state.

Definition at line 197 of file tria_objects_orientations.h.

◆ resize()

void internal::TriangulationImplementation::TriaObjectsOrientations::resize ( const unsigned int  n_objects)
inline

Change the number of stored objects. New objects are constructed in the default orientation (true, false, false).

Definition at line 208 of file tria_objects_orientations.h.

◆ memory_consumption()

std::size_t internal::TriangulationImplementation::TriaObjectsOrientations::memory_consumption ( ) const
inline

Return the size of objects of this kind.

Definition at line 218 of file tria_objects_orientations.h.

◆ get_combined_orientation()

unsigned char internal::TriangulationImplementation::TriaObjectsOrientations::get_combined_orientation ( const unsigned int  object) const
inline

Get the combined orientation of the object, as described in the class documentation.

Definition at line 235 of file tria_objects_orientations.h.

◆ get_orientation()

bool internal::TriangulationImplementation::TriaObjectsOrientations::get_orientation ( const unsigned int  object) const
inline

Get the orientation bit of the object.

Definition at line 245 of file tria_objects_orientations.h.

◆ get_rotation()

bool internal::TriangulationImplementation::TriaObjectsOrientations::get_rotation ( const unsigned int  object) const
inline

Get the rotation bit of the object.

Definition at line 254 of file tria_objects_orientations.h.

◆ get_flip()

bool internal::TriangulationImplementation::TriaObjectsOrientations::get_flip ( const unsigned int  object) const
inline

Get the flip bit of the object.

Definition at line 263 of file tria_objects_orientations.h.

◆ set_combined_orientation()

void internal::TriangulationImplementation::TriaObjectsOrientations::set_combined_orientation ( const unsigned int  object,
const unsigned char  value 
)
inline

Set the combined orientation of the object, as described in the class documentation.

Definition at line 272 of file tria_objects_orientations.h.

◆ set_orientation()

void internal::TriangulationImplementation::TriaObjectsOrientations::set_orientation ( const unsigned int  object,
const bool  value 
)
inline

Set the orientation bit of the object.

Definition at line 282 of file tria_objects_orientations.h.

◆ set_rotation()

void internal::TriangulationImplementation::TriaObjectsOrientations::set_rotation ( const unsigned int  object,
const bool  value 
)
inline

Set the rotate bit of the object.

Definition at line 292 of file tria_objects_orientations.h.

◆ set_flip()

void internal::TriangulationImplementation::TriaObjectsOrientations::set_flip ( const unsigned int  object,
const bool  value 
)
inline

Set the flip bit of the object.

Definition at line 302 of file tria_objects_orientations.h.

◆ serialize()

template<class Archive >
void internal::TriangulationImplementation::TriaObjectsOrientations::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 using the BOOST serialization library.

Definition at line 313 of file tria_objects_orientations.h.

Member Data Documentation

◆ n_stored_objects

unsigned int internal::TriangulationImplementation::TriaObjectsOrientations::n_stored_objects
private

Number of objects.

Definition at line 171 of file tria_objects_orientations.h.

◆ flags

std::vector<unsigned char> internal::TriangulationImplementation::TriaObjectsOrientations::flags
private

Flags.

Definition at line 176 of file tria_objects_orientations.h.


The documentation for this class was generated from the following file: