VTK-m
2.2
|
Base class for all CellLocator
classes.
More...
#include <CellLocatorBase.h>
Public Member Functions | |
virtual | ~CellLocatorBase ()=default |
const vtkm::cont::UnknownCellSet & | GetCellSet () 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::CoordinateSystem & | GetCoordinates () 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 |
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()
.
|
virtualdefault |
|
protectedpure virtual |
|
inline |
Specify the CellSet
defining the structure of the cells being searched.
This is typically retrieved from the vtkm::cont::DataSet::GetCellSet()
method.
|
inline |
Specify the CoordinateSystem
defining the location of the cells.
This is typically retrieved from the vtkm::cont::DataSet::GetCoordinateSystem()
method.
|
inlineprotected |
|
inline |
Specify the CellSet
defining the structure of the cells being searched.
This is typically retrieved from the vtkm::cont::DataSet::GetCellSet()
method.
|
inline |
Specify the CoordinateSystem
defining the location of the cells.
This is typically retrieved from the vtkm::cont::DataSet::GetCoordinateSystem()
method.
|
inlineprotected |
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.
|
private |
|
private |
|
mutableprivate |