11 #ifndef vtk_m_filter_flow_internal_ParticleAdvector_h
12 #define vtk_m_filter_flow_internal_ParticleAdvector_h
28 template <
typename DSIType>
29 class ParticleAdvector
32 ParticleAdvector(
const vtkm::filter::flow::internal::BoundsMap& bm,
33 const std::vector<DSIType>& blocks,
34 const bool& useThreaded,
39 , UseThreadedAlgorithm(useThreaded)
51 [&](
const auto& concreteSeeds) {
52 result = this->Execute(numSteps, stepSize, concreteSeeds);
59 template <
typename AlgorithmType,
typename ParticleType>
64 AlgorithmType algo(this->BoundsMap, this->Blocks);
65 algo.Execute(numSteps, stepSize, seeds);
66 return algo.GetOutput();
69 template <
typename ParticleType>
74 if (!this->UseThreadedAlgorithm)
78 using AlgorithmType = vtkm::filter::flow::internal::
79 AdvectAlgorithm<DSIType, vtkm::worklet::flow::ParticleAdvectionResult, ParticleType>;
81 return this->RunAlgo<AlgorithmType, ParticleType>(numSteps, stepSize, seeds);
85 using AlgorithmType = vtkm::filter::flow::internal::
86 AdvectAlgorithm<DSIType, vtkm::worklet::flow::StreamlineResult, ParticleType>;
88 return this->RunAlgo<AlgorithmType, ParticleType>(numSteps, stepSize, seeds);
95 using AlgorithmType = vtkm::filter::flow::internal::AdvectAlgorithmThreaded<
100 return this->RunAlgo<AlgorithmType, ParticleType>(numSteps, stepSize, seeds);
104 using AlgorithmType = vtkm::filter::flow::internal::
105 AdvectAlgorithmThreaded<DSIType, vtkm::worklet::flow::StreamlineResult, ParticleType>;
107 return this->RunAlgo<AlgorithmType, ParticleType>(numSteps, stepSize, seeds);
113 std::vector<DSIType> Blocks;
114 vtkm::filter::flow::internal::BoundsMap BoundsMap;
116 bool UseThreadedAlgorithm;
125 #endif //vtk_m_filter_flow_internal_ParticleAdvector_h