2017-07-11 12:33:56 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2017-07-11 12:33:56 +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.
|
|
|
|
//============================================================================
|
|
|
|
#ifndef vtk_m_exec_arg_OnBoundary_h
|
|
|
|
#define vtk_m_exec_arg_OnBoundary_h
|
|
|
|
|
|
|
|
#include <vtkm/exec/arg/ExecutionSignatureTagBase.h>
|
|
|
|
#include <vtkm/exec/arg/Fetch.h>
|
|
|
|
#include <vtkm/exec/arg/ThreadIndicesPointNeighborhood.h>
|
|
|
|
|
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace exec
|
|
|
|
{
|
|
|
|
namespace arg
|
|
|
|
{
|
|
|
|
|
|
|
|
/// \brief Aspect tag to use for getting if a point is a boundary point.
|
|
|
|
///
|
2018-12-03 19:44:17 +00:00
|
|
|
/// The \c AspectTagBoundary aspect tag causes the \c Fetch class to obtain
|
2017-07-11 12:33:56 +00:00
|
|
|
/// if the point is on a boundary.
|
|
|
|
///
|
2018-12-03 19:44:17 +00:00
|
|
|
struct AspectTagBoundary
|
2017-07-11 12:33:56 +00:00
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// \brief The \c ExecutionSignature tag to get if executing on a boundary element
|
|
|
|
///
|
2018-12-03 19:44:17 +00:00
|
|
|
struct Boundary : vtkm::exec::arg::ExecutionSignatureTagBase
|
2017-07-11 12:33:56 +00:00
|
|
|
{
|
2018-02-27 14:25:25 +00:00
|
|
|
static constexpr vtkm::IdComponent INDEX = 1;
|
2018-12-03 19:44:17 +00:00
|
|
|
using AspectTag = vtkm::exec::arg::AspectTagBoundary;
|
2017-07-11 12:33:56 +00:00
|
|
|
};
|
|
|
|
|
2018-11-18 17:41:13 +00:00
|
|
|
template <typename FetchTag, typename ExecObjectType>
|
2017-07-11 12:33:56 +00:00
|
|
|
struct Fetch<FetchTag,
|
2018-12-03 19:44:17 +00:00
|
|
|
vtkm::exec::arg::AspectTagBoundary,
|
2018-11-18 17:41:13 +00:00
|
|
|
vtkm::exec::arg::ThreadIndicesPointNeighborhood,
|
2017-07-11 12:33:56 +00:00
|
|
|
ExecObjectType>
|
|
|
|
{
|
2018-11-18 17:41:13 +00:00
|
|
|
using ThreadIndicesType = vtkm::exec::arg::ThreadIndicesPointNeighborhood;
|
2017-07-11 12:33:56 +00:00
|
|
|
|
2018-12-03 19:44:17 +00:00
|
|
|
using ValueType = vtkm::exec::BoundaryState;
|
2017-07-11 12:33:56 +00:00
|
|
|
|
|
|
|
VTKM_SUPPRESS_EXEC_WARNINGS
|
|
|
|
VTKM_EXEC
|
|
|
|
ValueType Load(const ThreadIndicesType& indices, const ExecObjectType&) const
|
|
|
|
{
|
|
|
|
return indices.GetBoundaryState();
|
|
|
|
}
|
|
|
|
|
|
|
|
VTKM_EXEC
|
|
|
|
void Store(const ThreadIndicesType&, const ExecObjectType&, const ValueType&) const
|
|
|
|
{
|
|
|
|
// Store is a no-op.
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // namespace vtkm::exec::arg
|
|
|
|
|
|
|
|
#endif //vtk_m_exec_arg_OnBoundary_h
|