VTK-m  1.6
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
vtkm::cont::DataSet Class Reference

#include <DataSet.h>

Classes

struct  FieldCompare
 

Public Member Functions

VTKM_CONT void Clear ()
 
VTKM_CONT vtkm::Id GetNumberOfCells () const
 Get the number of cells contained in this DataSet. More...
 
VTKM_CONT vtkm::Id GetNumberOfPoints () const
 Get the number of points contained in this DataSet. More...
 
VTKM_CONT void AddField (const Field &field)
 
const VTKM_CONT vtkm::cont::FieldGetField (vtkm::Id index) const
 
VTKM_CONT vtkm::cont::FieldGetField (vtkm::Id index)
 
VTKM_CONT bool HasField (const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::ANY) const
 
VTKM_CONT bool HasCellField (const std::string &name) const
 
VTKM_CONT bool HasPointField (const std::string &name) const
 
VTKM_CONT vtkm::Id GetFieldIndex (const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::ANY) const
 Returns the field that matches the provided name and association Will return -1 if no match is found. More...
 
const VTKM_CONT vtkm::cont::FieldGetField (const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::ANY) const
 Returns the field that matches the provided name and association Will throw an exception if no match is found. More...
 
VTKM_CONT vtkm::cont::FieldGetField (const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::ANY)
 
const VTKM_CONT vtkm::cont::FieldGetCellField (const std::string &name) const
 Returns the first cell field that matches the provided name. More...
 
VTKM_CONT vtkm::cont::FieldGetCellField (const std::string &name)
 
const VTKM_CONT vtkm::cont::FieldGetPointField (const std::string &name) const
 Returns the first point field that matches the provided name. More...
 
VTKM_CONT vtkm::cont::FieldGetPointField (const std::string &name)
 
VTKM_CONT void AddPointField (const std::string &fieldName, const vtkm::cont::VariantArrayHandle &field)
 
template<typename T , typename Storage >
VTKM_CONT void AddPointField (const std::string &fieldName, const vtkm::cont::ArrayHandle< T, Storage > &field)
 
template<typename T >
VTKM_CONT void AddPointField (const std::string &fieldName, const std::vector< T > &field)
 
template<typename T >
VTKM_CONT void AddPointField (const std::string &fieldName, const T *field, const vtkm::Id &n)
 
VTKM_CONT void AddCellField (const std::string &fieldName, const vtkm::cont::VariantArrayHandle &field)
 
template<typename T , typename Storage >
VTKM_CONT void AddCellField (const std::string &fieldName, const vtkm::cont::ArrayHandle< T, Storage > &field)
 
template<typename T >
VTKM_CONT void AddCellField (const std::string &fieldName, const std::vector< T > &field)
 
template<typename T >
VTKM_CONT void AddCellField (const std::string &fieldName, const T *field, const vtkm::Id &n)
 
VTKM_CONT void AddCoordinateSystem (const vtkm::cont::CoordinateSystem &cs)
 
VTKM_CONT bool HasCoordinateSystem (const std::string &name) const
 
const VTKM_CONT vtkm::cont::CoordinateSystemGetCoordinateSystem (vtkm::Id index=0) const
 
VTKM_CONT vtkm::cont::CoordinateSystemGetCoordinateSystem (vtkm::Id index=0)
 
VTKM_CONT vtkm::Id GetCoordinateSystemIndex (const std::string &name) const
 Returns the index for the first CoordinateSystem whose name matches the provided string. More...
 
const VTKM_CONT vtkm::cont::CoordinateSystemGetCoordinateSystem (const std::string &name) const
 Returns the first CoordinateSystem that matches the provided name. More...
 
VTKM_CONT vtkm::cont::CoordinateSystemGetCoordinateSystem (const std::string &name)
 
VTKM_CONT void SetCellSet (const vtkm::cont::DynamicCellSet &cellSet)
 
template<typename CellSetType >
VTKM_CONT void SetCellSet (const CellSetType &cellSet)
 
const VTKM_CONT vtkm::cont::DynamicCellSetGetCellSet () const
 
VTKM_CONT vtkm::cont::DynamicCellSetGetCellSet ()
 
VTKM_CONT vtkm::IdComponent GetNumberOfFields () const
 
VTKM_CONT vtkm::IdComponent GetNumberOfCoordinateSystems () const
 
VTKM_CONT void CopyStructure (const vtkm::cont::DataSet &source)
 Copies the structure i.e. More...
 
VTKM_CONT void PrintSummary (std::ostream &out) const
 

Private Member Functions

VTKM_CONT vtkm::Id FindFieldIndex (const std::string &name, vtkm::cont::Field::Association association, bool &found) const
 

Private Attributes

std::vector< vtkm::cont::CoordinateSystemCoordSystems
 
std::map< FieldCompare::Key, vtkm::cont::Field, FieldCompareFields
 
vtkm::cont::DynamicCellSet CellSet
 

Member Function Documentation

◆ AddCellField() [1/4]

template<typename T >
VTKM_CONT void vtkm::cont::DataSet::AddCellField ( const std::string &  fieldName,
const std::vector< T > &  field 
)
inline

◆ AddCellField() [2/4]

template<typename T >
VTKM_CONT void vtkm::cont::DataSet::AddCellField ( const std::string &  fieldName,
const T *  field,
const vtkm::Id n 
)
inline

◆ AddCellField() [3/4]

template<typename T , typename Storage >
VTKM_CONT void vtkm::cont::DataSet::AddCellField ( const std::string &  fieldName,
const vtkm::cont::ArrayHandle< T, Storage > &  field 
)
inline

◆ AddCellField() [4/4]

VTKM_CONT void vtkm::cont::DataSet::AddCellField ( const std::string &  fieldName,
const vtkm::cont::VariantArrayHandle field 
)
inline

◆ AddCoordinateSystem()

VTKM_CONT void vtkm::cont::DataSet::AddCoordinateSystem ( const vtkm::cont::CoordinateSystem cs)
inline

◆ AddField()

VTKM_CONT void vtkm::cont::DataSet::AddField ( const Field field)

◆ AddPointField() [1/4]

template<typename T >
VTKM_CONT void vtkm::cont::DataSet::AddPointField ( const std::string &  fieldName,
const std::vector< T > &  field 
)
inline

◆ AddPointField() [2/4]

template<typename T >
VTKM_CONT void vtkm::cont::DataSet::AddPointField ( const std::string &  fieldName,
const T *  field,
const vtkm::Id n 
)
inline

◆ AddPointField() [3/4]

template<typename T , typename Storage >
VTKM_CONT void vtkm::cont::DataSet::AddPointField ( const std::string &  fieldName,
const vtkm::cont::ArrayHandle< T, Storage > &  field 
)
inline

◆ AddPointField() [4/4]

VTKM_CONT void vtkm::cont::DataSet::AddPointField ( const std::string &  fieldName,
const vtkm::cont::VariantArrayHandle field 
)
inline

◆ Clear()

VTKM_CONT void vtkm::cont::DataSet::Clear ( )

◆ CopyStructure()

VTKM_CONT void vtkm::cont::DataSet::CopyStructure ( const vtkm::cont::DataSet source)

Copies the structure i.e.

coordinates systems and cellset from the source dataset. The fields are left unchanged.

◆ FindFieldIndex()

VTKM_CONT vtkm::Id vtkm::cont::DataSet::FindFieldIndex ( const std::string &  name,
vtkm::cont::Field::Association  association,
bool &  found 
) const
private

◆ GetCellField() [1/2]

VTKM_CONT vtkm::cont::Field& vtkm::cont::DataSet::GetCellField ( const std::string &  name)
inline

◆ GetCellField() [2/2]

const VTKM_CONT vtkm::cont::Field& vtkm::cont::DataSet::GetCellField ( const std::string &  name) const
inline

Returns the first cell field that matches the provided name.

Will throw an exception if no match is found

◆ GetCellSet() [1/2]

VTKM_CONT vtkm::cont::DynamicCellSet& vtkm::cont::DataSet::GetCellSet ( )
inline

◆ GetCellSet() [2/2]

const VTKM_CONT vtkm::cont::DynamicCellSet& vtkm::cont::DataSet::GetCellSet ( ) const
inline

◆ GetCoordinateSystem() [1/4]

VTKM_CONT vtkm::cont::CoordinateSystem& vtkm::cont::DataSet::GetCoordinateSystem ( const std::string &  name)

◆ GetCoordinateSystem() [2/4]

const VTKM_CONT vtkm::cont::CoordinateSystem& vtkm::cont::DataSet::GetCoordinateSystem ( const std::string &  name) const

Returns the first CoordinateSystem that matches the provided name.

Will throw an exception if no match is found

◆ GetCoordinateSystem() [3/4]

VTKM_CONT vtkm::cont::CoordinateSystem& vtkm::cont::DataSet::GetCoordinateSystem ( vtkm::Id  index = 0)

◆ GetCoordinateSystem() [4/4]

const VTKM_CONT vtkm::cont::CoordinateSystem& vtkm::cont::DataSet::GetCoordinateSystem ( vtkm::Id  index = 0) const

◆ GetCoordinateSystemIndex()

VTKM_CONT vtkm::Id vtkm::cont::DataSet::GetCoordinateSystemIndex ( const std::string &  name) const

Returns the index for the first CoordinateSystem whose name matches the provided string.

Will return -1 if no match is found

◆ GetField() [1/4]

VTKM_CONT vtkm::cont::Field& vtkm::cont::DataSet::GetField ( const std::string &  name,
vtkm::cont::Field::Association  assoc = vtkm::cont::Field::Association::ANY 
)
inline

◆ GetField() [2/4]

const VTKM_CONT vtkm::cont::Field& vtkm::cont::DataSet::GetField ( const std::string &  name,
vtkm::cont::Field::Association  assoc = vtkm::cont::Field::Association::ANY 
) const
inline

Returns the field that matches the provided name and association Will throw an exception if no match is found.

◆ GetField() [3/4]

VTKM_CONT vtkm::cont::Field& vtkm::cont::DataSet::GetField ( vtkm::Id  index)

◆ GetField() [4/4]

const VTKM_CONT vtkm::cont::Field& vtkm::cont::DataSet::GetField ( vtkm::Id  index) const

◆ GetFieldIndex()

VTKM_CONT vtkm::Id vtkm::cont::DataSet::GetFieldIndex ( const std::string &  name,
vtkm::cont::Field::Association  assoc = vtkm::cont::Field::Association::ANY 
) const

Returns the field that matches the provided name and association Will return -1 if no match is found.

◆ GetNumberOfCells()

VTKM_CONT vtkm::Id vtkm::cont::DataSet::GetNumberOfCells ( ) const

Get the number of cells contained in this DataSet.

◆ GetNumberOfCoordinateSystems()

VTKM_CONT vtkm::IdComponent vtkm::cont::DataSet::GetNumberOfCoordinateSystems ( ) const
inline

◆ GetNumberOfFields()

VTKM_CONT vtkm::IdComponent vtkm::cont::DataSet::GetNumberOfFields ( ) const
inline

◆ GetNumberOfPoints()

VTKM_CONT vtkm::Id vtkm::cont::DataSet::GetNumberOfPoints ( ) const

Get the number of points contained in this DataSet.

Note: All coordinate systems for a DataSet are expected to have the same number of points.

◆ GetPointField() [1/2]

VTKM_CONT vtkm::cont::Field& vtkm::cont::DataSet::GetPointField ( const std::string &  name)
inline

◆ GetPointField() [2/2]

const VTKM_CONT vtkm::cont::Field& vtkm::cont::DataSet::GetPointField ( const std::string &  name) const
inline

Returns the first point field that matches the provided name.

Will throw an exception if no match is found

◆ HasCellField()

VTKM_CONT bool vtkm::cont::DataSet::HasCellField ( const std::string &  name) const
inline

◆ HasCoordinateSystem()

VTKM_CONT bool vtkm::cont::DataSet::HasCoordinateSystem ( const std::string &  name) const
inline

◆ HasField()

VTKM_CONT bool vtkm::cont::DataSet::HasField ( const std::string &  name,
vtkm::cont::Field::Association  assoc = vtkm::cont::Field::Association::ANY 
) const
inline

◆ HasPointField()

VTKM_CONT bool vtkm::cont::DataSet::HasPointField ( const std::string &  name) const
inline

◆ PrintSummary()

VTKM_CONT void vtkm::cont::DataSet::PrintSummary ( std::ostream &  out) const

◆ SetCellSet() [1/2]

template<typename CellSetType >
VTKM_CONT void vtkm::cont::DataSet::SetCellSet ( const CellSetType &  cellSet)
inline

◆ SetCellSet() [2/2]

VTKM_CONT void vtkm::cont::DataSet::SetCellSet ( const vtkm::cont::DynamicCellSet cellSet)
inline

Member Data Documentation

◆ CellSet

vtkm::cont::DynamicCellSet vtkm::cont::DataSet::CellSet
private

◆ CoordSystems

std::vector<vtkm::cont::CoordinateSystem> vtkm::cont::DataSet::CoordSystems
private

◆ Fields

std::map<FieldCompare::Key, vtkm::cont::Field, FieldCompare> vtkm::cont::DataSet::Fields
private

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