VTK-m  2.0
Private Attributes | List of all members
vtkm::filter::field_transform::GenerateIds Class Reference

Adds fields to a DataSet that give the ids for the points and cells. More...

#include <GenerateIds.h>

Inheritance diagram for vtkm::filter::field_transform::GenerateIds:
vtkm::filter::Filter

Public Member Functions

const std::string & GetPointFieldName () const
 The name given to the generated point field. More...
 
void SetPointFieldName (const std::string &name)
 The name given to the generated point field. More...
 
const std::string & GetCellFieldName () const
 The name given to the generated cell field. More...
 
void SetCellFieldName (const std::string &name)
 The name given to the generated cell field. More...
 
bool GetGeneratePointIds () const
 Specify whether the point id field is generated. More...
 
void SetGeneratePointIds (bool flag)
 Specify whether the point id field is generated. More...
 
bool GetGenerateCellIds () const
 Specify whether the cell id field is generated. More...
 
void SetGenerateCellIds (bool flag)
 Specify whether the cell id field is generated. More...
 
- Public Member Functions inherited from vtkm::filter::Filter
virtual VTKM_CONT ~Filter ()
 
virtual VTKM_CONT bool CanThread () const
 
VTKM_CONT void SetThreadsPerCPU (vtkm::Id numThreads)
 
VTKM_CONT void SetThreadsPerGPU (vtkm::Id numThreads)
 
VTKM_CONT vtkm::Id GetThreadsPerCPU () const
 
VTKM_CONT vtkm::Id GetThreadsPerGPU () const
 
VTKM_CONT bool GetRunMultiThreadedFilter () const
 
VTKM_CONT void SetRunMultiThreadedFilter (bool val)
 
void SetInvoker (vtkm::cont::Invoker inv)
 Specify the vtkm::cont::Invoker to be used to execute worklets by this filter instance. More...
 
VTKM_CONT void SetFieldsToPass (const vtkm::filter::FieldSelection &fieldsToPass)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (vtkm::filter::FieldSelection &&fieldsToPass)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (const vtkm::filter::FieldSelection &fieldsToPass, vtkm::filter::FieldSelection::Mode mode)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (std::initializer_list< std::string > fields, vtkm::filter::FieldSelection::Mode mode=vtkm::filter::FieldSelection::Mode::Select)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (std::initializer_list< std::pair< std::string, vtkm::cont::Field::Association >> fields, vtkm::filter::FieldSelection::Mode mode=vtkm::filter::FieldSelection::Mode::Select)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (const std::string &fieldname, vtkm::cont::Field::Association association, vtkm::filter::FieldSelection::Mode mode=vtkm::filter::FieldSelection::Mode::Select)
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetFieldsToPass (const std::string &fieldname, vtkm::filter::FieldSelection::Mode mode)
 Specify which fields get passed from input to output. More...
 
const VTKM_CONT vtkm::filter::FieldSelectionGetFieldsToPass () const
 Specify which fields get passed from input to output. More...
 
VTKM_CONT vtkm::filter::FieldSelectionGetFieldsToPass ()
 Specify which fields get passed from input to output. More...
 
VTKM_CONT void SetPassCoordinateSystems (bool flag)
 Specify whether to always pass coordinate systems. More...
 
VTKM_CONT bool GetPassCoordinateSystems () const
 Specify whether to always pass coordinate systems. More...
 
VTKM_CONT vtkm::cont::DataSet Execute (const vtkm::cont::DataSet &input)
 
VTKM_CONT vtkm::cont::PartitionedDataSet Execute (const vtkm::cont::PartitionedDataSet &input)
 

Private Attributes

std::string PointFieldName = "pointids"
 
std::string CellFieldName = "cellids"
 
bool GeneratePointIds = true
 
bool GenerateCellIds = true
 
bool UseFloat = false
 
bool GetUseFloat () const
 Specify whether the generated fields should be integer or float. More...
 
void SetUseFloat (bool flag)
 Specify whether the generated fields should be integer or float. More...
 
vtkm::cont::DataSet DoExecute (const vtkm::cont::DataSet &input) override
 Specify whether the generated fields should be integer or float. More...
 

Additional Inherited Members

- Protected Member Functions inherited from vtkm::filter::Filter
VTKM_CONT vtkm::cont::DataSet CreateResult (const vtkm::cont::DataSet &inDataSet) const
 Create the output data set for DoExecute. More...
 
VTKM_CONT vtkm::cont::PartitionedDataSet CreateResult (const vtkm::cont::PartitionedDataSet &input, const vtkm::cont::PartitionedDataSet &resultPartitions) const
 Create the output data set for DoExecute. More...
 
template<typename FieldMapper >
VTKM_CONT vtkm::cont::PartitionedDataSet CreateResult (const vtkm::cont::PartitionedDataSet &input, const vtkm::cont::PartitionedDataSet &resultPartitions, FieldMapper &&fieldMapper) const
 Create the output data set for DoExecute. More...
 
template<typename FieldMapper >
VTKM_CONT vtkm::cont::DataSet CreateResult (const vtkm::cont::DataSet &inDataSet, const vtkm::cont::UnknownCellSet &resultCellSet, FieldMapper &&fieldMapper) const
 Create the output data set for DoExecute. More...
 
virtual VTKM_CONT vtkm::cont::PartitionedDataSet DoExecutePartitions (const vtkm::cont::PartitionedDataSet &inData)
 
template<typename FieldMapper >
VTKM_CONT vtkm::cont::DataSet CreateResultCoordinateSystem (const vtkm::cont::DataSet &inDataSet, const vtkm::cont::UnknownCellSet &resultCellSet, const vtkm::cont::CoordinateSystem &resultCoordSystem, FieldMapper &&fieldMapper) const
 Create the output data set for DoExecute. More...
 
template<typename FieldMapper >
VTKM_CONT vtkm::cont::DataSet CreateResultCoordinateSystem (const vtkm::cont::DataSet &inDataSet, const vtkm::cont::UnknownCellSet &resultCellSet, const std::string &coordsName, const vtkm::cont::UnknownArrayHandle &coordsData, FieldMapper &&fieldMapper) const
 Create the output data set for DoExecute. More...
 
- Protected Attributes inherited from vtkm::filter::Filter
vtkm::cont::Invoker Invoke
 

Detailed Description

Adds fields to a DataSet that give the ids for the points and cells.

This filter will add (by default) a point field named pointids that gives the index of the associated point and likewise a cell field named cellids for the associated cell indices. These fields are useful for tracking the provenance of the elements of a DataSet as it gets manipulated by filters. It is also convenient for adding indices to operations designed for fields and generally creating test data.

Member Function Documentation

◆ DoExecute()

vtkm::cont::DataSet vtkm::filter::field_transform::GenerateIds::DoExecute ( const vtkm::cont::DataSet input)
overrideprivatevirtual

Specify whether the generated fields should be integer or float.

When UseFloat is false (the default), then the fields generated will have type vtkm::Id. If it is set to true, then the fields will be generated with type vtkm::FloatDefault.

Implements vtkm::filter::Filter.

◆ GetCellFieldName()

const std::string& vtkm::filter::field_transform::GenerateIds::GetCellFieldName ( ) const
inline

The name given to the generated cell field.

By default, the name is cellids.

◆ GetGenerateCellIds()

bool vtkm::filter::field_transform::GenerateIds::GetGenerateCellIds ( ) const
inline

Specify whether the cell id field is generated.

When GenerateCellIds is true (the default), a field echoing the cell indices is generated. When set to false, this output is not created.

◆ GetGeneratePointIds()

bool vtkm::filter::field_transform::GenerateIds::GetGeneratePointIds ( ) const
inline

Specify whether the point id field is generated.

When GeneratePointIds is true (the default), a field echoing the point indices is generated. When set to false, this output is not created.

◆ GetPointFieldName()

const std::string& vtkm::filter::field_transform::GenerateIds::GetPointFieldName ( ) const
inline

The name given to the generated point field.

By default, the name is pointids.

◆ GetUseFloat()

bool vtkm::filter::field_transform::GenerateIds::GetUseFloat ( ) const
inline

Specify whether the generated fields should be integer or float.

When UseFloat is false (the default), then the fields generated will have type vtkm::Id. If it is set to true, then the fields will be generated with type vtkm::FloatDefault.

◆ SetCellFieldName()

void vtkm::filter::field_transform::GenerateIds::SetCellFieldName ( const std::string &  name)
inline

The name given to the generated cell field.

By default, the name is cellids.

◆ SetGenerateCellIds()

void vtkm::filter::field_transform::GenerateIds::SetGenerateCellIds ( bool  flag)
inline

Specify whether the cell id field is generated.

When GenerateCellIds is true (the default), a field echoing the cell indices is generated. When set to false, this output is not created.

◆ SetGeneratePointIds()

void vtkm::filter::field_transform::GenerateIds::SetGeneratePointIds ( bool  flag)
inline

Specify whether the point id field is generated.

When GeneratePointIds is true (the default), a field echoing the point indices is generated. When set to false, this output is not created.

◆ SetPointFieldName()

void vtkm::filter::field_transform::GenerateIds::SetPointFieldName ( const std::string &  name)
inline

The name given to the generated point field.

By default, the name is pointids.

◆ SetUseFloat()

void vtkm::filter::field_transform::GenerateIds::SetUseFloat ( bool  flag)
inline

Specify whether the generated fields should be integer or float.

When UseFloat is false (the default), then the fields generated will have type vtkm::Id. If it is set to true, then the fields will be generated with type vtkm::FloatDefault.

Member Data Documentation

◆ CellFieldName

std::string vtkm::filter::field_transform::GenerateIds::CellFieldName = "cellids"
private

◆ GenerateCellIds

bool vtkm::filter::field_transform::GenerateIds::GenerateCellIds = true
private

◆ GeneratePointIds

bool vtkm::filter::field_transform::GenerateIds::GeneratePointIds = true
private

◆ PointFieldName

std::string vtkm::filter::field_transform::GenerateIds::PointFieldName = "pointids"
private

◆ UseFloat

bool vtkm::filter::field_transform::GenerateIds::UseFloat = false
private

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