VTK-m  2.2
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
vtkm::cont::CellLocatorBase Class Referenceabstract

Base class for all CellLocator classes. More...

#include <CellLocatorBase.h>

Inheritance diagram for vtkm::cont::CellLocatorBase:
vtkm::cont::ExecutionObjectBase vtkm::cont::CellLocatorBoundingIntervalHierarchy vtkm::cont::CellLocatorGeneral vtkm::cont::CellLocatorRectilinearGrid vtkm::cont::CellLocatorTwoLevel vtkm::cont::CellLocatorUniformBins vtkm::cont::CellLocatorUniformGrid

Public Member Functions

virtual ~CellLocatorBase ()=default
 
const vtkm::cont::UnknownCellSetGetCellSet () const
 Specify the CellSet defining the structure of the cells being searched. More...
 
void SetCellSet (const vtkm::cont::UnknownCellSet &cellSet)
 Specify the CellSet defining the structure of the cells being searched. More...
 
const vtkm::cont::CoordinateSystemGetCoordinates () const
 Specify the CoordinateSystem defining the location of the cells. More...
 
void SetCoordinates (const vtkm::cont::CoordinateSystem &coords)
 Specify the CoordinateSystem defining the location of the cells. More...
 
void Update () const
 Build the search structure used to look up cells. More...
 

Protected Member Functions

void SetModified ()
 
bool GetModified () const
 
virtual void Build ()=0
 

Private Attributes

vtkm::cont::UnknownCellSet CellSet
 
vtkm::cont::CoordinateSystem Coords
 
bool Modified = true
 

Detailed Description

Base class for all CellLocator classes.

CellLocatorBase uses the curiously recurring template pattern (CRTP). Subclasses must provide their own type for the template parameter. Subclasses must implement Build() and PrepareForExecution() methods.

If a derived class changes its state in a way that invalidates its internal search structure, it should call the protected SetModified() method. This will alert the base class to rebuild the structure on the next call to Update().

Constructor & Destructor Documentation

◆ ~CellLocatorBase()

virtual vtkm::cont::CellLocatorBase::~CellLocatorBase ( )
virtualdefault

Member Function Documentation

◆ Build()

virtual void vtkm::cont::CellLocatorBase::Build ( )
protectedpure virtual

◆ GetCellSet()

const vtkm::cont::UnknownCellSet& vtkm::cont::CellLocatorBase::GetCellSet ( ) const
inline

Specify the CellSet defining the structure of the cells being searched.

This is typically retrieved from the vtkm::cont::DataSet::GetCellSet() method.

◆ GetCoordinates()

const vtkm::cont::CoordinateSystem& vtkm::cont::CellLocatorBase::GetCoordinates ( ) const
inline

Specify the CoordinateSystem defining the location of the cells.

This is typically retrieved from the vtkm::cont::DataSet::GetCoordinateSystem() method.

◆ GetModified()

bool vtkm::cont::CellLocatorBase::GetModified ( ) const
inlineprotected

◆ SetCellSet()

void vtkm::cont::CellLocatorBase::SetCellSet ( const vtkm::cont::UnknownCellSet cellSet)
inline

Specify the CellSet defining the structure of the cells being searched.

This is typically retrieved from the vtkm::cont::DataSet::GetCellSet() method.

◆ SetCoordinates()

void vtkm::cont::CellLocatorBase::SetCoordinates ( const vtkm::cont::CoordinateSystem coords)
inline

Specify the CoordinateSystem defining the location of the cells.

This is typically retrieved from the vtkm::cont::DataSet::GetCoordinateSystem() method.

◆ SetModified()

void vtkm::cont::CellLocatorBase::SetModified ( )
inlineprotected

◆ Update()

void vtkm::cont::CellLocatorBase::Update ( ) const

Build the search structure used to look up cells.

This method must be called after the cells and coordiantes are specified with SetCellSet() and SetCoordinates(), respectively. The method must also be called before it is used with a worklet. Before building the search structure Update() checks to see if the structure is already built and up to date. If so, the method quickly returns. Thus, it is good practice to call Update() before each use in a worklet.

Although Update() is called from the control environment, it lauches jobs in the execution environment to quickly build the search structure.

Member Data Documentation

◆ CellSet

vtkm::cont::UnknownCellSet vtkm::cont::CellLocatorBase::CellSet
private

◆ Coords

vtkm::cont::CoordinateSystem vtkm::cont::CellLocatorBase::Coords
private

◆ Modified

bool vtkm::cont::CellLocatorBase::Modified = true
mutableprivate

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