Inviwo  0.9.10.1
Inviwo documentation
inviwo::discretedata::Connectivity Class Referenceabstract

Basis interface of all connectivity types. More...

#include <connectivity.h>

+ Inheritance diagram for inviwo::discretedata::Connectivity:

Public Member Functions

 Connectivity (GridPrimitive gridDimension)
 
GridPrimitive getDimension () const
 Returns the maximal dimension of the grid.
 
virtual ind getNumElements (GridPrimitive elementType) const
 Return the number of elements of the given type. More...
 
virtual void getConnections (std::vector< ind > &result, ind index, GridPrimitive from, GridPrimitive to, bool isPosition=false) const =0
 Get the map from one element to another E.g. cell to its vertices, vertex to its neighbors, vertex to connected faces. More...
 
ElementRange all (GridPrimitive dim) const
 Range of all elements to iterate over. More...
 
virtual CellType getCellType (GridPrimitive dim, ind index) const
 Get the cell type (i.e. triangle, quad...; tetrahedron, voxel...) More...
 
virtual CellType getCellType (ElementIterator &element) const
 Get the cell type (i.e. triangle, quad...; tetrahedron, voxel...) More...
 

Protected Attributes

GridPrimitive gridDimension_
 Highest dimension of GridPrimitives.
 
std::vector< ind > numGridPrimitives_
 Saves the known number of primitves.
 

Detailed Description

Basis interface of all connectivity types.

The connectivity between coordinates creates a mesh, a graph, a cell complex, or some other structure. It joins coordinates to a larger entity and puts them in a neighborhood relation.

A connectivity can define several neighborhood relations. For example, a uniform grid would have 0D vertices, 1D grid edges, 2D grid faces, and 3D grid cells/voxels. The connectivity defines these neighborhood relations and allows iterating over them.

This refers to the 'topological space' in Vector-Bundle Classes Form Powerful Tool for Scientific Visualization, Butler and Bryson, 1992.

Connectivity and Coordinates jointly define the manifold in the above paper.

Author
Tino Weinkauf and Anke Friederici

Member Function Documentation

◆ all()

ElementRange inviwo::discretedata::Connectivity::all ( GridPrimitive  dim) const

Range of all elements to iterate over.

Parameters
dimDimension to return the elements of

◆ getCellType() [1/2]

CellType inviwo::discretedata::Connectivity::getCellType ( GridPrimitive  dim,
ind  index 
) const
virtual

Get the cell type (i.e. triangle, quad...; tetrahedron, voxel...)

Parameters
dimDimension of element (edge, face, volume...)
indexIndex of respective element type

Reimplemented in inviwo::discretedata::StructuredGrid.

◆ getCellType() [2/2]

CellType inviwo::discretedata::Connectivity::getCellType ( ElementIterator element) const
virtual

Get the cell type (i.e. triangle, quad...; tetrahedron, voxel...)

Parameters
elementElement to get measure of

◆ getConnections()

virtual void inviwo::discretedata::Connectivity::getConnections ( std::vector< ind > &  result,
ind  index,
GridPrimitive  from,
GridPrimitive  to,
bool  isPosition = false 
) const
pure virtual

Get the map from one element to another E.g. cell to its vertices, vertex to its neighbors, vertex to connected faces.

Parameters
resultAll connected indices in dimension 'to'
indexIndex of element in dimension 'from'
fromDimension the index lives in
toDimension the result lives in
isPosition

Implemented in inviwo::discretedata::PeriodicGrid, and inviwo::discretedata::StructuredGrid.

◆ getNumElements()

ind inviwo::discretedata::Connectivity::getNumElements ( GridPrimitive  elementType) const
virtual

Return the number of elements of the given type.

Parameters
elementTypeType to get number of
Returns
Number of elements

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