Reference documentation for deal.II version 9.6.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
DoFInvalidAccessor< structdim, dim, spacedim > Class Template Reference

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

Inheritance diagram for DoFInvalidAccessor< structdim, dim, spacedim >:

Public Types

using AccessorData
 

Public Member Functions

 DoFInvalidAccessor (const void *parent=nullptr, const int level=-1, const int index=-1, const AccessorData *local_data=nullptr)
 
 DoFInvalidAccessor (const DoFInvalidAccessor< structdim, dim, spacedim > &)
 
template<typename OtherAccessor >
 DoFInvalidAccessor (const OtherAccessor &)
 
types::global_dof_index dof_index (const unsigned int i, const types::fe_index fe_index=DoFHandler< dim, spacedim >::default_fe_index) const
 
void set_dof_index (const unsigned int i, const types::global_dof_index index, const types::fe_index fe_index=numbers::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
 
void * line (const unsigned int i) const
 
void * quad (const unsigned int i) const
 

Static Public Member Functions

static IteratorState::IteratorStates state ()
 
static int level ()
 
static int index ()
 

Static Public Attributes

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

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 1246 of file dof_accessor.h.

Member Typedef Documentation

◆ AccessorData

template<int structdim, int dim, int spacedim = dim>
using DoFInvalidAccessor< structdim, dim, spacedim >::AccessorData
Initial value:

Propagate alias from base class to this class.

Definition at line 1252 of file dof_accessor.h.

Constructor & Destructor Documentation

◆ DoFInvalidAccessor() [1/3]

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

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 43 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 60 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 2129 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 types::fe_index 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 77 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 types::fe_index fe_index = numbers::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 89 of file dof_accessor.cc.

◆ copy_from()

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

Dummy copy operation.

◆ operator==()

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

Dummy comparison operators.

◆ operator!=()

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

◆ operator++()

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

Dummy operators to make things compile. Does nothing.

◆ operator--()

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

◆ state()

IteratorState::IteratorStates InvalidAccessor< structdim, dim, spacedim >::state ( )
staticinherited

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

Definition at line 660 of file tria_accessor.cc.

◆ level()

int InvalidAccessor< structdim, dim, spacedim >::level ( )
staticinherited

Level of this object. Vertices have no level, so this function always returns zero.

Definition at line 668 of file tria_accessor.cc.

◆ index()

int InvalidAccessor< structdim, dim, spacedim >::index ( )
staticinherited

Index of this object. Returns the global index of the vertex this object points to.

Definition at line 675 of file tria_accessor.cc.

◆ 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()

void * InvalidAccessor< structdim, dim, spacedim >::line ( const unsigned int i) const
inherited

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

◆ quad()

void * InvalidAccessor< structdim, dim, spacedim >::quad ( const unsigned int i) const
inherited

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

Member Data Documentation

◆ space_dimension

unsigned int InvalidAccessor< structdim, dim, spacedim >::space_dimension
staticconstexprinherited

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

Definition at line 582 of file tria_accessor.h.

◆ dimension

unsigned int InvalidAccessor< structdim, dim, spacedim >::dimension
staticconstexprinherited

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 589 of file tria_accessor.h.

◆ structure_dimension

const unsigned int InvalidAccessor< 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 2d or 3d subobject), then this value equals 1.

Definition at line 596 of file tria_accessor.h.


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