Viskores  1.0
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
viskores::cont::CellLocatorBase Class Referenceabstract

Base class for all CellLocator classes. More...

#include <CellLocatorBase.h>

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

Public Member Functions

virtual ~CellLocatorBase ()=default
 
const viskores::cont::UnknownCellSetGetCellSet () const
 Specify the CellSet defining the structure of the cells being searched. More...
 
void SetCellSet (const viskores::cont::UnknownCellSet &cellSet)
 Specify the CellSet defining the structure of the cells being searched. More...
 
const viskores::cont::CoordinateSystemGetCoordinates () const
 Specify the CoordinateSystem defining the location of the cells. More...
 
void SetCoordinates (const viskores::cont::CoordinateSystem &coords)
 Specify the CoordinateSystem defining the location of the cells. More...
 
void SetCoordinates (const viskores::cont::UnknownArrayHandle &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

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

Detailed Description

Base class for all CellLocator classes.

CellLocatorBase subclasses must implement the pure virtual Build() method. They also must provide a PrepareForExecution() method to satisfy the ExecutionObjectBase superclass.

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 viskores::cont::CellLocatorBase::~CellLocatorBase ( )
virtualdefault

Member Function Documentation

◆ Build()

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

◆ GetCellSet()

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

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

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

◆ GetCoordinates()

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

Specify the CoordinateSystem defining the location of the cells.

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

◆ GetModified()

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

◆ SetCellSet()

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

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

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

◆ SetCoordinates() [1/2]

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

Specify the CoordinateSystem defining the location of the cells.

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

◆ SetCoordinates() [2/2]

void viskores::cont::CellLocatorBase::SetCoordinates ( const viskores::cont::UnknownArrayHandle coords)
inline

Specify the CoordinateSystem defining the location of the cells.

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

◆ SetModified()

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

◆ Update()

void viskores::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

viskores::cont::UnknownCellSet viskores::cont::CellLocatorBase::CellSet
private

◆ Coords

viskores::cont::CoordinateSystem viskores::cont::CellLocatorBase::Coords
private

◆ Modified

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

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