Reference documentation for deal.II version 9.3.3
\(\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\}}\)
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
DoFInvalidAccessor< structdim, dim, spacedim > Class Template Reference

#include <deal.II/dofs/dof_accessor.h>

Inheritance diagram for DoFInvalidAccessor< structdim, dim, spacedim >:
[legend]

Public Types

using AccessorData = typename InvalidAccessor< structdim, dim, spacedim >::AccessorData
 
using LocalData = void *
 

Public Member Functions

 DoFInvalidAccessor (const Triangulation< dim, spacedim > *parent=0, const int level=-1, const int index=-1, const AccessorData *local_data=0)
 
 DoFInvalidAccessor (const DoFInvalidAccessor< structdim, dim, spacedim > &)
 
template<typename OtherAccessor >
 DoFInvalidAccessor (const OtherAccessor &)
 
types::global_dof_index dof_index (const unsigned int i, const unsigned int fe_index=DoFHandler< dim, spacedim >::default_fe_index) const
 
void set_dof_index (const unsigned int i, const types::global_dof_index index, const unsigned int fe_index=DoFHandler< dim, spacedim >::invalid_fe_index) const
 
void copy_from (const InvalidAccessor &)
 
bool operator== (const InvalidAccessor &) const
 
bool operator!= (const InvalidAccessor &) const
 
void operator++ () const
 
void operator-- () const
 
bool used () const
 
bool has_children () const
 
types::manifold_id manifold_id () const
 
unsigned int user_index () const
 
void set_user_index (const unsigned int p) const
 
void set_manifold_id (const types::manifold_id) const
 
Point< spacedim > & vertex (const unsigned int i) const
 
typename::internal::TriangulationImplementation::Iterators< dim, spacedim >::line_iterator line (const unsigned int i) const
 
typename::internal::TriangulationImplementation::Iterators< dim, spacedim >::quad_iterator quad (const unsigned int i) const
 
Iterator address and state
int level () const
 
int index () const
 
IteratorState::IteratorStates state () const
 
const Triangulation< dim, spacedim > & get_triangulation () const
 

Static Public Attributes

static const unsigned int space_dimension
 
static const unsigned int dimension
 
static const unsigned int structure_dimension
 

Protected Member Functions

void copy_from (const TriaAccessorBase &)
 
bool operator== (const TriaAccessorBase &) const
 
bool operator!= (const TriaAccessorBase &) const
 
bool operator< (const TriaAccessorBase &other) const
 
::internal::TriangulationImplementation::TriaObjectsobjects () const
 
Advancement of iterators
void operator++ ()
 
void operator-- ()
 

Protected Attributes

typename::internal::TriaAccessorImplementation::PresentLevelType< structdim, dim >::type present_level
 
int present_index
 
const Triangulation< dim, spacedim > * tria
 

Detailed Description

template<int structdim, int dim, int spacedim = dim>
class DoFInvalidAccessor< structdim, dim, spacedim >

A class that represents DoF accessor objects to iterators that don't make sense such as quad iterators in on 1d meshes. This class can not be used to create objects (it will in fact throw an exception if this should ever be attempted but it sometimes allows code to be written in a simpler way in a dimension independent way. For example, it allows to write code that works on quad iterators that is dimension independent – i.e., also compiles in 1d – because quad iterators (via the current class) exist and are syntactically correct. You can not expect, however, to ever create an actual object of one of these iterators in 1d, meaning you need to expect to wrap the code block in which you use quad iterators into something like if (dim>1) – which makes eminent sense anyway.

This class provides the minimal interface necessary for Accessor classes to interact with Iterator classes. However, this is only for syntactic correctness, none of the functions do anything but generate errors.

Definition at line 1293 of file dof_accessor.h.

Member Typedef Documentation

◆ AccessorData

template<int structdim, int dim, int spacedim = dim>
using DoFInvalidAccessor< structdim, dim, spacedim >::AccessorData = typename InvalidAccessor<structdim, dim, spacedim>::AccessorData

Propagate alias from base class to this class.

Definition at line 1299 of file dof_accessor.h.

◆ LocalData

using TriaAccessorBase< structdim, dim, spacedim >::LocalData = void *
inherited

Data type to be used for passing parameters from iterators to the accessor classes in a unified way, no matter what the type of number of these parameters is.

Definition at line 441 of file tria_accessor.h.

Constructor & Destructor Documentation

◆ DoFInvalidAccessor() [1/3]

template<int structdim, int dim, int spacedim>
DoFInvalidAccessor< structdim, dim, spacedim >::DoFInvalidAccessor ( const Triangulation< dim, spacedim > *  parent = 0,
const int  level = -1,
const int  index = -1,
const AccessorData local_data = 0 
)

Constructor. This class is used for iterators that do not make sense in a given dimension, for example quads for 1d meshes. Consequently, while the creation of such objects is syntactically valid, they make no semantic sense, and we generate an exception when such an object is actually generated.

Definition at line 46 of file dof_accessor.cc.

◆ DoFInvalidAccessor() [2/3]

template<int structdim, int dim, int spacedim>
DoFInvalidAccessor< structdim, dim, spacedim >::DoFInvalidAccessor ( const DoFInvalidAccessor< structdim, dim, spacedim > &  i)

Copy constructor. This class is used for iterators that do not make sense in a given dimension, for example quads for 1d meshes. Consequently, while the creation of such objects is syntactically valid, they make no semantic sense, and we generate an exception when such an object is actually generated.

Definition at line 63 of file dof_accessor.cc.

◆ DoFInvalidAccessor() [3/3]

template<int structdim, int dim, int spacedim>
template<typename OtherAccessor >
DoFInvalidAccessor< structdim, dim, spacedim >::DoFInvalidAccessor ( const OtherAccessor &  )

Conversion from other accessors to the current invalid one. This of course also leads to a run-time error.

Definition at line 2162 of file dof_accessor.h.

Member Function Documentation

◆ dof_index()

template<int structdim, int dim, int spacedim>
types::global_dof_index DoFInvalidAccessor< structdim, dim, spacedim >::dof_index ( const unsigned int  i,
const unsigned int  fe_index = DoFHandler<dim, spacedim>::default_fe_index 
) const

Return the index of the ith degree of freedom of this object to index. Since the current object doesn't point to anything useful, like all other functions in this class this function only throws an exception.

Definition at line 80 of file dof_accessor.cc.

◆ set_dof_index()

template<int structdim, int dim, int spacedim>
void DoFInvalidAccessor< structdim, dim, spacedim >::set_dof_index ( const unsigned int  i,
const types::global_dof_index  index,
const unsigned int  fe_index = DoFHandler<dim, spacedim>::invalid_fe_index 
) const

Set the index of the ith degree of freedom of this object to index. Since the current object doesn't point to anything useful, like all other functions in this class this function only throws an exception.

Definition at line 92 of file dof_accessor.cc.

◆ copy_from() [1/2]

void InvalidAccessor< structdim, dim, spacedim >::copy_from ( const InvalidAccessor< structdim, dim, dim > &  )
inherited

Dummy copy operation.

◆ copy_from() [2/2]

void TriaAccessorBase< structdim, dim, spacedim >::copy_from ( const TriaAccessorBase< structdim, dim, spacedim > &  )
protectedinherited

Copy operator. Since this is only called from iterators, do not return anything, since the iterator will return itself.

This method is protected, since it is only to be called from the iterator class.

◆ operator==() [1/2]

bool InvalidAccessor< structdim, dim, spacedim >::operator== ( const InvalidAccessor< structdim, dim, dim > &  ) const
inherited

Dummy comparison operators.

◆ operator==() [2/2]

bool TriaAccessorBase< structdim, dim, spacedim >::operator== ( const TriaAccessorBase< structdim, dim, spacedim > &  ) const
protectedinherited

Compare for equality.

◆ operator!=() [1/2]

bool InvalidAccessor< structdim, dim, spacedim >::operator!= ( const InvalidAccessor< structdim, dim, dim > &  ) const
inherited

◆ operator!=() [2/2]

bool TriaAccessorBase< structdim, dim, spacedim >::operator!= ( const TriaAccessorBase< structdim, dim, spacedim > &  ) const
protectedinherited

Compare for inequality.

◆ operator++() [1/2]

void InvalidAccessor< structdim, dim, spacedim >::operator++ ( ) const
inherited

Dummy operators to make things compile. Does nothing.

◆ operator++() [2/2]

void TriaAccessorBase< structdim, dim, spacedim >::operator++ ( )
protectedinherited

This operator advances the iterator to the next element.

For dim=1 only: The next element is next on this level if there are more. If the present element is the last on this level, the first on the next level is accessed.

◆ operator--() [1/2]

void InvalidAccessor< structdim, dim, spacedim >::operator-- ( ) const
inherited

◆ operator--() [2/2]

void TriaAccessorBase< structdim, dim, spacedim >::operator-- ( )
protectedinherited

This operator moves the iterator to the previous element.

For dim=1 only: The previous element is previous on this level if index>0. If the present element is the first on this level, the last on the previous level is accessed.

◆ used()

bool InvalidAccessor< structdim, dim, spacedim >::used ( ) const
inherited

Dummy function representing whether the accessor points to a used or an unused object.

◆ has_children()

bool InvalidAccessor< structdim, dim, spacedim >::has_children ( ) const
inherited

Dummy function representing whether the accessor points to an object that has children.

◆ manifold_id()

types::manifold_id InvalidAccessor< structdim, dim, spacedim >::manifold_id ( ) const
inherited

Dummy function that always returns numbers::flat_manifold_id.

◆ user_index()

unsigned int InvalidAccessor< structdim, dim, spacedim >::user_index ( ) const
inherited

Dummy function that always returns numbers::invalid_unsigned_int.

◆ set_user_index()

void InvalidAccessor< structdim, dim, spacedim >::set_user_index ( const unsigned int  p) const
inherited

Dummy function that always throws.

◆ set_manifold_id()

void InvalidAccessor< structdim, dim, spacedim >::set_manifold_id ( const types::manifold_id  ) const
inherited

Dummy function that always throws.

◆ vertex()

Point< spacedim > & InvalidAccessor< structdim, dim, spacedim >::vertex ( const unsigned int  i) const
inherited

Dummy function to extract vertices. Returns the origin.

◆ line()

typename::internal::TriangulationImplementation::Iterators< dim, spacedim >::line_iterator InvalidAccessor< structdim, dim, spacedim >::line ( const unsigned int  i) const
inherited

Dummy function to extract lines. Returns a default-constructed line iterator.

◆ quad()

typename::internal::TriangulationImplementation::Iterators< dim, spacedim >::quad_iterator InvalidAccessor< structdim, dim, spacedim >::quad ( const unsigned int  i) const
inherited

Dummy function to extract quads. Returns a default-constructed quad iterator.

◆ operator<()

bool TriaAccessorBase< structdim, dim, spacedim >::operator< ( const TriaAccessorBase< structdim, dim, spacedim > &  other) const
protectedinherited

Comparison operator for accessors. This operator is used when comparing iterators into objects of a triangulation, for example when putting them into a std::map.

If structure_dimension is less than dimension, we simply compare the index of such an object because faces and edges do not have levels. If structure_dimension equals dimension, we compare the level first, and the index only if levels are equal.

◆ objects()

::internal::TriangulationImplementation::TriaObjects & TriaAccessorBase< structdim, dim, spacedim >::objects ( ) const
protectedinherited

Access to the other objects of a Triangulation with same dimension.

◆ level()

int TriaAccessorBase< structdim, dim, spacedim >::level ( ) const
inherited

For cells, this function returns the level within the mesh hierarchy at which this cell is located. For all other objects, the function returns zero.

Note
Within a Triangulation object, cells are uniquely identified by a pair (level, index) where the former is the cell's refinement level and the latter is the index of the cell within this refinement level (the former being what this function returns). Consequently, there may be multiple cells on different refinement levels but with the same index within their level. Contrary to this, if the current object corresponds to a face or edge, then the object is uniquely identified solely by its index as faces and edges do not have a refinement level. For these objects, the current function always returns zero as the level.

◆ index()

int TriaAccessorBase< structdim, dim, spacedim >::index ( ) const
inherited

Return the index of the element presently pointed to on the present level.

Within a Triangulation object, cells are uniquely identified by a pair (level, index) where the former is the cell's refinement level and the latter is the index of the cell within this refinement level (the latter being what this function returns). Consequently, there may be multiple cells on different refinement levels but with the same index within their level. Contrary to this, if the current object corresponds to a face or edge, then the object is uniquely identified solely by its index as faces and edges do not have a refinement level.

Note
The indices objects returned by this function are not a contiguous set of numbers on each level: going from cell to cell, some of the indices in a level may be unused.
If the triangulation is actually of type parallel::distributed::Triangulation then the indices are relatively only to that part of the distributed triangulation that is stored on the current processor. In other words, cells living in the partitions of the triangulation stored on different processors may have the same index even if they refer to the same cell, and the may have different indices even if they do refer to the same cell (e.g., if a cell is owned by one processor but is a ghost cell on another).

◆ state()

IteratorState::IteratorStates TriaAccessorBase< structdim, dim, spacedim >::state ( ) const
inherited

Return the state of the iterator. For the different states an accessor can be in, refer to the TriaRawIterator documentation.

◆ get_triangulation()

const Triangulation< dim, spacedim > & TriaAccessorBase< structdim, dim, spacedim >::get_triangulation ( ) const
inherited

Return a reference to the triangulation which the object pointed to by this class belongs to.

Member Data Documentation

◆ space_dimension

const unsigned int TriaAccessorBase< structdim, dim, spacedim >::space_dimension
staticinherited

Dimension of the space the object represented by this accessor lives in. For example, if this accessor represents a quad that is part of a two- dimensional surface in four-dimensional space, then this value is four.

Definition at line 309 of file tria_accessor.h.

◆ dimension

const unsigned int TriaAccessorBase< structdim, dim, spacedim >::dimension
staticinherited

Dimensionality of the object that the thing represented by this accessor is part of. For example, if this accessor represents a line that is part of a hexahedron, then this value will be three.

Definition at line 316 of file tria_accessor.h.

◆ structure_dimension

const unsigned int TriaAccessorBase< structdim, dim, spacedim >::structure_dimension
staticinherited

Dimensionality of the current object represented by this accessor. For example, if it is line (irrespective of whether it is part of a quad or hex, and what dimension we are in), then this value equals 1.

Definition at line 323 of file tria_accessor.h.

◆ present_level

typename::internal::TriaAccessorImplementation::PresentLevelType<structdim,dim>::type TriaAccessorBase< structdim, dim, spacedim >::present_level
protectedinherited

The level if this is a cell (structdim==dim). Else, contains zero.

Definition at line 521 of file tria_accessor.h.

◆ present_index

int TriaAccessorBase< structdim, dim, spacedim >::present_index
protectedinherited

Used to store the index of the element presently pointed to on the level presently used.

Definition at line 527 of file tria_accessor.h.

◆ tria

const Triangulation<dim, spacedim>* TriaAccessorBase< structdim, dim, spacedim >::tria
protectedinherited

Pointer to the triangulation which we act on.

Definition at line 532 of file tria_accessor.h.


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