Inviwo  0.9.10.1
Inviwo documentation
inviwo::discretedata::StructuredGrid Class Reference

A curvilinear grid in nD. More...

#include <structuredgrid.h>

+ Inheritance diagram for inviwo::discretedata::StructuredGrid:

Public Member Functions

 StructuredGrid (GridPrimitive gridDimension, const std::vector< ind > &numCellsPerDim)
 Create an nD grid. More...
 
virtual ind getNumCellsInDimension (ind dim) const
 
void getNumCells (std::vector< ind > &result) const
 
virtual CellType getCellType (GridPrimitive dim, ind index) const override
 Get the cell type (i.e. triangle, quad...; tetrahedron, voxel...) More...
 
virtual void getConnections (std::vector< ind > &result, ind index, GridPrimitive from, GridPrimitive to, bool positions=false) const override
 Get the map from one element to another E.g. cell to its vertices, vertex to its neighbors, vertex to connected faces. More...
 
- Public Member Functions inherited from inviwo::discretedata::Connectivity
 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...
 
ElementRange all (GridPrimitive dim) const
 Range of all elements to iterate over. More...
 
virtual CellType getCellType (ElementIterator &element) const
 Get the cell type (i.e. triangle, quad...; tetrahedron, voxel...) More...
 

Static Public Member Functions

static void sameLevelConnection (std::vector< ind > &result, ind idxLin, const std::vector< ind > &size)
 
static std::vector< ind > indexFromLinear (ind idxLin, const std::vector< ind > &size)
 

Protected Attributes

std::vector< ind > numCellsPerDimension_
 
- Protected Attributes inherited from inviwo::discretedata::Connectivity
GridPrimitive gridDimension_
 Highest dimension of GridPrimitives.
 
std::vector< ind > numGridPrimitives_
 Saves the known number of primitves.
 

Detailed Description

A curvilinear grid in nD.

Author
Anke Friederici and Tino Weinkauf

Constructor & Destructor Documentation

◆ StructuredGrid()

inviwo::discretedata::StructuredGrid::StructuredGrid ( GridPrimitive  gridDimension,
const std::vector< ind > &  numCellsPerDim 
)

Create an nD grid.

Parameters
gridDimensionDimension of grid (not vertices)
numCellsPerDimNumber of cells in each dimension, expect size gridDimension+1

Member Function Documentation

◆ getCellType()

CellType inviwo::discretedata::StructuredGrid::getCellType ( GridPrimitive  dim,
ind  index 
) const
overridevirtual

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

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

Reimplemented from inviwo::discretedata::Connectivity.

◆ getConnections()

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

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

Implements inviwo::discretedata::Connectivity.

Reimplemented in inviwo::discretedata::PeriodicGrid.


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