Reference documentation for deal.II version 9.5.0
|
#include <deal.II/base/geometry_info.h>
Public Types | |
enum | Possibilities : std::uint8_t { no_refinement = 0 , isotropic_refinement = 0xFF } |
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) |
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 789 of file geometry_info.h.
|
inherited |
Possible values for refinement cases in the current dimension.
Note the construction of the values: the lowest bit describes a cut of the x-axis, the second to lowest bit corresponds to a cut of the y-axis and the third to lowest bit corresponds to a cut of the z-axis. Thus, the following relations hold (among others):
Only those cuts that are reasonable in a given space dimension are offered, of course.
In addition, the tag isotropic_refinement
denotes isotropic refinement in the space dimension selected by the template argument of this class.
If you choose anisotropic refinement, for example by passing as argument to CellIterator::set_refine_flag() one of the flags RefinementCase::cut_x, RefinementCase::cut_y, RefinementCase::cut_z, or a combination of these, then keep in mind that refining in x-, y-, or z-direction happens with regard to the local coordinate system of the cell. In other words, these flags determine which edges and faces of the cell will be cut into new edges and faces. On the other hand, this process is independent of how the cell is oriented within the global coordinate system, and you should not assume any particular orientation of the cell's local coordinate system within the global coordinate system of the space it lives in.
Enumerator | |
---|---|
no_refinement | Do not perform refinement. |
isotropic_refinement | Perform isotropic refinement. This implies refining in all coordinate directions. For the current general template class – which is never used because there are specializations for the 1d, 2d, and 3d cases –, we simply set this number to a value that has all bits set. The specializations in RefinementPossibilities<1>, RefinementPossibilities<2>, and RefinementPossibilities<3> set the corresponding |
Definition at line 523 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 using the BOOST serialization library.
|
private |
Store the refinement case as a bit field with as many bits as are necessary in any given dimension.
Definition at line 887 of file geometry_info.h.