Reference documentation for deal.II version 9.2.0
|
#include <deal.II/base/geometry_info.h>
Public Member Functions | |
RefinementCase () | |
RefinementCase (const typename RefinementPossibilities< dim >::Possibilities refinement_case) | |
RefinementCase (const std::uint8_t refinement_case) | |
operator std::uint8_t () const | |
RefinementCase | operator| (const RefinementCase &r) const |
RefinementCase | operator& (const RefinementCase &r) const |
RefinementCase | operator~ () const |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Static Public Member Functions | |
static RefinementCase | cut_axis (const unsigned int i) |
static std::size_t | memory_consumption () |
static ::ExceptionBase & | ExcInvalidRefinementCase (int arg1) |
Private Attributes | |
std::uint8_t | value: (dim > 0 ? dim : 1) |
Additional Inherited Members | |
Public Types inherited from RefinementPossibilities< dim > | |
enum | Possibilities { no_refinement = 0, isotropic_refinement = 0xFF } |
A class storing the possible anisotropic and isotropic refinement cases of an object with dim
dimensions (for example, for a line dim=1
in whatever space dimension we are, for a quad dim=2
, etc.). Possible values of this class are the ones listed in the enumeration declared within the base class; see there for more information.
Definition at line 795 of file geometry_info.h.
RefinementCase< dim >::RefinementCase | ( | ) |
Default constructor. Initialize the refinement case with no_refinement.
RefinementCase< dim >::RefinementCase | ( | const typename RefinementPossibilities< dim >::Possibilities | refinement_case | ) |
Constructor. Take and store a value indicating a particular refinement from the list of possible refinements specified in the base class.
|
explicit |
Constructor. Take and store a value indicating a particular refinement as a bit field. To avoid implicit conversions to and from integral values, this constructor is marked as explicit.
RefinementCase< dim >::operator std::uint8_t | ( | ) | const |
Return the numeric value stored by this class. While the presence of this operator might seem dangerous, it is useful in cases where one would like to have code like switch (refinement_flag)... case RefinementCase<dim>::cut_x: ...
, which can be written as switch (static_cast<std::uint8_t>(refinement_flag)
. Another application is to use an object of the current type as an index into an array; however, this use is deprecated as it assumes a certain mapping from the symbolic flags defined in the RefinementPossibilities base class to actual numerical values (the array indices).
RefinementCase RefinementCase< dim >::operator| | ( | const RefinementCase< dim > & | r | ) | const |
Return the union of the refinement flags represented by the current object and the one given as argument.
RefinementCase RefinementCase< dim >::operator& | ( | const RefinementCase< dim > & | r | ) | const |
Return the intersection of the refinement flags represented by the current object and the one given as argument.
RefinementCase RefinementCase< dim >::operator~ | ( | ) | const |
Return the negation of the refinement flags represented by the current object. For example, in 2d, if the current object holds the flag cut_x
, then the returned value will be cut_y
; if the current value is isotropic_refinement
then the result will be no_refinement
; etc.
|
static |
Return the flag that corresponds to cutting a cell along the axis given as argument. For example, if i=0
then the returned value is RefinementPossibilities<dim>::cut_x
.
|
static |
Return the amount of memory occupied by an object of this type.
void RefinementCase< dim >::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
|
private |
Store the refinement case as a bit field with as many bits as are necessary in any given dimension.
Definition at line 891 of file geometry_info.h.