VTK-m  2.1
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
vtkm::cont::DataSetBuilderExplicit Class Reference

#include <DataSetBuilderExplicit.h>

Public Member Functions

 DataSetBuilderExplicit ()
 

Static Public Member Functions

template<typename T >
static vtkm::cont::DataSet Create (const std::vector< T > &xVals, const std::vector< vtkm::UInt8 > &shapes, const std::vector< vtkm::IdComponent > &numIndices, const std::vector< vtkm::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 1D DataSet with arbitrary cell connectivity. More...
 
template<typename T >
static vtkm::cont::DataSet Create (const std::vector< T > &xVals, const std::vector< T > &yVals, const std::vector< vtkm::UInt8 > &shapes, const std::vector< vtkm::IdComponent > &numIndices, const std::vector< vtkm::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 2D DataSet with arbitrary cell connectivity. More...
 
template<typename T >
static vtkm::cont::DataSet Create (const std::vector< T > &xVals, const std::vector< T > &yVals, const std::vector< T > &zVals, const std::vector< vtkm::UInt8 > &shapes, const std::vector< vtkm::IdComponent > &numIndices, const std::vector< vtkm::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 3D DataSet with arbitrary cell connectivity. More...
 
template<typename T >
static vtkm::cont::DataSet Create (const std::vector< vtkm::Vec< T, 3 >> &coords, const std::vector< vtkm::UInt8 > &shapes, const std::vector< vtkm::IdComponent > &numIndices, const std::vector< vtkm::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 3D DataSet with arbitrary cell connectivity. More...
 
template<typename T >
static vtkm::cont::DataSet Create (const vtkm::cont::ArrayHandle< vtkm::Vec< T, 3 >> &coords, const vtkm::cont::ArrayHandle< vtkm::UInt8 > &shapes, const vtkm::cont::ArrayHandle< vtkm::IdComponent > &numIndices, const vtkm::cont::ArrayHandle< vtkm::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 3D DataSet with arbitrary cell connectivity. More...
 
template<typename T , typename CellShapeTag >
static vtkm::cont::DataSet Create (const std::vector< vtkm::Vec< T, 3 >> &coords, CellShapeTag tag, vtkm::IdComponent numberOfPointsPerCell, const std::vector< vtkm::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 3D DataSet with arbitrary cell connectivity for a single cell type. More...
 
template<typename T , typename CellShapeTag >
static vtkm::cont::DataSet Create (const vtkm::cont::ArrayHandle< vtkm::Vec< T, 3 >> &coords, CellShapeTag tag, vtkm::IdComponent numberOfPointsPerCell, const vtkm::cont::ArrayHandle< vtkm::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 3D DataSet with arbitrary cell connectivity for a single cell type. More...
 

Static Private Member Functions

template<typename T >
static vtkm::cont::DataSet BuildDataSet (const vtkm::cont::ArrayHandle< vtkm::Vec< T, 3 >> &coords, const vtkm::cont::ArrayHandle< vtkm::UInt8 > &shapes, const vtkm::cont::ArrayHandle< vtkm::Id > &offsets, const vtkm::cont::ArrayHandle< vtkm::Id > &connectivity, const std::string &coordsNm)
 
template<typename T , typename CellShapeTag >
static vtkm::cont::DataSet BuildDataSet (const vtkm::cont::ArrayHandle< vtkm::Vec< T, 3 >> &coords, CellShapeTag tag, vtkm::IdComponent numberOfPointsPerCell, const vtkm::cont::ArrayHandle< vtkm::Id > &connectivity, const std::string &coordsNm)
 

Constructor & Destructor Documentation

◆ DataSetBuilderExplicit()

vtkm::cont::DataSetBuilderExplicit::DataSetBuilderExplicit ( )
inline

Member Function Documentation

◆ BuildDataSet() [1/2]

template<typename T , typename CellShapeTag >
vtkm::cont::DataSet vtkm::cont::DataSetBuilderExplicit::BuildDataSet ( const vtkm::cont::ArrayHandle< vtkm::Vec< T, 3 >> &  coords,
CellShapeTag  tag,
vtkm::IdComponent  numberOfPointsPerCell,
const vtkm::cont::ArrayHandle< vtkm::Id > &  connectivity,
const std::string &  coordsNm 
)
inlinestaticprivate

◆ BuildDataSet() [2/2]

template<typename T >
vtkm::cont::DataSet vtkm::cont::DataSetBuilderExplicit::BuildDataSet ( const vtkm::cont::ArrayHandle< vtkm::Vec< T, 3 >> &  coords,
const vtkm::cont::ArrayHandle< vtkm::UInt8 > &  shapes,
const vtkm::cont::ArrayHandle< vtkm::Id > &  offsets,
const vtkm::cont::ArrayHandle< vtkm::Id > &  connectivity,
const std::string &  coordsNm 
)
inlinestaticprivate

◆ Create() [1/7]

template<typename T >
vtkm::cont::DataSet vtkm::cont::DataSetBuilderExplicit::Create ( const std::vector< T > &  xVals,
const std::vector< T > &  yVals,
const std::vector< T > &  zVals,
const std::vector< vtkm::UInt8 > &  shapes,
const std::vector< vtkm::IdComponent > &  numIndices,
const std::vector< vtkm::Id > &  connectivity,
const std::string &  coordsNm = "coords" 
)
inlinestatic

Create a 3D DataSet with arbitrary cell connectivity.

The cell connectivity is specified with arrays defining the shape and point connections of each cell. In this form, the cell connectivity and coordinates are specified as std::vector and the data will be copied to create the data object.

Parameters
[in]xValsAn array providing the x coordinate of each point.
[in]yValsAn array providing the x coordinate of each point.
[in]zValsAn array providing the x coordinate of each point.
[in]shapesAn array of shapes for each cell. Each entry should be one of the vtkm::CELL_SHAPE_* values identifying the shape of the corresponding cell.
[in]numIndicesAn array containing for each cell the number of points incident on that cell.
[in]connectivityAn array specifying for each cell the indicies of points incident on each cell. Each cell has a short array of indices that reference points in the coords array. The length of each of these short arrays is specified by the numIndices array. These variable length arrays are tightly packed together in this connectivity array.
[in]coordsNm(optional) The name to register the coordinates as.

◆ Create() [2/7]

template<typename T >
static vtkm::cont::DataSet vtkm::cont::DataSetBuilderExplicit::Create ( const std::vector< T > &  xVals,
const std::vector< T > &  yVals,
const std::vector< vtkm::UInt8 > &  shapes,
const std::vector< vtkm::IdComponent > &  numIndices,
const std::vector< vtkm::Id > &  connectivity,
const std::string &  coordsNm = "coords" 
)
inlinestatic

Create a 2D DataSet with arbitrary cell connectivity.

The cell connectivity is specified with arrays defining the shape and point connections of each cell. In this form, the cell connectivity and coordinates are specified as std::vector and the data will be copied to create the data object.

Parameters
[in]xValsAn array providing the x coordinate of each point.
[in]yValsAn array providing the x coordinate of each point.
[in]shapesAn array of shapes for each cell. Each entry should be one of the vtkm::CELL_SHAPE_* values identifying the shape of the corresponding cell.
[in]numIndicesAn array containing for each cell the number of points incident on that cell.
[in]connectivityAn array specifying for each cell the indicies of points incident on each cell. Each cell has a short array of indices that reference points in the coords array. The length of each of these short arrays is specified by the numIndices array. These variable length arrays are tightly packed together in this connectivity array.
[in]coordsNm(optional) The name to register the coordinates as.

◆ Create() [3/7]

template<typename T >
static vtkm::cont::DataSet vtkm::cont::DataSetBuilderExplicit::Create ( const std::vector< T > &  xVals,
const std::vector< vtkm::UInt8 > &  shapes,
const std::vector< vtkm::IdComponent > &  numIndices,
const std::vector< vtkm::Id > &  connectivity,
const std::string &  coordsNm = "coords" 
)
inlinestatic

Create a 1D DataSet with arbitrary cell connectivity.

The cell connectivity is specified with arrays defining the shape and point connections of each cell. In this form, the cell connectivity and coordinates are specified as std::vector and the data will be copied to create the data object.

Parameters
[in]xValsAn array providing the x coordinate of each point.
[in]shapesAn array of shapes for each cell. Each entry should be one of the vtkm::CELL_SHAPE_* values identifying the shape of the corresponding cell.
[in]numIndicesAn array containing for each cell the number of points incident on that cell.
[in]connectivityAn array specifying for each cell the indicies of points incident on each cell. Each cell has a short array of indices that reference points in the coords array. The length of each of these short arrays is specified by the numIndices array. These variable length arrays are tightly packed together in this connectivity array.
[in]coordsNm(optional) The name to register the coordinates as.

◆ Create() [4/7]

template<typename T , typename CellShapeTag >
vtkm::cont::DataSet vtkm::cont::DataSetBuilderExplicit::Create ( const std::vector< vtkm::Vec< T, 3 >> &  coords,
CellShapeTag  tag,
vtkm::IdComponent  numberOfPointsPerCell,
const std::vector< vtkm::Id > &  connectivity,
const std::string &  coordsNm = "coords" 
)
inlinestatic

Create a 3D DataSet with arbitrary cell connectivity for a single cell type.

The cell connectivity is specified with an array defining the point connections of each cell. All the cells in the DataSet are of the same shape and contain the same number of incident points. In this form, the cell connectivity and coordinates are specified as std::vector and the data will be copied to create the data object.

Parameters
[in]coordsAn array of point coordinates.
[in]tagA tag object representing the shape of all the cells in the mesh. Cell shape tag objects have a name of the form vtkm::CellShapeTag* such as vtkm::CellShapeTagTriangle or vtkm::CellShapeTagHexahedron. To specify a cell shape determined at runtime, use vtkm::CellShapeTagGeneric.
[in]numberOfPointsPerCellThe number of points that are incident to each cell.
[in]connectivityAn array specifying for each cell the indicies of points incident on each cell. Each cell has a short array of indices that reference points in the coords array. The length of each of these short arrays is specified by numberOfPointsPerCell. These short arrays are tightly packed together in this connectivity array.
[in]coordsNm(optional) The name to register the coordinates as.

◆ Create() [5/7]

template<typename T >
vtkm::cont::DataSet vtkm::cont::DataSetBuilderExplicit::Create ( const std::vector< vtkm::Vec< T, 3 >> &  coords,
const std::vector< vtkm::UInt8 > &  shapes,
const std::vector< vtkm::IdComponent > &  numIndices,
const std::vector< vtkm::Id > &  connectivity,
const std::string &  coordsNm = "coords" 
)
inlinestatic

Create a 3D DataSet with arbitrary cell connectivity.

The cell connectivity is specified with arrays defining the shape and point connections of each cell. In this form, the cell connectivity and coordinates are specified as std::vector and the data will be copied to create the data object.

Parameters
[in]coordsAn array of point coordinates.
[in]shapesAn array of shapes for each cell. Each entry should be one of the vtkm::CELL_SHAPE_* values identifying the shape of the corresponding cell.
[in]numIndicesAn array containing for each cell the number of points incident on that cell.
[in]connectivityAn array specifying for each cell the indicies of points incident on each cell. Each cell has a short array of indices that reference points in the coords array. The length of each of these short arrays is specified by the numIndices array. These variable length arrays are tightly packed together in this connectivity array.
[in]coordsNm(optional) The name to register the coordinates as.

◆ Create() [6/7]

template<typename T , typename CellShapeTag >
static vtkm::cont::DataSet vtkm::cont::DataSetBuilderExplicit::Create ( const vtkm::cont::ArrayHandle< vtkm::Vec< T, 3 >> &  coords,
CellShapeTag  tag,
vtkm::IdComponent  numberOfPointsPerCell,
const vtkm::cont::ArrayHandle< vtkm::Id > &  connectivity,
const std::string &  coordsNm = "coords" 
)
inlinestatic

Create a 3D DataSet with arbitrary cell connectivity for a single cell type.

The cell connectivity is specified with an array defining the point connections of each cell. All the cells in the DataSet are of the same shape and contain the same number of incident points. In this form, the cell connectivity and coordinates are specified as ArrayHandle and the memory will be shared with the created data object.

Parameters
[in]coordsAn array of point coordinates.
[in]tagA tag object representing the shape of all the cells in the mesh. Cell shape tag objects have a name of the form vtkm::CellShapeTag* such as vtkm::CellShapeTagTriangle or vtkm::CellShapeTagHexahedron. To specify a cell shape determined at runtime, use vtkm::CellShapeTagGeneric.
[in]numberOfPointsPerCellThe number of points that are incident to each cell.
[in]connectivityAn array specifying for each cell the indicies of points incident on each cell. Each cell has a short array of indices that reference points in the coords array. The length of each of these short arrays is specified by numberOfPointsPerCell. These short arrays are tightly packed together in this connectivity array.
[in]coordsNm(optional) The name to register the coordinates as.

◆ Create() [7/7]

template<typename T >
static vtkm::cont::DataSet vtkm::cont::DataSetBuilderExplicit::Create ( const vtkm::cont::ArrayHandle< vtkm::Vec< T, 3 >> &  coords,
const vtkm::cont::ArrayHandle< vtkm::UInt8 > &  shapes,
const vtkm::cont::ArrayHandle< vtkm::IdComponent > &  numIndices,
const vtkm::cont::ArrayHandle< vtkm::Id > &  connectivity,
const std::string &  coordsNm = "coords" 
)
inlinestatic

Create a 3D DataSet with arbitrary cell connectivity.

The cell connectivity is specified with arrays defining the shape and point connections of each cell. In this form, the cell connectivity and coordinates are specified as ArrayHandle and the memory will be shared with the created data object. That said, the DataSet construction will generate a new array for offsets.

Parameters
[in]coordsAn array of point coordinates.
[in]shapesAn array of shapes for each cell. Each entry should be one of the vtkm::CELL_SHAPE_* values identifying the shape of the corresponding cell.
[in]numIndicesAn array containing for each cell the number of points incident on that cell.
[in]connectivityAn array specifying for each cell the indicies of points incident on each cell. Each cell has a short array of indices that reference points in the coords array. The length of each of these short arrays is specified by the numIndices array. These variable length arrays are tightly packed together in this connectivity array.
[in]coordsNm(optional) The name to register the coordinates as.

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