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 using ParticleType =
typename DSIType::PType;
34 ParticleAdvector(
const vtkm::filter::flow::internal::BoundsMap& bm,
35 const std::vector<DSIType>& blocks,
36 const bool& useThreaded,
37 const bool& useAsyncComm)
40 , UseThreadedAlgorithm(useThreaded)
41 , UseAsynchronousCommunication(useAsyncComm)
48 if (!this->UseThreadedAlgorithm)
50 using AlgorithmType = vtkm::filter::flow::internal::AdvectAlgorithm<DSIType>;
51 return this->RunAlgo<AlgorithmType>(seeds, stepSize);
55 using AlgorithmType = vtkm::filter::flow::internal::AdvectAlgorithmThreaded<DSIType>;
56 return this->RunAlgo<AlgorithmType>(seeds, stepSize);
61 template <
typename AlgorithmType>
65 AlgorithmType algo(this->BoundsMap, this->Blocks, this->UseAsynchronousCommunication);
66 algo.Execute(seeds, stepSize);
67 return algo.GetOutput();
70 std::vector<DSIType> Blocks;
71 vtkm::filter::flow::internal::BoundsMap BoundsMap;
72 bool UseThreadedAlgorithm;
73 bool UseAsynchronousCommunication =
true;
82 #endif //vtk_m_filter_flow_internal_ParticleAdvector_h