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

A curvilinear grid in nD, with some dimensions set to wrap Assume first point in a dimension equals the last point in that dimension. More...

#include <periodicgrid.h>

+ Inheritance diagram for inviwo::discretedata::PeriodicGrid:

Public Member Functions

 PeriodicGrid (GridPrimitive gridDimension, const std::vector< ind > &numCellsPerDim, const std::vector< bool > &isDimPeriodic)
 Create an nD grid. More...
 
virtual ind getNumCellsInDimension (ind dim) const override
 
bool isPeriodic (ind dim) const
 
void setPeriodic (ind dim, bool periodic=true)
 
virtual void getConnections (std::vector< ind > &result, ind index, GridPrimitive from, GridPrimitive to, bool isPosition=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::StructuredGrid
 StructuredGrid (GridPrimitive gridDimension, const std::vector< ind > &numCellsPerDim)
 Create an nD grid. More...
 
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...
 
- 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...
 

Protected Member Functions

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

Protected Attributes

std::vector< bool > isDimPeriodic_
 
- Protected Attributes inherited from inviwo::discretedata::StructuredGrid
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.
 

Additional Inherited Members

- Static Public Member Functions inherited from inviwo::discretedata::StructuredGrid
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)
 

Detailed Description

A curvilinear grid in nD, with some dimensions set to wrap Assume first point in a dimension equals the last point in that dimension.

Author
Anke Friederici and Tino Weinkauf

Constructor & Destructor Documentation

◆ PeriodicGrid()

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

Create an nD grid.

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

Member Function Documentation

◆ getConnections()

void inviwo::discretedata::PeriodicGrid::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

Reimplemented from inviwo::discretedata::StructuredGrid.


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