Viskores  1.0
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
viskores::cont::DataSetBuilderExplicit Class Reference

#include <DataSetBuilderExplicit.h>

Public Member Functions

 DataSetBuilderExplicit ()
 

Static Public Member Functions

template<typename T >
static viskores::cont::DataSet Create (const std::vector< T > &xVals, const std::vector< viskores::UInt8 > &shapes, const std::vector< viskores::IdComponent > &numIndices, const std::vector< viskores::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 1D DataSet with arbitrary cell connectivity. More...
 
template<typename T >
static viskores::cont::DataSet Create (const std::vector< T > &xVals, const std::vector< T > &yVals, const std::vector< viskores::UInt8 > &shapes, const std::vector< viskores::IdComponent > &numIndices, const std::vector< viskores::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 2D DataSet with arbitrary cell connectivity. More...
 
template<typename T >
static viskores::cont::DataSet Create (const std::vector< T > &xVals, const std::vector< T > &yVals, const std::vector< T > &zVals, const std::vector< viskores::UInt8 > &shapes, const std::vector< viskores::IdComponent > &numIndices, const std::vector< viskores::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 3D DataSet with arbitrary cell connectivity. More...
 
template<typename T >
static viskores::cont::DataSet Create (const std::vector< viskores::Vec< T, 3 >> &coords, const std::vector< viskores::UInt8 > &shapes, const std::vector< viskores::IdComponent > &numIndices, const std::vector< viskores::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 3D DataSet with arbitrary cell connectivity. More...
 
template<typename T >
static viskores::cont::DataSet Create (const viskores::cont::ArrayHandle< viskores::Vec< T, 3 >> &coords, const viskores::cont::ArrayHandle< viskores::UInt8 > &shapes, const viskores::cont::ArrayHandle< viskores::IdComponent > &numIndices, const viskores::cont::ArrayHandle< viskores::Id > &connectivity, const std::string &coordsNm="coords")
 Create a 3D DataSet with arbitrary cell connectivity. More...
 
template<typename T , typename CellShapeTag >
static viskores::cont::DataSet Create (const std::vector< viskores::Vec< T, 3 >> &coords, CellShapeTag tag, viskores::IdComponent numberOfPointsPerCell, const std::vector< viskores::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 viskores::cont::DataSet Create (const viskores::cont::ArrayHandle< viskores::Vec< T, 3 >> &coords, CellShapeTag tag, viskores::IdComponent numberOfPointsPerCell, const viskores::cont::ArrayHandle< viskores::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 viskores::cont::DataSet BuildDataSet (const viskores::cont::ArrayHandle< viskores::Vec< T, 3 >> &coords, const viskores::cont::ArrayHandle< viskores::UInt8 > &shapes, const viskores::cont::ArrayHandle< viskores::Id > &offsets, const viskores::cont::ArrayHandle< viskores::Id > &connectivity, const std::string &coordsNm)
 
template<typename T , typename CellShapeTag >
static viskores::cont::DataSet BuildDataSet (const viskores::cont::ArrayHandle< viskores::Vec< T, 3 >> &coords, CellShapeTag tag, viskores::IdComponent numberOfPointsPerCell, const viskores::cont::ArrayHandle< viskores::Id > &connectivity, const std::string &coordsNm)
 

Constructor & Destructor Documentation

◆ DataSetBuilderExplicit()

viskores::cont::DataSetBuilderExplicit::DataSetBuilderExplicit ( )
inline

Member Function Documentation

◆ BuildDataSet() [1/2]

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

◆ BuildDataSet() [2/2]

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

◆ Create() [1/7]

template<typename T >
viskores::cont::DataSet viskores::cont::DataSetBuilderExplicit::Create ( const std::vector< T > &  xVals,
const std::vector< T > &  yVals,
const std::vector< T > &  zVals,
const std::vector< viskores::UInt8 > &  shapes,
const std::vector< viskores::IdComponent > &  numIndices,
const std::vector< viskores::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 viskores::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 viskores::cont::DataSet viskores::cont::DataSetBuilderExplicit::Create ( const std::vector< T > &  xVals,
const std::vector< T > &  yVals,
const std::vector< viskores::UInt8 > &  shapes,
const std::vector< viskores::IdComponent > &  numIndices,
const std::vector< viskores::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 viskores::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 viskores::cont::DataSet viskores::cont::DataSetBuilderExplicit::Create ( const std::vector< T > &  xVals,
const std::vector< viskores::UInt8 > &  shapes,
const std::vector< viskores::IdComponent > &  numIndices,
const std::vector< viskores::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 viskores::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 >
viskores::cont::DataSet viskores::cont::DataSetBuilderExplicit::Create ( const std::vector< viskores::Vec< T, 3 >> &  coords,
CellShapeTag  tag,
viskores::IdComponent  numberOfPointsPerCell,
const std::vector< viskores::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 viskores::CellShapeTag* such as viskores::CellShapeTagTriangle or viskores::CellShapeTagHexahedron. To specify a cell shape determined at runtime, use viskores::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 >
viskores::cont::DataSet viskores::cont::DataSetBuilderExplicit::Create ( const std::vector< viskores::Vec< T, 3 >> &  coords,
const std::vector< viskores::UInt8 > &  shapes,
const std::vector< viskores::IdComponent > &  numIndices,
const std::vector< viskores::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 viskores::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 viskores::cont::DataSet viskores::cont::DataSetBuilderExplicit::Create ( const viskores::cont::ArrayHandle< viskores::Vec< T, 3 >> &  coords,
CellShapeTag  tag,
viskores::IdComponent  numberOfPointsPerCell,
const viskores::cont::ArrayHandle< viskores::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 viskores::CellShapeTag* such as viskores::CellShapeTagTriangle or viskores::CellShapeTagHexahedron. To specify a cell shape determined at runtime, use viskores::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 viskores::cont::DataSet viskores::cont::DataSetBuilderExplicit::Create ( const viskores::cont::ArrayHandle< viskores::Vec< T, 3 >> &  coords,
const viskores::cont::ArrayHandle< viskores::UInt8 > &  shapes,
const viskores::cont::ArrayHandle< viskores::IdComponent > &  numIndices,
const viskores::cont::ArrayHandle< viskores::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 viskores::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: