3#ifndef vtkDGOperation_h
4#define vtkDGOperation_h
11VTK_ABI_NAMESPACE_BEGIN
34template <
typename InputIterator,
typename OutputIterator>
81 bool includeShape =
true);
93 bool Evaluate(InputIterator& inIter, OutputIterator& outIter, vtkTypeUInt64 begin = 0,
94 vtkTypeUInt64 end = ~0);
141 if (!TLOp.
Local().Prepare(this->DGCell, this->CellAtt, this->OpName))
143 throw std::runtime_error(
"Could not initialize operation for evaluation.");
149 TLOp.
Local()(this->InIter, this->OutIter, begin, end);
162 int NumberOfResultComponents{ 0 };
A function defined over the physical domain of a vtkCellGrid.
Visualization data composed of cells of arbitrary type.
Base class for a discontinuous Galerkin cells of all shapes.
A base class for operator evaluators.
Encapsulate the state required to evaluate DG cell-attributes.
Invoke an operator on DG cells/sides.
bool Prepare(vtkDGCell *cellType, vtkCellAttribute *cellAttribute, vtkStringToken operationName, bool includeShape=true)
Prepare this instance of vtkDGOperation to evaluate operationName on the given cellType and cellAttri...
int GetNumberOfResultComponents() const
Return the number of values generated per tuple each time an input cell-id and parameter-value are ev...
OpEval GetEvaluatorForSideSpec(vtkDGCell *cell, int sideSpecId)
Return a function that can be called on the named sideSpecId.
EvaluatorMap::const_iterator FindEvaluator(RangeKey cellKey, const EvaluatorMap &evaluators)
Return the first iterator to an entry of evaluators that covers cellKey.
std::map< RangeKey, OpEvalEntry > EvaluatorMap
Container for functions that evaluate data on a single vtkDGCell::Source instance.
vtkDGOperation(vtkDGCell *cellType, vtkCellAttribute *cellAttribute, vtkStringToken operationName)
vtkDGCellRangeEvaluator< InputIterator, OutputIterator > OpEval
The signature for a function that evaluates iterators over a range.
vtkDGOperation()=default
Construct an operation object.
void AddSource(vtkCellGrid *grid, vtkDGCell *cellType, std::size_t sideSpecIdx, vtkCellAttribute *cellAtt, const vtkCellAttribute::CellTypeInfo &cellTypeInfo, vtkDGOperatorEntry &op, bool includeShape)
bool Evaluate(InputIterator &inIter, OutputIterator &outIter, vtkTypeUInt64 begin=0, vtkTypeUInt64 end=~0)
Evaluate the prepared operator on the given cellIds at the given rst parameters, storing results in t...
vtkDGOperation(const SelfType &other)
void PrintSelf(std::ostream &os, vtkIndent indent)
A record for a basis in a function space that is specific to one cell shape.
dynamic, self-adjusting array of double
a simple class to control print indentation
Thread local storage for VTK objects.
T & Local()
This needs to be called mainly within a threaded execution path.
Represent a string by its integer hash.
A range of cell IDs handled by a vtkDGCell::Source instance.
bool ContainedBy(const RangeKey &other) const
bool operator<(const RangeKey &other) const
bool Contains(vtkTypeUInt64 cellId) const
A vtkSMPTools worker class for evaluating an operation across a range of cells.
void operator()(vtkIdType begin, vtkIdType end)
Worker(InputIterator &inIter, OutputIterator &outIter, vtkDGCell *dgCell, vtkCellAttribute *cellAtt, vtkStringToken opName)
vtkSMPThreadLocal< vtkDGOperation< InputIterator, OutputIterator > > TLOp
#define VTK_ALWAYS_EXPORT
std::function< void(InputIterator &inIter, OutputIterator &outIter, vtkTypeUInt64 begin, vtkTypeUInt64 end)> vtkDGCellRangeEvaluator
Signature for a method to evaluate data on a single vtkDGCell::Source instance.