TransportTagCellSetIn.h 2.11 KB
Newer Older
1
2
3
4
5
6
7
8
//============================================================================
//  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.
//
Kenneth Moreland's avatar
Kenneth Moreland committed
9
//  Copyright 2014 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
10
//  Copyright 2014 UT-Battelle, LLC.
11
//  Copyright 2014 Los Alamos National Security.
12
//
Kenneth Moreland's avatar
Kenneth Moreland committed
13
//  Under the terms of Contract DE-NA0003525 with NTESS,
14
15
16
17
18
19
//  the U.S. Government retains certain rights in this software.
//
//  Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
//  Laboratory (LANL), the U.S. Government retains certain rights in
//  this software.
//============================================================================
20
21
#ifndef vtk_m_cont_arg_TransportTagCellSetIn_h
#define vtk_m_cont_arg_TransportTagCellSetIn_h
22
23
24

#include <vtkm/Types.h>

25
#include <vtkm/cont/CellSet.h>
26
27
28

#include <vtkm/cont/arg/Transport.h>

29
30
31
32
33
34
namespace vtkm
{
namespace cont
{
namespace arg
{
35
36
37

/// \brief \c Transport tag for input arrays.
///
38
/// \c TransportTagCellSetIn is a tag used with the \c Transport class to
39
40
/// transport topology objects for input data.
///
41
42
43
44
template <typename FromTopology, typename ToTopology>
struct TransportTagCellSetIn
{
};
45

46
template <typename FromTopology, typename ToTopology, typename ContObjectType, typename Device>
47
48
struct Transport<vtkm::cont::arg::TransportTagCellSetIn<FromTopology, ToTopology>,
                 ContObjectType,
49
                 Device>
50
{
51
52
  VTKM_IS_CELL_SET(ContObjectType);

53
54
  using ExecObjectType = decltype(
    std::declval<ContObjectType>().PrepareForInput(Device(), FromTopology(), ToTopology()));
55

56
  template <typename InputDomainType>
57
58
  VTKM_CONT ExecObjectType
  operator()(const ContObjectType& object, const InputDomainType&, vtkm::Id, vtkm::Id) const
59
  {
60
    return object.PrepareForInput(Device(), FromTopology(), ToTopology());
61
62
63
64
65
66
  }
};
}
}
} // namespace vtkm::cont::arg

67
#endif //vtk_m_cont_arg_TransportTagCellSetIn_h