2019-03-25 20:10:58 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2019-03-25 20:10:58 +00:00
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
|
|
|
//============================================================================
|
|
|
|
|
2019-10-07 19:39:02 +00:00
|
|
|
#ifndef vtk_m_filter_Pathline_hxx
|
|
|
|
#define vtk_m_filter_Pathline_hxx
|
|
|
|
|
2019-03-25 20:10:58 +00:00
|
|
|
#include <vtkm/cont/ErrorFilterExecution.h>
|
2021-06-11 12:00:25 +00:00
|
|
|
#include <vtkm/filter/Pathline.h>
|
2021-02-05 14:40:50 +00:00
|
|
|
#include <vtkm/filter/particleadvection/BoundsMap.h>
|
|
|
|
#include <vtkm/filter/particleadvection/DataSetIntegrator.h>
|
2021-06-11 12:00:25 +00:00
|
|
|
#include <vtkm/filter/particleadvection/ParticleAdvectionAlgorithm.h>
|
2019-03-25 20:10:58 +00:00
|
|
|
|
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace filter
|
|
|
|
{
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2021-11-22 20:10:08 +00:00
|
|
|
template <typename ParticleType>
|
2021-11-23 03:20:38 +00:00
|
|
|
inline VTKM_CONT PathlineBase<ParticleType>::PathlineBase()
|
|
|
|
: vtkm::filter::FilterTemporalParticleAdvection<PathlineBase<ParticleType>, ParticleType>()
|
2019-03-25 20:10:58 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2021-11-22 20:10:08 +00:00
|
|
|
template <typename ParticleType>
|
2021-02-05 14:40:50 +00:00
|
|
|
template <typename DerivedPolicy>
|
2021-11-23 03:20:38 +00:00
|
|
|
inline VTKM_CONT vtkm::cont::PartitionedDataSet PathlineBase<ParticleType>::PrepareForExecution(
|
2021-02-05 14:40:50 +00:00
|
|
|
const vtkm::cont::PartitionedDataSet& input,
|
2019-03-25 20:10:58 +00:00
|
|
|
const vtkm::filter::PolicyBase<DerivedPolicy>&)
|
|
|
|
{
|
2021-02-05 14:40:50 +00:00
|
|
|
using AlgorithmType = vtkm::filter::particleadvection::PathlineAlgorithm;
|
|
|
|
using ThreadedAlgorithmType = vtkm::filter::particleadvection::PathlineThreadedAlgorithm;
|
2021-11-22 20:10:08 +00:00
|
|
|
using TDSIType = vtkm::filter::particleadvection::TemporalDataSetIntegrator;
|
2019-03-25 20:10:58 +00:00
|
|
|
|
2021-06-11 12:00:25 +00:00
|
|
|
this->ValidateOptions(input);
|
|
|
|
|
|
|
|
vtkm::filter::particleadvection::BoundsMap boundsMap(input);
|
|
|
|
auto dsi = this->CreateDataSetIntegrators(input, boundsMap);
|
|
|
|
|
2021-02-05 14:40:50 +00:00
|
|
|
if (this->GetUseThreadedAlgorithm())
|
2021-11-22 20:10:08 +00:00
|
|
|
return vtkm::filter::particleadvection::RunAlgo<TDSIType, ThreadedAlgorithmType>(
|
2021-02-05 14:40:50 +00:00
|
|
|
boundsMap, dsi, this->NumberOfSteps, this->StepSize, this->Seeds);
|
|
|
|
else
|
2021-11-22 20:10:08 +00:00
|
|
|
return vtkm::filter::particleadvection::RunAlgo<TDSIType, AlgorithmType>(
|
2021-02-05 14:40:50 +00:00
|
|
|
boundsMap, dsi, this->NumberOfSteps, this->StepSize, this->Seeds);
|
2019-03-25 20:10:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
} // namespace vtkm::filter
|
2019-10-07 19:39:02 +00:00
|
|
|
#endif
|