2016-12-16 22:04:58 +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.
|
|
|
|
//
|
2017-09-20 21:33:44 +00:00
|
|
|
// Copyright 2015 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
|
2016-12-16 22:04:58 +00:00
|
|
|
// Copyright 2015 UT-Battelle, LLC.
|
|
|
|
// Copyright 2015 Los Alamos National Security.
|
|
|
|
//
|
2017-09-20 21:33:44 +00:00
|
|
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
2016-12-16 22:04:58 +00:00
|
|
|
// 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.
|
|
|
|
//============================================================================
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace cont
|
2016-12-16 22:04:58 +00:00
|
|
|
{
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
|
|
CellSetStructured<DIMENSION>::CellSetStructured(const CellSetStructured<DIMENSION>& src)
|
|
|
|
: CellSet(src)
|
|
|
|
, Structure(src.Structure)
|
|
|
|
{
|
2016-12-16 22:04:58 +00:00
|
|
|
}
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
|
|
CellSetStructured<DIMENSION>& CellSetStructured<DIMENSION>::operator=(
|
|
|
|
const CellSetStructured<DIMENSION>& src)
|
2016-12-16 22:04:58 +00:00
|
|
|
{
|
|
|
|
this->CellSet::operator=(src);
|
|
|
|
this->Structure = src.Structure;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
|
|
template <typename TopologyElement>
|
2016-12-16 22:04:58 +00:00
|
|
|
typename CellSetStructured<DIMENSION>::SchedulingRangeType
|
2017-05-18 14:29:41 +00:00
|
|
|
CellSetStructured<DIMENSION>::GetSchedulingRange(TopologyElement) const
|
2016-12-16 22:04:58 +00:00
|
|
|
{
|
|
|
|
VTKM_IS_TOPOLOGY_ELEMENT_TAG(TopologyElement);
|
|
|
|
return this->Structure.GetSchedulingRange(TopologyElement());
|
|
|
|
}
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
|
|
template <typename DeviceAdapter, typename FromTopology, typename ToTopology>
|
2017-05-26 17:53:28 +00:00
|
|
|
typename CellSetStructured<
|
|
|
|
DIMENSION>::template ExecutionTypes<DeviceAdapter, FromTopology, ToTopology>::ExecObjectType
|
2017-05-18 14:29:41 +00:00
|
|
|
CellSetStructured<DIMENSION>::PrepareForInput(DeviceAdapter, FromTopology, ToTopology) const
|
2016-12-16 22:04:58 +00:00
|
|
|
{
|
2017-08-16 15:34:21 +00:00
|
|
|
using ConnectivityType =
|
|
|
|
typename ExecutionTypes<DeviceAdapter, FromTopology, ToTopology>::ExecObjectType;
|
2016-12-16 22:04:58 +00:00
|
|
|
return ConnectivityType(this->Structure);
|
|
|
|
}
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
|
|
void CellSetStructured<DIMENSION>::PrintSummary(std::ostream& out) const
|
2016-12-16 22:04:58 +00:00
|
|
|
{
|
|
|
|
out << " StructuredCellSet: " << this->GetName() << std::endl;
|
|
|
|
this->Structure.PrintSummary(out);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|