5db762ee71
The `From` and `To` nomenclature for topology mapping has been confusing for both users and developers, especially at lower levels where the intention of mapping attributes from one element to another is easily conflated with the concept of mapping indices (which maps in the exact opposite direction). These identifiers have been renamed to `VisitTopology` and `IncidentTopology` to clarify the direction of the mapping. The order in which these template parameters are specified for `WorkletMapTopology` have also been reversed, since eventually there may be more than one `IncidentTopology`, and having `IncidentTopology` at the end will allow us to replace it with a variadic template parameter pack in the future. Other implementation details supporting these worklets, include `Fetch` tags, `Connectivity` classes, and methods on the various `CellSet` classes (such as `PrepareForInput` have also reversed their template arguments. These will need to be cautiously updated. The convenience implementations of `WorkletMapTopology` have been renamed for clarity as follows: ``` WorkletMapPointToCell --> WorkletVisitCellsWithPoints WorkletMapCellToPoint --> WorkletVisitPointsWithCells ``` The `ControlSignature` tags have been renamed as follows: ``` FieldInTo --> FieldInVisit FieldInFrom --> FieldInMap FromCount --> IncidentElementCount FromIndices --> IncidentElementIndices ```
82 lines
2.7 KiB
C++
82 lines
2.7 KiB
C++
//============================================================================
|
|
// 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_CellSetStructured_hxx
|
|
#define vtk_m_cont_CellSetStructured_hxx
|
|
|
|
namespace vtkm
|
|
{
|
|
namespace cont
|
|
{
|
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
CellSetStructured<DIMENSION>::CellSetStructured(const CellSetStructured<DIMENSION>& src)
|
|
: CellSet(src)
|
|
, Structure(src.Structure)
|
|
{
|
|
}
|
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
CellSetStructured<DIMENSION>::CellSetStructured(CellSetStructured<DIMENSION>&& src) noexcept
|
|
: CellSet(std::forward<CellSet>(src)),
|
|
Structure(std::move(src.Structure))
|
|
{
|
|
}
|
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
CellSetStructured<DIMENSION>& CellSetStructured<DIMENSION>::operator=(
|
|
const CellSetStructured<DIMENSION>& src)
|
|
{
|
|
this->CellSet::operator=(src);
|
|
this->Structure = src.Structure;
|
|
return *this;
|
|
}
|
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
CellSetStructured<DIMENSION>& CellSetStructured<DIMENSION>::operator=(
|
|
CellSetStructured<DIMENSION>&& src) noexcept
|
|
{
|
|
this->CellSet::operator=(std::forward<CellSet>(src));
|
|
this->Structure = std::move(src.Structure);
|
|
return *this;
|
|
}
|
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
template <typename TopologyElement>
|
|
typename CellSetStructured<DIMENSION>::SchedulingRangeType
|
|
CellSetStructured<DIMENSION>::GetSchedulingRange(TopologyElement) const
|
|
{
|
|
VTKM_IS_TOPOLOGY_ELEMENT_TAG(TopologyElement);
|
|
return this->Structure.GetSchedulingRange(TopologyElement());
|
|
}
|
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
template <typename DeviceAdapter, typename VisitTopology, typename IncidentTopology>
|
|
typename CellSetStructured<DIMENSION>::template ExecutionTypes<DeviceAdapter,
|
|
VisitTopology,
|
|
IncidentTopology>::ExecObjectType
|
|
CellSetStructured<DIMENSION>::PrepareForInput(DeviceAdapter,
|
|
VisitTopology,
|
|
IncidentTopology) const
|
|
{
|
|
using ConnectivityType =
|
|
typename ExecutionTypes<DeviceAdapter, VisitTopology, IncidentTopology>::ExecObjectType;
|
|
return ConnectivityType(this->Structure);
|
|
}
|
|
|
|
template <vtkm::IdComponent DIMENSION>
|
|
void CellSetStructured<DIMENSION>::PrintSummary(std::ostream& out) const
|
|
{
|
|
out << " StructuredCellSet: " << this->GetName() << std::endl;
|
|
this->Structure.PrintSummary(out);
|
|
}
|
|
}
|
|
}
|
|
#endif
|