VTK-m  2.2
Classes | Public Types | Public Member Functions | Private Types | List of all members
vtkm::cont::CoordinateSystem Class Reference

Manages a coordinate system for a DataSet. More...

#include <CoordinateSystem.h>

Inheritance diagram for vtkm::cont::CoordinateSystem:
vtkm::cont::Field

Classes

struct  StorageToArrayDefault
 
struct  StorageToArrayNonDefault
 

Public Types

using MultiplexerArrayType = vtkm::cont::ArrayHandleMultiplexerFromList< vtkm::ListAppend< ArraysFloatDefault, ArraysFloatNonDefault > >
 
- Public Types inherited from vtkm::cont::Field
enum  Association {
  Association::Any, Association::WholeDataSet, Association::Points, Association::Cells,
  Association::Partitions, Association::Global
}
 Identifies what elements of a data set a field is associated with. More...
 

Public Member Functions

 CoordinateSystem ()
 
 CoordinateSystem (const vtkm::cont::Field &src)
 
 CoordinateSystem (std::string name, const vtkm::cont::UnknownArrayHandle &data)
 
template<typename T , typename Storage >
 CoordinateSystem (std::string name, const ArrayHandle< T, Storage > &data)
 
 CoordinateSystem (std::string name, vtkm::Id3 dimensions, vtkm::Vec3f origin=vtkm::Vec3f(0.0f, 0.0f, 0.0f), vtkm::Vec3f spacing=vtkm::Vec3f(1.0f, 1.0f, 1.0f))
 This constructor of coordinate system sets up a regular grid of points. More...
 
vtkm::Id GetNumberOfPoints () const
 
vtkm::cont::UncertainArrayHandle< vtkm::TypeListFieldVec3, ::vtkm::cont::StorageListCommonGetData () const
 
MultiplexerArrayType GetDataAsMultiplexer () const
 Returns the data for the coordinate system as an ArrayHandleMultiplexer. More...
 
void GetRange (vtkm::Range *range) const
 
vtkm::Vec< vtkm::Range, 3 > GetRange () const
 
vtkm::cont::ArrayHandle< vtkm::RangeGetRangeAsArrayHandle () const
 
vtkm::Bounds GetBounds () const
 
void PrintSummary (std::ostream &out, bool full=false) const override
 Print a summary of the data in the field. More...
 
void ReleaseResourcesExecution () override
 Remove the data from the device memory (but preserve the data on the host). More...
 
- Public Member Functions inherited from vtkm::cont::Field
 Field ()=default
 
 Field (std::string name, Association association, const vtkm::cont::UnknownArrayHandle &data)
 Create a field with the given name, association, and data. More...
 
template<typename T , typename Storage >
 Field (std::string name, Association association, const vtkm::cont::ArrayHandle< T, Storage > &data)
 Create a field with the given name, association, and data. More...
 
 Field (const vtkm::cont::Field &src)
 
 Field (vtkm::cont::Field &&src) noexcept
 
virtual ~Field ()
 
Fieldoperator= (const vtkm::cont::Field &src)
 
Fieldoperator= (vtkm::cont::Field &&src) noexcept
 
bool IsCellField () const
 Return true if this field is associated with cells. More...
 
bool IsPointField () const
 Return true if this field is associated with points. More...
 
bool IsWholeDataSetField () const
 Return true if this field is associated with the whole data set. More...
 
bool IsPartitionsField () const
 Return true if this field is associated with partitions in a partitioned data set. More...
 
bool IsGlobalField () const
 Return true if this field is global. More...
 
bool IsSupportedType () const
 Returns true if the array of the field has a value type that matches something in VTKM_FIELD_TYPE_LIST and a storage that matches something in VTKM_FIELD_STORAGE_LIST. More...
 
vtkm::Id GetNumberOfValues () const
 Return the number of values in the field array. More...
 
const std::string & GetName () const
 Return the name of the field. More...
 
Association GetAssociation () const
 Return the association of the field. More...
 
const vtkm::cont::UnknownArrayHandleGetData () const
 Get the array of the data for the field. More...
 
vtkm::cont::UnknownArrayHandleGetData ()
 Get the array of the data for the field. More...
 
const vtkm::cont::ArrayHandle< vtkm::Range > & GetRange () const
 Returns the range of each component in the field array. More...
 
void GetRange (vtkm::Range *range) const
 Returns the range of each component in the field array. More...
 
vtkm::cont::UnknownArrayHandle GetDataAsDefaultFloat () const
 Get the data as an array with vtkm::FloatDefault components. More...
 
vtkm::cont::UnknownArrayHandle GetDataWithExpectedTypes () const
 Get the data as an array of an expected type. More...
 
void ConvertToExpected ()
 Convert this field to use an array of an expected type. More...
 
void SetData (const vtkm::cont::UnknownArrayHandle &newdata)
 
template<typename T , typename StorageTag >
void SetData (const vtkm::cont::ArrayHandle< T, StorageTag > &newdata)
 

Private Types

using Superclass = vtkm::cont::Field
 
using FloatNonDefault = vtkm::Float64
 
using Vec3f_nd = vtkm::Vec< FloatNonDefault, 3 >
 
using ArraysFloatDefault = vtkm::ListTransform< vtkm::ListRemoveIf< ::vtkm::cont::StorageListCommon, StorageToArrayDefault::IsInvalid >, StorageToArrayDefault::Transform >
 
using ArraysFloatNonDefault = vtkm::ListTransform< vtkm::ListRemoveIf< ::vtkm::cont::StorageListCommon, StorageToArrayNonDefault::IsInvalid >, StorageToArrayNonDefault::Transform >
 

Detailed Description

Manages a coordinate system for a DataSet.

A coordinate system is really a field with a special meaning, so CoordinateSystem class inherits from the Field class. CoordinateSystem constrains the field to be associated with points and typically has 3D floating point vectors for values.

Member Typedef Documentation

◆ ArraysFloatDefault

◆ ArraysFloatNonDefault

◆ FloatNonDefault

◆ MultiplexerArrayType

◆ Superclass

◆ Vec3f_nd

Constructor & Destructor Documentation

◆ CoordinateSystem() [1/5]

vtkm::cont::CoordinateSystem::CoordinateSystem ( )

◆ CoordinateSystem() [2/5]

vtkm::cont::CoordinateSystem::CoordinateSystem ( const vtkm::cont::Field src)

◆ CoordinateSystem() [3/5]

vtkm::cont::CoordinateSystem::CoordinateSystem ( std::string  name,
const vtkm::cont::UnknownArrayHandle data 
)

◆ CoordinateSystem() [4/5]

template<typename T , typename Storage >
vtkm::cont::CoordinateSystem::CoordinateSystem ( std::string  name,
const ArrayHandle< T, Storage > &  data 
)
inline

◆ CoordinateSystem() [5/5]

vtkm::cont::CoordinateSystem::CoordinateSystem ( std::string  name,
vtkm::Id3  dimensions,
vtkm::Vec3f  origin = vtkm::Vec3f(0.0f, 0.0f, 0.0f),
vtkm::Vec3f  spacing = vtkm::Vec3f(1.0f, 1.0f, 1.0f) 
)

This constructor of coordinate system sets up a regular grid of points.

Member Function Documentation

◆ GetBounds()

vtkm::Bounds vtkm::cont::CoordinateSystem::GetBounds ( ) const
inline

◆ GetData()

vtkm::cont::UncertainArrayHandle<vtkm::TypeListFieldVec3, ::vtkm::cont::StorageListCommon > vtkm::cont::CoordinateSystem::GetData ( ) const

◆ GetDataAsMultiplexer()

MultiplexerArrayType vtkm::cont::CoordinateSystem::GetDataAsMultiplexer ( ) const

Returns the data for the coordinate system as an ArrayHandleMultiplexer.

This array will handle all potential types supported by CoordinateSystem, so all types can be handled with one compile pass. However, using this precludes specialization for special arrays such as ArrayHandleUniformPointCoordinates that could have optimized code paths

◆ GetNumberOfPoints()

vtkm::Id vtkm::cont::CoordinateSystem::GetNumberOfPoints ( ) const
inline

◆ GetRange() [1/2]

vtkm::Vec<vtkm::Range, 3> vtkm::cont::CoordinateSystem::GetRange ( ) const
inline

◆ GetRange() [2/2]

void vtkm::cont::CoordinateSystem::GetRange ( vtkm::Range range) const
inline

◆ GetRangeAsArrayHandle()

vtkm::cont::ArrayHandle<vtkm::Range> vtkm::cont::CoordinateSystem::GetRangeAsArrayHandle ( ) const
inline

◆ PrintSummary()

void vtkm::cont::CoordinateSystem::PrintSummary ( std::ostream &  out,
bool  full = false 
) const
overridevirtual

Print a summary of the data in the field.

Reimplemented from vtkm::cont::Field.

◆ ReleaseResourcesExecution()

void vtkm::cont::CoordinateSystem::ReleaseResourcesExecution ( )
inlineoverridevirtual

Remove the data from the device memory (but preserve the data on the host).

Reimplemented from vtkm::cont::Field.


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