Reference documentation for deal.II version 9.0.0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
TriaAccessor< 0, dim, spacedim > Class Template Reference

#include <deal.II/grid/tria_accessor.h>

Public Types

typedef void AccessorData
 

Public Member Functions

 TriaAccessor (const Triangulation< dim, spacedim > *tria, const unsigned int vertex_index)
 
 TriaAccessor (const Triangulation< dim, spacedim > *tria=nullptr, const int level=0, const int index=0, const AccessorData *=nullptr)
 
template<int structdim2, int dim2, int spacedim2>
 TriaAccessor (const TriaAccessor< structdim2, dim2, spacedim2 > &)
 
template<int structdim2, int dim2, int spacedim2>
 TriaAccessor (const InvalidAccessor< structdim2, dim2, spacedim2 > &)
 
IteratorState::IteratorStates state () const
 
int index () const
 
bool used () const
 
Advancement of iterators
void operator++ ()
 
void operator-- ()
 
bool operator== (const TriaAccessor &) const
 
bool operator!= (const TriaAccessor &) const
 
Geometric information about an object
double diameter () const
 
double extent_in_direction (const unsigned int axis) const
 
Point< spacedim > center (const bool respect_manifold=false, const bool interpolate_from_surrounding=false) const
 
double measure () const
 

Static Public Member Functions

static int level ()
 
Orientation of sub-objects
static bool face_orientation (const unsigned int face)
 Always return false.
 
static bool face_flip (const unsigned int face)
 Always return false.
 
static bool face_rotation (const unsigned int face)
 Always return false.
 
static bool line_orientation (const unsigned int line)
 Always return false.
 
Accessing children
static bool has_children ()
 
static unsigned int n_children ()
 
static unsigned int number_of_children ()
 
static unsigned int max_refinement_depth ()
 
static TriaIterator< TriaAccessor< 0, dim, spacedim > > child (const unsigned int)
 Return an invalid object.
 
static TriaIterator< TriaAccessor< 0, dim, spacedim > > isotropic_child (const unsigned int)
 Return an invalid object.
 
static RefinementCase< 0 > refinement_case ()
 
static int child_index (const unsigned int i)
 Returns -1.
 
static int isotropic_child_index (const unsigned int i)
 Returns -1.
 

Static Public Attributes

static const unsigned int space_dimension = spacedim
 
static const unsigned int dimension = dim
 
static const unsigned int structure_dimension = 0
 

Protected Member Functions

void copy_from (const TriaAccessor &)
 

Protected Attributes

const Triangulation< dim, spacedim > * tria
 
unsigned int global_vertex_index
 

Friends

template<typename Accessor >
class TriaRawIterator
 
template<typename Accessor >
class TriaIterator
 
template<typename Accessor >
class TriaActiveIterator
 

Accessing sub-objects

unsigned int vertex_index (const unsigned int i=0) const
 
Point< spacedim > & vertex (const unsigned int i=0) const
 
static typename ::internal::TriangulationImplementation::Iterators< dim, spacedim >::line_iterator line (const unsigned int)
 
static unsigned int line_index (const unsigned int i)
 
static typename ::internal::TriangulationImplementation::Iterators< dim, spacedim >::quad_iterator quad (const unsigned int i)
 
static unsigned int quad_index (const unsigned int i)
 

Detailed Description

template<int dim, int spacedim>
class TriaAccessor< 0, dim, spacedim >

This class is a specialization of TriaAccessor<structdim, dim, spacedim> for the case that structdim is zero. This class represents vertices in a triangulation of dimensionality dim (i.e. 1 for a triangulation of lines, 2 for a triangulation of quads, and 3 for a triangulation of hexes) that is embedded in a space of dimensionality spacedim (for spacedim==dim the triangulation represents a domain in \({\mathbb R}^\text{dim}\), for spacedim>dim the triangulation is of a manifold embedded in a higher dimensional space).

There is a further specialization of this class for the case that dim equals one, i.e., for vertices of a one-dimensional triangulation, since in that case vertices are also faces.

Author
Bruno Turcksin, 2015

Definition at line 1620 of file tria_accessor.h.

Member Typedef Documentation

◆ AccessorData

template<int dim, int spacedim>
typedef void TriaAccessor< 0, dim, spacedim >::AccessorData

Pointer to internal data.

Definition at line 1647 of file tria_accessor.h.

Constructor & Destructor Documentation

◆ TriaAccessor() [1/4]

template<int dim, int spacedim>
TriaAccessor< 0, dim, spacedim >::TriaAccessor ( const Triangulation< dim, spacedim > *  tria,
const unsigned int  vertex_index 
)

Constructor. The second argument is the global index of the vertex we point to.

◆ TriaAccessor() [2/4]

template<int dim, int spacedim>
TriaAccessor< 0, dim, spacedim >::TriaAccessor ( const Triangulation< dim, spacedim > *  tria = nullptr,
const int  level = 0,
const int  index = 0,
const AccessorData = nullptr 
)

Constructor. This constructor exists in order to maintain interface compatibility with the other accessor classes. index can be used to set the global index of the vertex we point to.

◆ TriaAccessor() [3/4]

template<int dim, int spacedim>
template<int structdim2, int dim2, int spacedim2>
TriaAccessor< 0, dim, spacedim >::TriaAccessor ( const TriaAccessor< structdim2, dim2, spacedim2 > &  )

Constructor. Should never be called and thus produces an error.

◆ TriaAccessor() [4/4]

template<int dim, int spacedim>
template<int structdim2, int dim2, int spacedim2>
TriaAccessor< 0, dim, spacedim >::TriaAccessor ( const InvalidAccessor< structdim2, dim2, spacedim2 > &  )

Constructor. Should never be called and thus produces an error.

Member Function Documentation

◆ state()

template<int dim, int spacedim>
IteratorState::IteratorStates TriaAccessor< 0, dim, spacedim >::state ( ) const

Return the state of the iterator.

◆ level()

template<int dim, int spacedim>
static int TriaAccessor< 0, dim, spacedim >::level ( )
static

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

◆ index()

template<int dim, int spacedim>
int TriaAccessor< 0, dim, spacedim >::index ( ) const

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

◆ operator++()

template<int dim, int spacedim>
void TriaAccessor< 0, dim, spacedim >::operator++ ( )

This operator advances the iterator to the next element.

◆ operator--()

template<int dim, int spacedim>
void TriaAccessor< 0, dim, spacedim >::operator-- ( )

This operator moves the iterator to the previous element.

◆ operator==()

template<int dim, int spacedim>
bool TriaAccessor< 0, dim, spacedim >::operator== ( const TriaAccessor< 0, dim, spacedim > &  ) const

Compare for equality.

◆ operator!=()

template<int dim, int spacedim>
bool TriaAccessor< 0, dim, spacedim >::operator!= ( const TriaAccessor< 0, dim, spacedim > &  ) const

Compare for inequality.

◆ vertex_index()

template<int dim, int spacedim>
unsigned int TriaAccessor< 0, dim, spacedim >::vertex_index ( const unsigned int  i = 0) const

Return the global index of i-th vertex of the current object. If i is zero, this returns the index of the current point to which this object refers. Otherwise, it throws an exception.

Note that the returned value is only the index of the geometrical vertex. It has nothing to do with possible degrees of freedom associated with it. For this, see the DoFAccessor::vertex_dof_index functions.

Note
Despite the name, the index returned here is only global in the sense that it is specific to a particular Triangulation object or, in the case the triangulation is actually of type parallel::distributed::Triangulation, specific to that part of the distributed triangulation stored on the current processor.

◆ vertex()

template<int dim, int spacedim>
Point<spacedim>& TriaAccessor< 0, dim, spacedim >::vertex ( const unsigned int  i = 0) const

Return a reference to the ith vertex. If i is zero, this returns a reference to the current point to which this object refers. Otherwise, it throws an exception.

◆ line()

template<int dim, int spacedim>
static typename ::internal::TriangulationImplementation::Iterators<dim,spacedim>::line_iterator TriaAccessor< 0, dim, spacedim >::line ( const unsigned  int)
static

Pointer to the ith line bounding this object. Will point to an invalid object.

◆ line_index()

template<int dim, int spacedim>
static unsigned int TriaAccessor< 0, dim, spacedim >::line_index ( const unsigned int  i)
static

Line index of the ith line bounding this object. Throws an exception.

◆ quad()

template<int dim, int spacedim>
static typename ::internal::TriangulationImplementation::Iterators<dim,spacedim>::quad_iterator TriaAccessor< 0, dim, spacedim >::quad ( const unsigned int  i)
static

Pointer to the ith quad bounding this object.

◆ quad_index()

template<int dim, int spacedim>
static unsigned int TriaAccessor< 0, dim, spacedim >::quad_index ( const unsigned int  i)
static

Quad index of the ith quad bounding this object. Throws an exception.

◆ diameter()

template<int dim, int spacedim>
double TriaAccessor< 0, dim, spacedim >::diameter ( ) const

Diameter of the object. This function always returns zero.

◆ extent_in_direction()

template<int dim, int spacedim>
double TriaAccessor< 0, dim, spacedim >::extent_in_direction ( const unsigned int  axis) const

Length of an object in the direction of the given axis, specified in the local coordinate system. See the documentation of GeometryInfo for the meaning and enumeration of the local axes.

This function always returns zero.

◆ center()

template<int dim, int spacedim>
Point<spacedim> TriaAccessor< 0, dim, spacedim >::center ( const bool  respect_manifold = false,
const bool  interpolate_from_surrounding = false 
) const

Return the center of this object, which of course coincides with the location of the vertex this object refers to. The parameters respect_manifold and interpolate_from_surrounding are not used. They are there to provide the same interface as TriaAccessor<structdim,dim,spacedim>.

◆ measure()

template<int dim, int spacedim>
double TriaAccessor< 0, dim, spacedim >::measure ( ) const

Compute the dim-dimensional measure of the object. For a dim-dimensional cell in dim-dimensional space, this equals its volume. On the other hand, for a 2d cell in 3d space, or if the current object pointed to is a 2d face of a 3d cell in 3d space, then the function computes the area the object occupies. For a one-dimensional object, return its length. For a zero-dimensional object, return zero.

◆ has_children()

template<int dim, int spacedim>
static bool TriaAccessor< 0, dim, spacedim >::has_children ( )
static

Test whether the object has children. Always false.

◆ n_children()

template<int dim, int spacedim>
static unsigned int TriaAccessor< 0, dim, spacedim >::n_children ( )
static

Return the number of immediate children of this object. This is always zero.

◆ number_of_children()

template<int dim, int spacedim>
static unsigned int TriaAccessor< 0, dim, spacedim >::number_of_children ( )
static

Compute and return the number of active descendants of this objects. Always zero.

◆ max_refinement_depth()

template<int dim, int spacedim>
static unsigned int TriaAccessor< 0, dim, spacedim >::max_refinement_depth ( )
static

Return the number of times that this object is refined. Always 0.

◆ refinement_case()

template<int dim, int spacedim>
static RefinementCase<0> TriaAccessor< 0, dim, spacedim >::refinement_case ( )
static

Always return no refinement.

◆ used()

template<int dim, int spacedim>
bool TriaAccessor< 0, dim, spacedim >::used ( ) const

Return whether the vertex pointed to here is used.

◆ copy_from()

template<int dim, int spacedim>
void TriaAccessor< 0, dim, spacedim >::copy_from ( const TriaAccessor< 0, dim, spacedim > &  )
protected

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.

Member Data Documentation

◆ space_dimension

template<int dim, int spacedim>
const unsigned int TriaAccessor< 0, dim, spacedim >::space_dimension = spacedim
static

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

◆ dimension

template<int dim, int spacedim>
const unsigned int TriaAccessor< 0, dim, spacedim >::dimension = dim
static

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

◆ structure_dimension

template<int dim, int spacedim>
const unsigned int TriaAccessor< 0, dim, spacedim >::structure_dimension = 0
static

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

◆ tria

template<int dim, int spacedim>
const Triangulation<dim,spacedim>* TriaAccessor< 0, dim, spacedim >::tria
protected

Pointer to the triangulation we operate on.

Definition at line 1942 of file tria_accessor.h.

◆ global_vertex_index

template<int dim, int spacedim>
unsigned int TriaAccessor< 0, dim, spacedim >::global_vertex_index
protected

The global vertex index of the vertex this object corresponds to.

Definition at line 1947 of file tria_accessor.h.


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