Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
RefinementCase< dim > Class Template Reference

#include <deal.II/base/geometry_info.h>

Inheritance diagram for RefinementCase< dim >:
[legend]

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 ::ExceptionBaseExcInvalidRefinementCase (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 }
 

Detailed Description

template<int dim>
class RefinementCase< dim >

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.

Author
Ralf Hartmann, 2005, Wolfgang Bangerth, 2007

Definition at line 620 of file geometry_info.h.

Constructor & Destructor Documentation

◆ RefinementCase() [1/3]

template<int dim>
RefinementCase< dim >::RefinementCase ( )

Default constructor. Initialize the refinement case with no_refinement.

◆ RefinementCase() [2/3]

template<int dim>
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.

◆ RefinementCase() [3/3]

template<int dim>
RefinementCase< dim >::RefinementCase ( const std::uint8_t  refinement_case)
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.

Member Function Documentation

◆ operator std::uint8_t()

template<int dim>
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).

◆ operator|()

template<int dim>
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.

◆ operator &()

template<int dim>
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.

◆ operator~()

template<int dim>
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.

◆ cut_axis()

template<int dim>
static RefinementCase RefinementCase< dim >::cut_axis ( const unsigned int  i)
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.

◆ memory_consumption()

template<int dim>
static std::size_t RefinementCase< dim >::memory_consumption ( )
static

Return the amount of memory occupied by an object of this type.

◆ serialize()

template<int dim>
template<class Archive >
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

Member Data Documentation

◆ value

template<int dim>
std::uint8_t RefinementCase< dim >::value
private

Store the refinement case as a bit field with as many bits as are necessary in any given dimension.

Definition at line 716 of file geometry_info.h.


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