Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
TriaAccessor< 0, 1, spacedim > Class Template Reference

#include <tria_accessor.h>

Inheritance diagram for TriaAccessor< 0, 1, spacedim >:
[legend]

Public Types

enum  VertexKind { left_vertex, interior_vertex, right_vertex }
 
typedef void AccessorData
 

Public Member Functions

 TriaAccessor (const Triangulation< 1, spacedim > *tria, const VertexKind vertex_kind, const unsigned int vertex_index)
 
 TriaAccessor (const Triangulation< 1, spacedim > *tria=0, const int=0, const int=0, const AccessorData *=0)
 
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 > &)
 
void copy_from (const TriaAccessor &)
 
int index () const
 
bool at_boundary () const
 
types::boundary_id boundary_indicator () const
 
bool used () const
 
Advancement of iterators
void operator++ () const
 
void operator-- () const
 
bool operator== (const TriaAccessor &) const
 
bool operator!= (const TriaAccessor &) const
 
Dealing with boundary indicators
void set_boundary_indicator (const types::boundary_id)
 
void set_all_boundary_indicators (const types::boundary_id)
 

Static Public Member Functions

static
IteratorState::IteratorStates 
state ()
 
static int level ()
 
static int parent_index ()
 
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, 1, spacedim > > 
child (const unsigned int)
 Return an invalid object.
 
static TriaIterator
< TriaAccessor< 0, 1, 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 = 1
 
static const unsigned int structure_dimension = 0
 

Protected Attributes

const Triangulation
< 1, spacedim > * 
tria
 
VertexKind vertex_kind
 
unsigned int global_vertex_index
 

Accessing sub-objects

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

Detailed Description

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

A class that represents an access to a face in 1d – i.e. to a point. This is not a full fledged access from which you can build an iterator: for example, you can't iterate from one such point to the next. Point also don't have children, and they don't have neighbors.

Author
Wolfgang Bangerth, 2010

Definition at line 1702 of file tria_accessor.h.

Member Typedef Documentation

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

Pointer to internal data.

Definition at line 1744 of file tria_accessor.h.

Member Enumeration Documentation

template<int spacedim>
enum TriaAccessor< 0, 1, spacedim >::VertexKind

Whether the vertex represented here is at the left end of the domain, the right end, or in the interior.

Definition at line 1752 of file tria_accessor.h.

Constructor & Destructor Documentation

template<int spacedim>
TriaAccessor< 0, 1, spacedim >::TriaAccessor ( const Triangulation< 1, spacedim > *  tria,
const VertexKind  vertex_kind,
const unsigned int  vertex_index 
)
inline

Constructor.

Since there is no mapping from vertices to cells, an accessor object for a point has no way to figure out whether it is at the boundary of the domain or not. Consequently, the second argument must be passed by the object that generates this accessor – e.g. a 1d cell that can figure out whether its left or right vertex are at the boundary.

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

Definition at line 2052 of file tria_accessor.templates.h.

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

Constructor. This constructor exists in order to maintain interface compatibility with the other accessor classes. However, it doesn't do anything useful here and so may not actually be called.

Definition at line 2066 of file tria_accessor.templates.h.

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

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

Definition at line 2090 of file tria_accessor.templates.h.

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

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

Definition at line 2105 of file tria_accessor.templates.h.

Member Function Documentation

template<int spacedim>
void TriaAccessor< 0, 1, spacedim >::copy_from ( const TriaAccessor< 0, 1, spacedim > &  t)
inline

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.

Definition at line 2119 of file tria_accessor.templates.h.

template<int spacedim>
IteratorState::IteratorStates TriaAccessor< 0, 1, spacedim >::state ( )
inlinestatic

Return the state of the iterator. Since an iterator to points can not be incremented or decremented, its state remains constant, and in particular equal to IteratorState::valid.

Definition at line 2131 of file tria_accessor.templates.h.

template<int spacedim>
int TriaAccessor< 0, 1, spacedim >::level ( )
inlinestatic

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

Definition at line 2140 of file tria_accessor.templates.h.

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

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

Definition at line 2150 of file tria_accessor.templates.h.

template<int spacedim>
void TriaAccessor< 0, 1, spacedim >::operator++ ( ) const
inline

This operator advances the iterator to the next element. For points, this operation is not defined, so you can't iterate over point iterators.

Definition at line 2160 of file tria_accessor.templates.h.

template<int spacedim>
void TriaAccessor< 0, 1, spacedim >::operator-- ( ) const
inline

This operator moves the iterator to the previous element. For points, this operation is not defined, so you can't iterate over point iterators.

Definition at line 2169 of file tria_accessor.templates.h.

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

Compare for equality.

Definition at line 2179 of file tria_accessor.templates.h.

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

Compare for inequality.

Definition at line 2198 of file tria_accessor.templates.h.

template<int spacedim>
int TriaAccessor< 0, 1, spacedim >::parent_index ( )
inlinestatic

Index of the parent. You can't do this for points.

Definition at line 2209 of file tria_accessor.templates.h.

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

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.

Definition at line 2218 of file tria_accessor.templates.h.

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

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.

Definition at line 2230 of file tria_accessor.templates.h.

template<int spacedim>
Point< spacedim > TriaAccessor< 0, 1, spacedim >::center ( ) const
inline

Return the center of this object, which of course co-incides with the location of the vertex this object refers to.

Definition at line 2242 of file tria_accessor.templates.h.

template<int spacedim>
typename::internal::Triangulation::Iterators< 1, spacedim >::line_iterator TriaAccessor< 0, 1, spacedim >::line ( const unsigned  int)
inlinestatic

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

Definition at line 2252 of file tria_accessor.templates.h.

template<int spacedim>
unsigned int TriaAccessor< 0, 1, spacedim >::line_index ( const unsigned int  i)
inlinestatic

Line index of the ith line bounding this object.

Implemented only for structdim>1, otherwise an exception generated.

Definition at line 2261 of file tria_accessor.templates.h.

template<int spacedim>
typename::internal::Triangulation::Iterators< 1, spacedim >::quad_iterator TriaAccessor< 0, 1, spacedim >::quad ( const unsigned int  i)
inlinestatic

Pointer to the ith quad bounding this object.

Definition at line 2271 of file tria_accessor.templates.h.

template<int spacedim>
unsigned int TriaAccessor< 0, 1, spacedim >::quad_index ( const unsigned int  i)
inlinestatic

Quad index of the ith quad bounding this object.

Implemented only for structdim>2, otherwise an exception generated.

Definition at line 2281 of file tria_accessor.templates.h.

template<int spacedim>
bool TriaAccessor< 0, 1, spacedim >::at_boundary ( ) const
inline

Return whether this point is at the boundary of the one-dimensional triangulation we deal with here.

Definition at line 2291 of file tria_accessor.templates.h.

template<int spacedim>
types::boundary_id TriaAccessor< 0, 1, spacedim >::boundary_indicator ( ) const
inline

Boundary indicator of this object. The convention for one dimensional triangulations is that left end vertices have boundary indicator zero, and right end vertices have boundary indicator one.

If the return value is the special value numbers::internal_face_boundary_id, then this object is in the interior of the domain.

See Also
Glossary entry on boundary indicators

Definition at line 2300 of file tria_accessor.templates.h.

template<int spacedim>
bool TriaAccessor< 0, 1, spacedim >::has_children ( )
inlinestatic

Test whether the object has children. Always false.

Definition at line 2359 of file tria_accessor.templates.h.

template<int spacedim>
unsigned int TriaAccessor< 0, 1, spacedim >::n_children ( )
inlinestatic

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

Definition at line 2368 of file tria_accessor.templates.h.

template<int spacedim>
unsigned int TriaAccessor< 0, 1, spacedim >::number_of_children ( )
inlinestatic

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

Definition at line 2377 of file tria_accessor.templates.h.

template<int spacedim>
unsigned int TriaAccessor< 0, 1, spacedim >::max_refinement_depth ( )
inlinestatic

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

Definition at line 2386 of file tria_accessor.templates.h.

template<int spacedim>
RefinementCase< 0 > TriaAccessor< 0, 1, spacedim >::refinement_case ( )
inlinestatic

Always return no refinement.

Definition at line 2412 of file tria_accessor.templates.h.

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

Return whether the vertex pointed to here is used.

Definition at line 2458 of file tria_accessor.templates.h.

Member Data Documentation

template<int spacedim>
const unsigned int TriaAccessor< 0, 1, 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 1716 of file tria_accessor.h.

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

Dimensionality of the object that the thing represented by this accessopr 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 1727 of file tria_accessor.h.

template<int spacedim>
const unsigned int TriaAccessor< 0, 1, 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 1739 of file tria_accessor.h.

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

Pointer to the triangulation we operate on.

Definition at line 2183 of file tria_accessor.h.

template<int spacedim>
VertexKind TriaAccessor< 0, 1, spacedim >::vertex_kind
protected

Whether this is a left end, right end, or interior vertex. This information is provided by the cell at the time of creation.

Definition at line 2192 of file tria_accessor.h.

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

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

Definition at line 2199 of file tria_accessor.h.


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