Classes | Modules | Typedefs | Functions

The Grid Entity

Classes for constructing a geometrical and topological entity, the Grid object. More...

Classes

Modules

Typedefs

Functions


Detailed Description

Classes for constructing a geometrical and topological entity, the Grid object.


Typedef Documentation

The type used to reference other objects, which is the anchor of representations of a Skeleton.

The BaseSpace is a base class for chart objects as well as for other Skeleton objects.


Function Documentation

template<int Dims>
index_t Fiber::RegularTopology::ComputeEdgeIDfromVertexAndOrientation ( const MultiIndex< Dims > &  Vertex,
int  Orientation,
const MultiIndex< Dims > &  NumberOfVertices 
) throw (int) [inline]

Given a vertex and an orientation (i.e.

the axis in which an edge points, compute the linear ID of the corresponding edge.

Second vertex of edge is given by

   Vertex + MultiIndex<3>::BitIndex( 1 << Orientation )

where 0 < Orientation < 3

Parameters:
NumberOfVertices The multidimensional number of vertices.
Exceptions:
Throws an integer if the vertex does not fit into the given number of vertices, or the orientation does not match, or similar.

References Fiber::MultiIndex< Dims >::size().

template<int Dims>
std::pair<MultiIndex<Dims>, MultiIndex<Dims> > Fiber::RegularTopology::ComputeEdgeVertices ( index_t  EdgeIndex,
const MultiIndex< Dims > &  NumberOfVertices 
) throw (int) [inline]

Compute the both vertices that correspond to a certain edge, where the edge is linearly numbered over all edges of a multidimensional regular grid.

Parameters:
EdgeIndex The linear index of the edge, must be smaller than NumberOfEdges( NumberOfVertices )
Exceptions:
An integer is thrown if the EdgeIndex is too large.

References Fiber::RegularTopology::ComputeFirstEdgeVertex(), and Fiber::RegularTopology::ComputeSecondEdgeVertex().

template<int Dims>
void Fiber::RegularTopology::ComputeFirstEdgeVertex ( MultiIndex< Dims > &  FirstVertex,
int &  Orientation,
index_t  EdgeIndex,
const MultiIndex< Dims > &  NumberOfVertices 
) throw (int) [inline]

Given a linear index of an edge (the edge ID) and the multidimensional number of vertices, compute the multidimensional indices of the corresponding vertice of the edge, and the orientation of this edge.

Parameters:
EdgeIndex The linear number of the edge, must be smaller than NumberOfEdges( NumberOfVertices )
NumberOfVertices How many vertices are there?
FirstVertex Output parameter, on return will contain the first vertex
Orientation The number of the axis along which this edge is oriented.
Exceptions:
An integer of value -1 is thrown if the edge index is beyond the possible range of edges.

References Fiber::MultiIndex< Dims >::size().

Referenced by Fiber::RegularTopology::ComputeEdgeVertices().

template<int Dims>
MultiIndex<Dims> Fiber::RegularTopology::ComputeSecondEdgeVertex ( const MultiIndex< Dims > &  Vertex,
int  Orientation 
) throw () [inline]

Given the vertex of an edge and an orientation (0,1,2), return the second vertex of the given edge.

This the second edge is computed by adding the BitIndex along the given orientation to the vertex.

Parameters:
Vertex The vertex where the edge starts.
Orientation The number of the given dimension, must be positive or null. The result will be undefined if the Orientation equals the dimension or is larger. 0 <= Orientation < Dims

Referenced by Fiber::RegularTopology::ComputeEdgeVertices().

template<int Dims>
int Fiber::RegularTopology::EdgeOrientation ( index_t  EdgeIndex,
const MultiIndex< Dims > &  NumberOfVertices 
) throw (int) [inline]

Compute the orientation of a given edge index in a regular grid, given the number of vertices in the grid.

Edges are ordered by orientation, first come all those oriented in the lowest dimension, then second, last those in the highest dimension. In a cube, all four edges in the x-direction are the first four, the second four are those aligned in y-direction, and the last four are those in z-direction.

Exceptions:
Throws an integer of value -1 if the edge index is beyond the possible vertices.