2020-06-18 18:54:18 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//============================================================================
|
|
|
|
#ifndef vtk_m_cont_ParticleArrayCopy_h
|
|
|
|
#define vtk_m_cont_ParticleArrayCopy_h
|
|
|
|
|
|
|
|
#include <vtkm/Particle.h>
|
|
|
|
#include <vtkm/cont/ArrayHandle.h>
|
2020-06-19 14:57:30 +00:00
|
|
|
#include <vtkm/cont/vtkm_cont_export.h>
|
2020-06-18 18:54:18 +00:00
|
|
|
|
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace cont
|
|
|
|
{
|
|
|
|
|
|
|
|
/// \brief Copy fields in vtkm::Particle to standard types.
|
|
|
|
///
|
|
|
|
/// Given an \c ArrayHandle of vtkm::Particle, this function copies the
|
|
|
|
/// position field into an \c ArrayHandle of \c Vec3f objects.
|
|
|
|
///
|
2020-07-21 01:15:46 +00:00
|
|
|
|
|
|
|
template <typename ParticleType>
|
|
|
|
VTKM_ALWAYS_EXPORT inline void ParticleArrayCopy(
|
|
|
|
const vtkm::cont::ArrayHandle<ParticleType, vtkm::cont::StorageTagBasic>& inP,
|
2020-08-13 13:53:57 +00:00
|
|
|
vtkm::cont::ArrayHandle<vtkm::Vec3f, vtkm::cont::StorageTagBasic>& outPos,
|
|
|
|
bool CopyTerminatedOnly = false);
|
2020-06-18 18:54:18 +00:00
|
|
|
|
|
|
|
/// \brief Copy all fields in vtkm::Particle to standard types.
|
|
|
|
///
|
|
|
|
/// Given an \c ArrayHandle of vtkm::Particle, this function copies the
|
|
|
|
/// position, ID, number of steps, status and time into a separate
|
|
|
|
/// \c ArrayHandle.
|
|
|
|
///
|
2020-07-21 01:15:46 +00:00
|
|
|
|
|
|
|
template <typename ParticleType>
|
|
|
|
VTKM_ALWAYS_EXPORT inline void ParticleArrayCopy(
|
|
|
|
const vtkm::cont::ArrayHandle<ParticleType, vtkm::cont::StorageTagBasic>& inP,
|
2020-06-18 23:41:37 +00:00
|
|
|
vtkm::cont::ArrayHandle<vtkm::Vec3f, vtkm::cont::StorageTagBasic>& outPos,
|
|
|
|
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outID,
|
|
|
|
vtkm::cont::ArrayHandle<vtkm::Id, vtkm::cont::StorageTagBasic>& outSteps,
|
|
|
|
vtkm::cont::ArrayHandle<vtkm::ParticleStatus, vtkm::cont::StorageTagBasic>& outStatus,
|
|
|
|
vtkm::cont::ArrayHandle<vtkm::FloatDefault, vtkm::cont::StorageTagBasic>& outTime);
|
2020-06-18 18:54:18 +00:00
|
|
|
}
|
|
|
|
} // namespace vtkm::cont
|
|
|
|
|
2020-07-21 01:15:46 +00:00
|
|
|
#ifndef vtk_m_cont_ParticleArrayCopy_hxx
|
|
|
|
#include <vtkm/cont/ParticleArrayCopy.hxx>
|
|
|
|
#endif //vtk_m_cont_ParticleArrayCopy_hxx
|
|
|
|
|
2020-06-18 18:54:18 +00:00
|
|
|
#endif //vtk_m_cont_ParticleArrayCopy_h
|