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

#include <DataSet.h>

Collaboration diagram for vtkm::cont::DataSet:
Collaboration graph
[legend]

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)
 
VTKM_CONT const 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 first field that matches the provided name and association Will return -1 if no match is found. More...
 
VTKM_CONT void AddCoordinateSystem (const vtkm::cont::CoordinateSystem &cs)
 
VTKM_CONT bool HasCoordinateSystem (const std::string &name) const
 
VTKM_CONT const 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...
 
VTKM_CONT void SetCellSet (const vtkm::cont::DynamicCellSet &cellSet)
 
template<typename CellSetType >
VTKM_CONT void SetCellSet (const CellSetType &cellSet)
 
VTKM_CONT const 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
 
VTKM_CONT const vtkm::cont::FieldGetField (const std::string &name, vtkm::cont::Field::Association assoc=vtkm::cont::Field::Association::ANY) const
 Returns the first 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)
 Returns the first field that matches the provided name and association Will throw an exception if no match is found. More...
 
VTKM_CONT const 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)
 Returns the first cell field that matches the provided name. More...
 
VTKM_CONT const 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)
 Returns the first point field that matches the provided name. More...
 
VTKM_CONT const 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)
 Returns the first CoordinateSystem that matches the provided name. More...
 

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::vector< vtkm::cont::FieldFields
 
vtkm::cont::DynamicCellSet CellSet
 

Member Function Documentation

VTKM_CONT void vtkm::cont::DataSet::AddCoordinateSystem ( const vtkm::cont::CoordinateSystem cs)
inline
VTKM_CONT void vtkm::cont::DataSet::AddField ( const Field field)
inline
VTKM_CONT void vtkm::cont::DataSet::Clear ( )
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.

VTKM_CONT vtkm::Id vtkm::cont::DataSet::FindFieldIndex ( const std::string &  name,
vtkm::cont::Field::Association  association,
bool &  found 
) const
private
VTKM_CONT const 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

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

Returns the first cell field that matches the provided name.

Will throw an exception if no match is found

VTKM_CONT const vtkm::cont::DynamicCellSet& vtkm::cont::DataSet::GetCellSet ( ) const
inline
VTKM_CONT vtkm::cont::DynamicCellSet& vtkm::cont::DataSet::GetCellSet ( )
inline
VTKM_CONT const vtkm::cont::CoordinateSystem& vtkm::cont::DataSet::GetCoordinateSystem ( vtkm::Id  index = 0) const
VTKM_CONT vtkm::cont::CoordinateSystem& vtkm::cont::DataSet::GetCoordinateSystem ( vtkm::Id  index = 0)
VTKM_CONT const 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

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

Returns the first CoordinateSystem that matches the provided name.

Will throw an exception if no match is found

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

VTKM_CONT const vtkm::cont::Field& vtkm::cont::DataSet::GetField ( vtkm::Id  index) const
VTKM_CONT vtkm::cont::Field& vtkm::cont::DataSet::GetField ( vtkm::Id  index)
VTKM_CONT const 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 first field that matches the provided name and association Will throw an exception if no match is found.

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

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

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 first field that matches the provided name and association Will return -1 if no match is found.

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

Get the number of cells contained in this DataSet.

VTKM_CONT vtkm::IdComponent vtkm::cont::DataSet::GetNumberOfCoordinateSystems ( ) const
inline
VTKM_CONT vtkm::IdComponent vtkm::cont::DataSet::GetNumberOfFields ( ) const
inline
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.

VTKM_CONT const 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

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

Returns the first point field that matches the provided name.

Will throw an exception if no match is found

VTKM_CONT bool vtkm::cont::DataSet::HasCellField ( const std::string &  name) const
inline
VTKM_CONT bool vtkm::cont::DataSet::HasCoordinateSystem ( const std::string &  name) const
inline
VTKM_CONT bool vtkm::cont::DataSet::HasField ( const std::string &  name,
vtkm::cont::Field::Association  assoc = vtkm::cont::Field::Association::ANY 
) const
inline
VTKM_CONT bool vtkm::cont::DataSet::HasPointField ( const std::string &  name) const
inline
VTKM_CONT void vtkm::cont::DataSet::PrintSummary ( std::ostream &  out) const
VTKM_CONT void vtkm::cont::DataSet::SetCellSet ( const vtkm::cont::DynamicCellSet cellSet)
inline
template<typename CellSetType >
VTKM_CONT void vtkm::cont::DataSet::SetCellSet ( const CellSetType &  cellSet)
inline

Member Data Documentation

vtkm::cont::DynamicCellSet vtkm::cont::DataSet::CellSet
private
std::vector<vtkm::cont::CoordinateSystem> vtkm::cont::DataSet::CoordSystems
private
std::vector<vtkm::cont::Field> vtkm::cont::DataSet::Fields
private

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