CellSet classes don't require a name

This commit is contained in:
Robert Maynard 2019-08-13 17:28:37 -04:00
parent 5cd47a7065
commit 3b89bc0db2
63 changed files with 221 additions and 238 deletions

@ -0,0 +1,8 @@
# CellSets now don't have a name
The requirement that `vtkm::cont::CellSets` have a name was so
cell based `vtkm::cont::Field`'s could be associated with the
correct CellSet in a `vtkm::cont::DataSet`.
Now that `DataSet`'s don't support multiple CellSets, we can remove
the `CellSet` name member variable.

@ -27,29 +27,8 @@ namespace cont
class VTKM_CONT_EXPORT CellSet
{
public:
VTKM_CONT
CellSet(const std::string& name)
: Name(name)
{
}
VTKM_CONT
CellSet(const vtkm::cont::CellSet& src)
: Name(src.Name)
{
}
VTKM_CONT
CellSet& operator=(const vtkm::cont::CellSet& src)
{
this->Name = src.Name;
return *this;
}
virtual ~CellSet();
std::string GetName() const { return this->Name; }
virtual vtkm::Id GetNumberOfCells() const = 0;
virtual vtkm::Id GetNumberOfFaces() const = 0;
@ -68,9 +47,6 @@ public:
virtual void PrintSummary(std::ostream&) const = 0;
virtual void ReleaseResourcesExecution() = 0;
protected:
std::string Name;
};
namespace internal

@ -98,7 +98,7 @@ public:
typename VisitCellsWithPointsConnectivityType::ConnectivityArrayType;
using IndexOffsetArrayType = typename VisitCellsWithPointsConnectivityType::IndexOffsetArrayType;
VTKM_CONT CellSetExplicit(const std::string& name = std::string());
VTKM_CONT CellSetExplicit();
VTKM_CONT CellSetExplicit(const Thisclass& src);
VTKM_CONT CellSetExplicit(Thisclass&& src) noexcept;
@ -377,7 +377,6 @@ private:
public:
static VTKM_CONT void save(BinaryBuffer& bb, const Type& cs)
{
vtkmdiy::save(bb, cs.GetName());
vtkmdiy::save(bb, cs.GetNumberOfPoints());
vtkmdiy::save(
bb, cs.GetShapesArray(vtkm::TopologyElementTagCell{}, vtkm::TopologyElementTagPoint{}));
@ -391,8 +390,6 @@ public:
static VTKM_CONT void load(BinaryBuffer& bb, Type& cs)
{
std::string name;
vtkmdiy::load(bb, name);
vtkm::Id numberOfPoints = 0;
vtkmdiy::load(bb, numberOfPoints);
vtkm::cont::ArrayHandle<vtkm::UInt8, ShapeST> shapes;
@ -404,7 +401,7 @@ public:
vtkm::cont::ArrayHandle<vtkm::Id, OffsetST> offsets;
vtkmdiy::load(bb, offsets);
cs = Type(name);
cs = Type{};
cs.Fill(numberOfPoints, shapes, counts, connectivity, offsets);
}
};

@ -25,8 +25,8 @@ template <typename ShapeStorageTag,
VTKM_CONT CellSetExplicit<ShapeStorageTag,
NumIndicesStorageTag,
ConnectivityStorageTag,
OffsetsStorageTag>::CellSetExplicit(const std::string& name)
: CellSet(name)
OffsetsStorageTag>::CellSetExplicit()
: CellSet()
, Data(std::make_shared<Internals>())
{
}
@ -103,7 +103,7 @@ void CellSetExplicit<ShapeStorageTag,
ConnectivityStorageTag,
OffsetsStorageTag>::PrintSummary(std::ostream& out) const
{
out << " ExplicitCellSet: " << this->Name << std::endl;
out << " ExplicitCellSet: " << std::endl;
out << " VisitCellsWithPoints: " << std::endl;
this->Data->VisitCellsWithPoints.PrintSummary(out);
out << " VisitPointsWithCells: " << std::endl;

@ -19,8 +19,8 @@ namespace vtkm
namespace cont
{
CellSetExtrude::CellSetExtrude(const std::string& name)
: vtkm::cont::CellSet(name)
CellSetExtrude::CellSetExtrude()
: vtkm::cont::CellSet()
, IsPeriodic(false)
, NumberOfPointsPerPlane(0)
, NumberOfCellsPerPlane(0)
@ -33,9 +33,8 @@ CellSetExtrude::CellSetExtrude(const vtkm::cont::ArrayHandle<vtkm::Int32>& conn,
vtkm::Int32 numberOfPointsPerPlane,
vtkm::Int32 numberOfPlanes,
const vtkm::cont::ArrayHandle<vtkm::Int32>& nextNode,
bool periodic,
const std::string& name)
: vtkm::cont::CellSet(name)
bool periodic)
: vtkm::cont::CellSet()
, IsPeriodic(periodic)
, NumberOfPointsPerPlane(numberOfPointsPerPlane)
, NumberOfCellsPerPlane(
@ -47,6 +46,81 @@ CellSetExtrude::CellSetExtrude(const vtkm::cont::ArrayHandle<vtkm::Int32>& conn,
{
}
CellSetExtrude::CellSetExtrude(const CellSetExtrude& src)
: CellSet(src)
, IsPeriodic(src.IsPeriodic)
, NumberOfPointsPerPlane(src.NumberOfPointsPerPlane)
, NumberOfCellsPerPlane(src.NumberOfCellsPerPlane)
, NumberOfPlanes(src.NumberOfPlanes)
, Connectivity(src.Connectivity)
, NextNode(src.NextNode)
, ReverseConnectivityBuilt(src.ReverseConnectivityBuilt)
, RConnectivity(src.RConnectivity)
, ROffsets(src.ROffsets)
, RCounts(src.RCounts)
, PrevNode(src.PrevNode)
{
}
CellSetExtrude::CellSetExtrude(CellSetExtrude&& src) noexcept
: CellSet(std::forward<CellSet>(src)),
IsPeriodic(src.IsPeriodic),
NumberOfPointsPerPlane(src.NumberOfPointsPerPlane),
NumberOfCellsPerPlane(src.NumberOfCellsPerPlane),
NumberOfPlanes(src.NumberOfPlanes),
Connectivity(std::move(src.Connectivity)),
NextNode(std::move(src.NextNode)),
ReverseConnectivityBuilt(src.ReverseConnectivityBuilt),
RConnectivity(std::move(src.RConnectivity)),
ROffsets(std::move(src.ROffsets)),
RCounts(std::move(src.RCounts)),
PrevNode(std::move(src.PrevNode))
{
}
CellSetExtrude& CellSetExtrude::operator=(const CellSetExtrude& src)
{
this->CellSet::operator=(src);
this->IsPeriodic = src.IsPeriodic;
this->NumberOfPointsPerPlane = src.NumberOfPointsPerPlane;
this->NumberOfCellsPerPlane = src.NumberOfCellsPerPlane;
this->NumberOfPlanes = src.NumberOfPlanes;
this->Connectivity = src.Connectivity;
this->NextNode = src.NextNode;
this->ReverseConnectivityBuilt = src.ReverseConnectivityBuilt;
this->RConnectivity = src.RConnectivity;
this->ROffsets = src.ROffsets;
this->RCounts = src.RCounts;
this->PrevNode = src.PrevNode;
return *this;
}
CellSetExtrude& CellSetExtrude::operator=(CellSetExtrude&& src) noexcept
{
this->CellSet::operator=(std::forward<CellSet>(src));
this->IsPeriodic = src.IsPeriodic;
this->NumberOfPointsPerPlane = src.NumberOfPointsPerPlane;
this->NumberOfCellsPerPlane = src.NumberOfCellsPerPlane;
this->NumberOfPlanes = src.NumberOfPlanes;
this->Connectivity = std::move(src.Connectivity);
this->NextNode = std::move(src.NextNode);
this->ReverseConnectivityBuilt = src.ReverseConnectivityBuilt;
this->RConnectivity = std::move(src.RConnectivity);
this->ROffsets = std::move(src.ROffsets);
this->RCounts = std::move(src.RCounts);
this->PrevNode = std::move(src.PrevNode);
return *this;
}
CellSetExtrude::~CellSetExtrude()
{
}
vtkm::Int32 CellSetExtrude::GetNumberOfPlanes() const
{
return this->NumberOfPlanes;
@ -167,7 +241,7 @@ vtkm::Id2 CellSetExtrude::GetSchedulingRange(vtkm::TopologyElementTagPoint) cons
void CellSetExtrude::PrintSummary(std::ostream& out) const
{
out << " vtkmCellSetSingleType: " << this->Name << std::endl;
out << " vtkmCellSetSingleType: " << std::endl;
out << " NumberOfCellsPerPlane: " << this->NumberOfCellsPerPlane << std::endl;
out << " NumberOfPointsPerPlane: " << this->NumberOfPointsPerPlane << std::endl;
out << " NumberOfPlanes: " << this->NumberOfPlanes << std::endl;

@ -29,14 +29,21 @@ namespace cont
class VTKM_CONT_EXPORT CellSetExtrude : public CellSet
{
public:
VTKM_CONT CellSetExtrude(const std::string& name = "extrude");
VTKM_CONT CellSetExtrude();
VTKM_CONT CellSetExtrude(const vtkm::cont::ArrayHandle<vtkm::Int32>& conn,
vtkm::Int32 numberOfPointsPerPlane,
vtkm::Int32 numberOfPlanes,
const vtkm::cont::ArrayHandle<vtkm::Int32>& nextNode,
bool periodic,
const std::string& name = "extrude");
bool periodic);
VTKM_CONT CellSetExtrude(const CellSetExtrude& src);
VTKM_CONT CellSetExtrude(CellSetExtrude&& src) noexcept;
VTKM_CONT CellSetExtrude& operator=(const CellSetExtrude& src);
VTKM_CONT CellSetExtrude& operator=(CellSetExtrude&& src) noexcept;
virtual ~CellSetExtrude();
vtkm::Int32 GetNumberOfPlanes() const;
@ -126,11 +133,10 @@ template <typename T>
CellSetExtrude make_CellSetExtrude(const vtkm::cont::ArrayHandle<vtkm::Int32>& conn,
const vtkm::cont::ArrayHandleExtrudeCoords<T>& coords,
const vtkm::cont::ArrayHandle<vtkm::Int32>& nextNode,
bool periodic = true,
const std::string name = "extrude")
bool periodic = true)
{
return CellSetExtrude{
conn, coords.GetNumberOfPointsPerPlane(), coords.GetNumberOfPlanes(), nextNode, periodic, name
conn, coords.GetNumberOfPointsPerPlane(), coords.GetNumberOfPlanes(), nextNode, periodic
};
}
@ -138,15 +144,13 @@ template <typename T>
CellSetExtrude make_CellSetExtrude(const std::vector<vtkm::Int32>& conn,
const vtkm::cont::ArrayHandleExtrudeCoords<T>& coords,
const std::vector<vtkm::Int32>& nextNode,
bool periodic = true,
const std::string name = "extrude")
bool periodic = true)
{
return CellSetExtrude{ vtkm::cont::make_ArrayHandle(conn),
static_cast<vtkm::Int32>(coords.GetNumberOfPointsPerPlane()),
coords.GetNumberOfPlanes(),
vtkm::cont::make_ArrayHandle(nextNode),
periodic,
name };
periodic };
}
}
} // vtkm::cont
@ -183,7 +187,6 @@ private:
public:
static VTKM_CONT void save(BinaryBuffer& bb, const Type& cs)
{
vtkmdiy::save(bb, cs.GetName());
vtkmdiy::save(bb, cs.GetNumberOfPointsPerPlane());
vtkmdiy::save(bb, cs.GetNumberOfPlanes());
vtkmdiy::save(bb, cs.GetIsPeriodic());
@ -193,21 +196,19 @@ public:
static VTKM_CONT void load(BinaryBuffer& bb, Type& cs)
{
std::string name;
vtkm::Int32 numberOfPointsPerPlane;
vtkm::Int32 numberOfPlanes;
bool isPeriodic;
vtkm::cont::ArrayHandle<vtkm::Int32> conn;
vtkm::cont::ArrayHandle<vtkm::Int32> nextNode;
vtkmdiy::load(bb, name);
vtkmdiy::load(bb, numberOfPointsPerPlane);
vtkmdiy::load(bb, numberOfPlanes);
vtkmdiy::load(bb, isPeriodic);
vtkmdiy::load(bb, conn);
vtkmdiy::load(bb, nextNode);
cs = Type{ conn, numberOfPointsPerPlane, numberOfPlanes, nextNode, isPeriodic, name };
cs = Type{ conn, numberOfPointsPerPlane, numberOfPlanes, nextNode, isPeriodic };
}
};

@ -243,17 +243,16 @@ public:
VTKM_CONT
CellSetPermutation(const PermutationArrayHandleType& validCellIds,
const OriginalCellSetType& cellset,
const std::string& name = std::string())
: CellSet(name)
const OriginalCellSetType& cellset)
: CellSet()
, ValidCellIds(validCellIds)
, FullCellSet(cellset)
{
}
VTKM_CONT
CellSetPermutation(const std::string& name = std::string())
: CellSet(name)
CellSetPermutation()
: CellSet()
, ValidCellIds()
, FullCellSet()
{
@ -446,17 +445,15 @@ private:
public:
VTKM_CONT
CellSetPermutation(const PermutationArrayHandleType2& validCellIds,
const CellSetPermutation<CellSetType, PermutationArrayHandleType1>& cellset,
const std::string& name = std::string())
const CellSetPermutation<CellSetType, PermutationArrayHandleType1>& cellset)
: Superclass(vtkm::cont::make_ArrayHandlePermutation(validCellIds, cellset.GetValidCellIds()),
cellset.GetFullCellSet(),
name)
cellset.GetFullCellSet())
{
}
VTKM_CONT
CellSetPermutation(const std::string& name = std::string())
: Superclass(name)
CellSetPermutation()
: Superclass()
{
}
@ -471,19 +468,6 @@ public:
std::shared_ptr<CellSet> NewInstance() const { return std::make_shared<CellSetPermutation>(); }
};
template <typename OriginalCellSet, typename PermutationArrayHandleType>
vtkm::cont::CellSetPermutation<OriginalCellSet, PermutationArrayHandleType> make_CellSetPermutation(
const PermutationArrayHandleType& cellIndexMap,
const OriginalCellSet& cellSet,
const std::string& name)
{
VTKM_IS_CELL_SET(OriginalCellSet);
VTKM_IS_ARRAY_HANDLE(PermutationArrayHandleType);
return vtkm::cont::CellSetPermutation<OriginalCellSet, PermutationArrayHandleType>(
cellIndexMap, cellSet, name);
}
template <typename OriginalCellSet, typename PermutationArrayHandleType>
vtkm::cont::CellSetPermutation<OriginalCellSet, PermutationArrayHandleType> make_CellSetPermutation(
const PermutationArrayHandleType& cellIndexMap,
@ -492,7 +476,8 @@ vtkm::cont::CellSetPermutation<OriginalCellSet, PermutationArrayHandleType> make
VTKM_IS_CELL_SET(OriginalCellSet);
VTKM_IS_ARRAY_HANDLE(PermutationArrayHandleType);
return vtkm::cont::make_CellSetPermutation(cellIndexMap, cellSet, cellSet.GetName());
return vtkm::cont::CellSetPermutation<OriginalCellSet, PermutationArrayHandleType>(cellIndexMap,
cellSet);
}
}
} // namespace vtkm::cont
@ -529,21 +514,18 @@ private:
public:
static VTKM_CONT void save(BinaryBuffer& bb, const Type& cs)
{
vtkmdiy::save(bb, cs.GetName());
vtkmdiy::save(bb, cs.GetFullCellSet());
vtkmdiy::save(bb, cs.GetValidCellIds());
}
static VTKM_CONT void load(BinaryBuffer& bb, Type& cs)
{
std::string name;
vtkmdiy::load(bb, name);
CSType fullCS;
vtkmdiy::load(bb, fullCS);
AHValidCellIds validCellIds;
vtkmdiy::load(bb, validCellIds);
cs = make_CellSetPermutation(validCellIds, fullCS, name);
cs = make_CellSetPermutation(validCellIds, fullCS);
}
};

@ -46,8 +46,8 @@ class VTKM_ALWAYS_EXPORT CellSetSingleType
public:
VTKM_CONT
CellSetSingleType(const std::string& name = std::string())
: Superclass(name)
CellSetSingleType()
: Superclass()
, ExpectedNumberOfCellsAdded(-1)
, CellShapeAsId(CellShapeTagEmpty::Id)
, NumberOfPointsPerCell(0)
@ -63,6 +63,15 @@ public:
{
}
VTKM_CONT
CellSetSingleType(Thisclass&& src) noexcept : Superclass(std::forward<Superclass>(src)),
ExpectedNumberOfCellsAdded(-1),
CellShapeAsId(src.CellShapeAsId),
NumberOfPointsPerCell(src.NumberOfPointsPerCell)
{
}
VTKM_CONT
Thisclass& operator=(const Thisclass& src)
{
@ -72,6 +81,15 @@ public:
return *this;
}
VTKM_CONT
Thisclass& operator=(Thisclass&& src) noexcept
{
this->Superclass::operator=(std::forward<Superclass>(src));
this->CellShapeAsId = src.CellShapeAsId;
this->NumberOfPointsPerCell = src.NumberOfPointsPerCell;
return *this;
}
virtual ~CellSetSingleType() {}
/// First method to add cells -- one at a time.
@ -224,7 +242,7 @@ public:
virtual void PrintSummary(std::ostream& out) const override
{
out << " CellSetSingleType: " << this->Name << " Type " << this->CellShapeAsId << std::endl;
out << " CellSetSingleType ShapeType " << this->CellShapeAsId << std::endl;
out << " VisitCellsWithPoints: " << std::endl;
this->Data->VisitCellsWithPoints.PrintSummary(out);
out << " VisitPointsWithCells: " << std::endl;
@ -304,7 +322,6 @@ private:
public:
static VTKM_CONT void save(BinaryBuffer& bb, const Type& cs)
{
vtkmdiy::save(bb, cs.GetName());
vtkmdiy::save(bb, cs.GetNumberOfPoints());
vtkmdiy::save(bb, cs.GetCellShape(0));
vtkmdiy::save(bb, cs.GetNumberOfPointsInCell(0));
@ -314,8 +331,6 @@ public:
static VTKM_CONT void load(BinaryBuffer& bb, Type& cs)
{
std::string name;
vtkmdiy::load(bb, name);
vtkm::Id numberOfPoints = 0;
vtkmdiy::load(bb, numberOfPoints);
vtkm::UInt8 shape;
@ -325,7 +340,7 @@ public:
vtkm::cont::ArrayHandle<vtkm::Id, ConnectivityST> connectivity;
vtkmdiy::load(bb, connectivity);
cs = Type(name);
cs = Type{};
cs.Fill(numberOfPoints, shape, count, connectivity);
}
};

@ -35,18 +35,6 @@ public:
using SchedulingRangeType = typename InternalsType::SchedulingRangeType;
CellSetStructured(const std::string& name = std::string())
: CellSet(name)
, Structure()
{
}
CellSetStructured(const Thisclass& src);
CellSetStructured(Thisclass&& src) noexcept;
Thisclass& operator=(const Thisclass& src);
Thisclass& operator=(Thisclass&& src) noexcept;
vtkm::Id GetNumberOfCells() const override { return this->Structure.GetNumberOfCells(); }
vtkm::Id GetNumberOfPoints() const override { return this->Structure.GetNumberOfPoints(); }
@ -174,20 +162,17 @@ private:
public:
static VTKM_CONT void save(BinaryBuffer& bb, const Type& cs)
{
vtkmdiy::save(bb, cs.GetName());
vtkmdiy::save(bb, cs.GetPointDimensions());
vtkmdiy::save(bb, cs.GetGlobalPointIndexStart());
}
static VTKM_CONT void load(BinaryBuffer& bb, Type& cs)
{
std::string name;
vtkmdiy::load(bb, name);
typename Type::SchedulingRangeType dims, start;
vtkmdiy::load(bb, dims);
vtkmdiy::load(bb, start);
cs = Type(name);
cs = Type{};
cs.SetPointDimensions(dims);
cs.SetGlobalPointIndexStart(start);
}

@ -15,38 +15,6 @@ 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
@ -73,7 +41,7 @@ typename CellSetStructured<DIMENSION>::template ExecutionTypes<DeviceAdapter,
template <vtkm::IdComponent DIMENSION>
void CellSetStructured<DIMENSION>::PrintSummary(std::ostream& out) const
{
out << " StructuredCellSet: " << this->GetName() << std::endl;
out << " StructuredCellSet: " << std::endl;
this->Structure.PrintSummary(out);
}
}

@ -198,7 +198,7 @@ inline VTKM_CONT vtkm::cont::DataSet DataSetBuilderExplicit::BuildDataSet(
dataSet.AddCoordinateSystem(
vtkm::cont::CoordinateSystem(coordsNm, make_ArrayHandleCompositeVector(X, Y, Z)));
vtkm::Id nPts = X.GetNumberOfValues();
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.Fill(nPts, shapes, numIndices, connectivity);
dataSet.SetCellSet(cellSet);
@ -239,7 +239,7 @@ inline VTKM_CONT vtkm::cont::DataSet DataSetBuilderExplicit::BuildDataSet(
dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem(coordsNm, coords));
vtkm::Id nPts = static_cast<vtkm::Id>(coords.GetNumberOfValues());
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.Fill(nPts, shapes, numIndices, connectivity);
dataSet.SetCellSet(cellSet);
@ -276,7 +276,7 @@ inline VTKM_CONT vtkm::cont::DataSet DataSetBuilderExplicit::BuildDataSet(
vtkm::cont::DataSet dataSet;
dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem(coordsNm, coords));
vtkm::cont::CellSetSingleType<> cellSet("cells");
vtkm::cont::CellSetSingleType<> cellSet;
cellSet.Fill(coords.GetNumberOfValues(), tag.Id, numberOfPointsPerCell, connectivity);
dataSet.SetCellSet(cellSet);

@ -178,7 +178,6 @@ private:
const vtkm::cont::ArrayHandle<T>& Z,
const std::string& coordNm)
{
const std::string cellNm("cells");
vtkm::cont::DataSet dataSet;
//Convert all coordinates to floatDefault.
@ -215,19 +214,19 @@ private:
if (ndims == 1)
{
vtkm::cont::CellSetStructured<1> cellSet(cellNm);
vtkm::cont::CellSetStructured<1> cellSet;
cellSet.SetPointDimensions(dims[0]);
dataSet.SetCellSet(cellSet);
}
else if (ndims == 2)
{
vtkm::cont::CellSetStructured<2> cellSet(cellNm);
vtkm::cont::CellSetStructured<2> cellSet;
cellSet.SetPointDimensions(vtkm::make_Vec(dims[0], dims[1]));
dataSet.SetCellSet(cellSet);
}
else if (ndims == 3)
{
vtkm::cont::CellSetStructured<3> cellSet(cellNm);
vtkm::cont::CellSetStructured<3> cellSet;
cellSet.SetPointDimensions(vtkm::make_Vec(dims[0], dims[1], dims[2]));
dataSet.SetCellSet(cellSet);
}

@ -67,22 +67,21 @@ vtkm::cont::DataSet DataSetBuilderUniform::CreateDataSet(const vtkm::Id3& dimens
vtkm::cont::CoordinateSystem cs(coordNm, coords);
dataSet.AddCoordinateSystem(cs);
const std::string cellNm("cells");
if (ndims == 1)
{
vtkm::cont::CellSetStructured<1> cellSet(cellNm);
vtkm::cont::CellSetStructured<1> cellSet;
cellSet.SetPointDimensions(dims[0]);
dataSet.SetCellSet(cellSet);
}
else if (ndims == 2)
{
vtkm::cont::CellSetStructured<2> cellSet(cellNm);
vtkm::cont::CellSetStructured<2> cellSet;
cellSet.SetPointDimensions(vtkm::Id2(dims[0], dims[1]));
dataSet.SetCellSet(cellSet);
}
else if (ndims == 3)
{
vtkm::cont::CellSetStructured<3> cellSet(cellNm);
vtkm::cont::CellSetStructured<3> cellSet;
cellSet.SetPointDimensions(vtkm::Id3(dims[0], dims[1], dims[2]));
dataSet.SetCellSet(cellSet);
}

@ -174,9 +174,6 @@ public:
VTKM_CONT
const vtkm::cont::CellSet* GetCellSetBase() const { return this->CellSet.get(); }
VTKM_CONT
std::string GetName() const { return this->CellSet ? this->CellSet->GetName() : std::string{}; }
VTKM_CONT
vtkm::Id GetNumberOfCells() const
{

@ -53,7 +53,7 @@ void TransportWholeCellSetIn(Device)
{
//build a fake cell set
const int nVerts = 5;
vtkm::cont::CellSetExplicit<> contObject("cells");
vtkm::cont::CellSetExplicit<> contObject;
contObject.PrepareToAddCells(2, 7);
contObject.AddCell(vtkm::CELL_SHAPE_TRIANGLE, 3, vtkm::make_Vec<vtkm::Id>(0, 1, 2));
contObject.AddCell(vtkm::CELL_SHAPE_QUAD, 4, vtkm::make_Vec<vtkm::Id>(2, 1, 3, 4));

@ -436,7 +436,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DRegularDataSet0()
"cellvar", vtkm::cont::Field::Association::CELL_SET, cellvar, 4, vtkm::CopyFlag::On));
static constexpr vtkm::IdComponent dim = 3;
vtkm::cont::CellSetStructured<dim> cellSet("cells");
vtkm::cont::CellSetStructured<dim> cellSet;
cellSet.SetPointDimensions(vtkm::make_Vec(3, 2, 3));
dataSet.SetCellSet(cellSet);
@ -463,7 +463,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DRegularDataSet1()
"cellvar", vtkm::cont::Field::Association::CELL_SET, cellvar, 1, vtkm::CopyFlag::On));
static constexpr vtkm::IdComponent dim = 3;
vtkm::cont::CellSetStructured<dim> cellSet("cells");
vtkm::cont::CellSetStructured<dim> cellSet;
cellSet.SetPointDimensions(vtkm::make_Vec(2, 2, 2));
dataSet.SetCellSet(cellSet);
@ -668,7 +668,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet1()
dataSet.AddCoordinateSystem(
vtkm::cont::make_CoordinateSystem("coordinates", coordinates, nVerts, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.PrepareToAddCells(2, 7);
cellSet.AddCell(vtkm::CELL_SHAPE_TRIANGLE, 3, make_Vec<vtkm::Id>(0, 1, 2));
cellSet.AddCell(vtkm::CELL_SHAPE_QUAD, 4, make_Vec<vtkm::Id>(2, 1, 3, 4));
@ -717,7 +717,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet2()
dataSet.AddField(make_Field(
"cellvar", vtkm::cont::Field::Association::CELL_SET, cellvar, 1, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
vtkm::Vec<vtkm::Id, 8> ids;
ids[0] = 0;
ids[1] = 1;
@ -773,7 +773,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet4()
dataSet.AddField(make_Field(
"cellvar", vtkm::cont::Field::Association::CELL_SET, cellvar, 2, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
vtkm::Vec<vtkm::Id, 8> ids;
ids[0] = 0;
ids[1] = 4;
@ -826,7 +826,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet3()
dataSet.AddField(make_Field(
"cellvar", vtkm::cont::Field::Association::CELL_SET, cellvar, 1, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
vtkm::Id4 ids;
ids[0] = 0;
ids[1] = 1;
@ -878,7 +878,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSet5()
dataSet.AddField(make_Field(
"cellvar", vtkm::cont::Field::Association::CELL_SET, cellvar, nCells, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
vtkm::Vec<vtkm::Id, 8> ids;
cellSet.PrepareToAddCells(nCells, 23);
@ -1511,7 +1511,7 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSetCowNose()
{
connectivity.GetPortalControl().Set(i, pointId[i]);
}
vtkm::cont::CellSetSingleType<> cellSet("cells");
vtkm::cont::CellSetSingleType<> cellSet;
cellSet.Fill(nVerts, vtkm::CELL_SHAPE_TRIANGLE, 3, connectivity);
dataSet.SetCellSet(cellSet);

@ -238,11 +238,6 @@ struct TestEqualCellSet
vtkm::TopologyElementTagCell visitTopo{};
vtkm::TopologyElementTagPoint incidentTopo{};
if (cs1.GetName() != cs2.GetName())
{
result.PushMessage("names don't match");
return;
}
if (cs1.GetNumberOfPoints() != cs2.GetNumberOfPoints())
{
result.PushMessage("number of points don't match");
@ -285,11 +280,6 @@ struct TestEqualCellSet
const vtkm::cont::CellSetStructured<DIMENSION>& cs2,
TestEqualResult& result) const
{
if (cs1.GetName() != cs2.GetName())
{
result.PushMessage("names don't match");
return;
}
if (cs1.GetPointDimensions() != cs2.GetPointDimensions())
{
result.PushMessage("point dimensions don't match");

@ -27,7 +27,7 @@ constexpr vtkm::Id3 BaseLinePointDimensions{ xdim, ydim, zdim };
constexpr vtkm::Id BaseLineNumberOfPoints = xdim * ydim * zdim;
constexpr vtkm::Id BaseLineNumberOfCells = (xdim - 1) * (ydim - 1) * (zdim - 1);
vtkm::cont::CellSetStructured<3> BaseLine{ "BaseLine" };
vtkm::cont::CellSetStructured<3> BaseLine;
void InitializeBaseLine()
{

@ -45,7 +45,6 @@ void CheckEmptyDynamicCellSet()
{
vtkm::cont::DynamicCellSet empty;
VTKM_TEST_ASSERT(empty.GetName() == std::string{}, "DynamicCellSet should have no name");
VTKM_TEST_ASSERT(empty.GetNumberOfCells() == 0, "DynamicCellSet should have no cells");
VTKM_TEST_ASSERT(empty.GetNumberOfFaces() == 0, "DynamicCellSet should have no faces");
VTKM_TEST_ASSERT(empty.GetNumberOfEdges() == 0, "DynamicCellSet should have no edges");

@ -51,7 +51,7 @@ inline VTKM_CONT vtkm::cont::DataSet ExternalFaces::DoExecute(
//2. using the policy convert the dynamic cell set, and run the
// external faces worklet
vtkm::cont::CellSetExplicit<> outCellSet(cells.GetName());
vtkm::cont::CellSetExplicit<> outCellSet;
if (cells.IsSameType(vtkm::cont::CellSetStructured<3>()))
{

@ -53,7 +53,7 @@ inline vtkm::cont::DataSet ExtractPoints::DoExecute(const vtkm::cont::DataSet& i
input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex());
// run the worklet on the cell set
vtkm::cont::CellSetSingleType<> outCellSet(cells.GetName());
vtkm::cont::CellSetSingleType<> outCellSet;
vtkm::worklet::ExtractPoints worklet;
outCellSet = worklet.Run(vtkm::filter::ApplyPolicy(cells, policy),

@ -99,7 +99,7 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims)
dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates));
static constexpr vtkm::IdComponent ndim = 3;
vtkm::cont::CellSetStructured<ndim> cellSet("cells");
vtkm::cont::CellSetStructured<ndim> cellSet;
cellSet.SetPointDimensions(vdims);
dataSet.SetCellSet(cellSet);

@ -101,7 +101,7 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims)
vtkm::cont::Field(std::string("nodevar"), vtkm::cont::Field::Association::POINTS, fieldArray));
static constexpr vtkm::IdComponent ndim = 3;
vtkm::cont::CellSetStructured<ndim> cellSet("cells");
vtkm::cont::CellSetStructured<ndim> cellSet;
cellSet.SetPointDimensions(vdims);
dataSet.SetCellSet(cellSet);
@ -260,7 +260,7 @@ inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComp
dataSet.AddField(
vtkm::cont::Field("distanceToOther", vtkm::cont::Field::Association::POINTS, distanceToOther));
CellSet cellSet("cells");
CellSet cellSet;
cellSet.Fill(coordinates.GetNumberOfValues(), HexTag::Id, HexTraits::NUM_POINTS, connectivity);
dataSet.SetCellSet(cellSet);

@ -80,7 +80,7 @@ vtkm::cont::DataSet MakeTestDataSet(const CoordinateType& cType)
dataSet.AddCoordinateSystem(
vtkm::cont::make_CoordinateSystem("coordinates", coordinates, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.PrepareToAddCells(numCells, numCells * 4);
for (vtkm::Id j = 0; j < dim - 1; ++j)
{

@ -94,7 +94,7 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims)
vtkm::cont::Field("nodevar", vtkm::cont::Field::Association::POINTS, fieldArray));
static constexpr vtkm::IdComponent ndim = 3;
vtkm::cont::CellSetStructured<ndim> cellSet("cells");
vtkm::cont::CellSetStructured<ndim> cellSet;
cellSet.SetPointDimensions(vdims);
dataSet.SetCellSet(cellSet);

@ -239,7 +239,7 @@ vtkm::cont::DataSet MakeTestDataSet()
dataSet.AddField(vtkm::cont::make_Field(
"c_uniform", vtkm::cont::Field::Association::CELL_SET, poisson, nCells, vtkm::CopyFlag::On));
vtkm::cont::CellSetStructured<dimension> cellSet("cells");
vtkm::cont::CellSetStructured<dimension> cellSet;
//Set regular structure
cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts));

@ -37,7 +37,7 @@ vtkm::cont::DataSet MakePointElevationTestDataSet()
dataSet.AddCoordinateSystem(
vtkm::cont::make_CoordinateSystem("coordinates", coordinates, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.PrepareToAddCells(numCells, numCells * 4);
for (vtkm::Id j = 0; j < dim - 1; ++j)
{

@ -42,7 +42,7 @@ vtkm::cont::DataSet MakePointTransformTestDataSet()
dataSet.AddCoordinateSystem(
vtkm::cont::make_CoordinateSystem("coordinates", coordinates, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.PrepareToAddCells(numCells, numCells * 4);
for (vtkm::Id j = 0; j < dim - 1; ++j)
{

@ -48,7 +48,7 @@ vtkm::cont::DataSet MakeGeometryDataSet()
vtkm::cont::DataSet ConvertDataSetUniformToExplicit(const vtkm::cont::DataSet& uds)
{
vtkm::cont::DataSet eds;
vtkm::cont::CellSetExplicit<> cs(uds.GetCellSet().GetName());
vtkm::cont::CellSetExplicit<> cs;
vtkm::worklet::CellDeepCopy::Run(uds.GetCellSet(), cs);
eds.SetCellSet(cs);

@ -248,19 +248,19 @@ inline vtkm::cont::DynamicCellSet CreateCellSetStructured(const vtkm::Id3& dim)
{
if (dim[0] > 1 && dim[1] > 1 && dim[2] > 1)
{
vtkm::cont::CellSetStructured<3> cs("cells");
vtkm::cont::CellSetStructured<3> cs;
cs.SetPointDimensions(vtkm::make_Vec(dim[0], dim[1], dim[2]));
return cs;
}
else if (dim[0] > 1 && dim[1] > 1 && dim[2] <= 1)
{
vtkm::cont::CellSetStructured<2> cs("cells");
vtkm::cont::CellSetStructured<2> cs;
cs.SetPointDimensions(vtkm::make_Vec(dim[0], dim[1]));
return cs;
}
else if (dim[0] > 1 && dim[1] <= 1 && dim[2] <= 1)
{
vtkm::cont::CellSetStructured<1> cs("cells");
vtkm::cont::CellSetStructured<1> cs;
cs.SetPointDimensions(dim[0]);
return cs;
}

@ -145,7 +145,7 @@ private:
if (vtkm::io::internal::IsSingleShape(shapes))
{
vtkm::cont::CellSetSingleType<> cellSet("cells");
vtkm::cont::CellSetSingleType<> cellSet;
cellSet.Fill(numPoints,
shapes.GetPortalConstControl().Get(0),
numIndices.GetPortalConstControl().Get(0),
@ -154,7 +154,7 @@ private:
}
else
{
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.Fill(numPoints, shapes, numIndices, connectivity);
this->DataSet.SetCellSet(cellSet);
}

@ -71,7 +71,7 @@ private:
//DRP
if (false) //vtkm::io::internal::IsSingleShape(shapes))
{
vtkm::cont::CellSetSingleType<> cellSet("cells");
vtkm::cont::CellSetSingleType<> cellSet;
cellSet.Fill(numPoints,
shapes.GetPortalConstControl().Get(0),
numIndices.GetPortalConstControl().Get(0),
@ -80,7 +80,7 @@ private:
}
else
{
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.Fill(numPoints, shapes, numIndices, connectivity);
this->DataSet.SetCellSet(cellSet);
}

@ -282,7 +282,7 @@ void MapperWireframer::RenderCells(const vtkm::cont::DynamicCellSet& inCellSet,
conn.Allocate(numCells * 2);
vtkm::worklet::DispatcherMapField<CreateConnectivity>(CreateConnectivity()).Invoke(iter, conn);
vtkm::cont::CellSetSingleType<> newCellSet("cells");
vtkm::cont::CellSetSingleType<> newCellSet;
newCellSet.Fill(newCoords.GetNumberOfValues(), vtkm::CELL_SHAPE_LINE, 2, conn);
cellSet = vtkm::cont::DynamicCellSet(newCellSet);
}

@ -63,7 +63,7 @@ vtkm::cont::DataSet Make2DExplicitDataSet()
pointVar.push_back(15);
dataSet.AddCoordinateSystem(
vtkm::cont::make_CoordinateSystem("coordinates", coordinates, nVerts, vtkm::CopyFlag::On));
vtkm::cont::CellSetSingleType<> cellSet("cells");
vtkm::cont::CellSetSingleType<> cellSet;
vtkm::cont::ArrayHandle<vtkm::Id> connectivity;
connectivity.Allocate(8);

@ -92,7 +92,7 @@ struct CellDeepCopy
vtkm::cont::
CellSetExplicit<ShapeStorage, NumIndicesStorage, ConnectivityStorage, OffsetsStorage>
newCellSet(inCellSet.GetName());
newCellSet;
newCellSet.Fill(inCellSet.GetNumberOfPoints(), shapes, numIndices, connectivity, offsets);
outCellSet = newCellSet;
}

@ -808,7 +808,7 @@ private:
vtkm::cont::ArrayHandle<vtkm::Vec<NormalType, 3>, StorageTagNormals> normals,
bool withNormals)
{
vtkm::cont::CellSetSingleType<> outputCells(cells.GetName());
vtkm::cont::CellSetSingleType<> outputCells;
DeduceCellType<ValueType,
CoordinateSystem,
@ -949,7 +949,7 @@ private:
this->InterpolationEdgeIds, this->InterpolationWeights, coordinateSystem, vertices);
//assign the connectivity to the cell set
vtkm::cont::CellSetSingleType<> outputCells(cells.GetName());
vtkm::cont::CellSetSingleType<> outputCells;
outputCells.Fill(vertices.GetNumberOfValues(), vtkm::CELL_SHAPE_TRIANGLE, 3, connectivity);
//now that the vertices have been generated we can generate the normals

@ -114,8 +114,7 @@ public:
template <typename CellSetType>
void operator()(const CellSetType& cellset) const
{
vtkm::cont::CellSetPermutation<CellSetType> permCellSet(
*this->ValidIds, cellset, cellset.GetName());
vtkm::cont::CellSetPermutation<CellSetType> permCellSet(*this->ValidIds, cellset);
*this->Output = permCellSet;
}
};
@ -130,7 +129,7 @@ public:
vtkm::cont::ArrayCopy(cellIds, this->ValidCellIds);
return OutputType(this->ValidCellIds, cellSet, cellSet.GetName());
return OutputType(this->ValidCellIds, cellSet);
}
////////////////////////////////////////////////////////////////////////////////////
@ -156,8 +155,7 @@ public:
vtkm::cont::Algorithm::CopyIf(indices, passFlags, this->ValidCellIds);
// generate the cellset
return vtkm::cont::CellSetPermutation<CellSetType>(
this->ValidCellIds, cellSet, cellSet.GetName());
return vtkm::cont::CellSetPermutation<CellSetType>(this->ValidCellIds, cellSet);
}
template <typename ValueType, typename StorageTagIn>

@ -76,7 +76,7 @@ public:
vtkm::cont::ArrayCopy(pointIds, this->ValidPointIds);
// Make CellSetSingleType with VERTEX at each point id
vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName());
vtkm::cont::CellSetSingleType<> outCellSet;
outCellSet.Fill(
cellSet.GetNumberOfPoints(), vtkm::CellShapeTagVertex::Id, 1, this->ValidPointIds);
@ -103,7 +103,7 @@ public:
vtkm::cont::Algorithm::CopyIf(indices, passFlags, this->ValidPointIds);
// Make CellSetSingleType with VERTEX at each point id
vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName());
vtkm::cont::CellSetSingleType<> outCellSet;
outCellSet.Fill(
cellSet.GetNumberOfPoints(), vtkm::CellShapeTagVertex::Id, 1, this->ValidPointIds);

@ -44,7 +44,7 @@ public:
vtkm::cont::ArrayCopy(strideArray, this->ValidCellIds);
return OutputType(this->ValidCellIds, cellSet, cellSet.GetName());
return OutputType(this->ValidCellIds, cellSet);
}
//----------------------------------------------------------------------------

@ -35,7 +35,7 @@ public:
vtkm::cont::ArrayCopy(strideArray, pointIds);
// Make CellSetSingleType with VERTEX at each point id
vtkm::cont::CellSetSingleType<> outCellSet("cells");
vtkm::cont::CellSetSingleType<> outCellSet;
outCellSet.Fill(numberOfInputPoints, vtkm::CellShapeTagVertex::Id, 1, pointIds);
return outCellSet;

@ -126,8 +126,7 @@ struct RemoveDegenerateCells
vtkm::cont::Algorithm::CopyIf(
vtkm::cont::ArrayHandleIndex(passFlags.GetNumberOfValues()), passFlags, this->ValidCellIds);
vtkm::cont::CellSetPermutation<CellSetType> permutation(
this->ValidCellIds, cellSet, cellSet.GetName());
vtkm::cont::CellSetPermutation<CellSetType> permutation(this->ValidCellIds, cellSet);
vtkm::cont::CellSetExplicit<> output;
vtkm::worklet::CellDeepCopy::Run(permutation, output);
return output;

@ -195,7 +195,7 @@ public:
vtkm::cont::
CellSetExplicit<ShapeStorage, NumIndicesStorage, NewConnectivityStorage, OffsetsStorage>
outCellSet(inCellSet.GetName());
outCellSet;
outCellSet.Fill(numberOfPoints,
inCellSet.GetShapesArray(VisitTopology(), IncidentTopology()),
inCellSet.GetNumIndicesArray(VisitTopology(), IncidentTopology()),

@ -144,7 +144,7 @@ public:
vtkm::cont::Algorithm::CopyIf(
vtkm::cont::ArrayHandleIndex(passFlags.GetNumberOfValues()), passFlags, this->ValidCellIds);
return OutputType(this->ValidCellIds, cellSet, cellSet.GetName());
return OutputType(this->ValidCellIds, cellSet);
}
template <typename FieldArrayType, typename UnaryPredicate>

@ -77,7 +77,7 @@ public:
vtkm::cont::Algorithm::CopyIf(indices, passFlags, pointIds);
// Make CellSetSingleType with VERTEX at each point id
vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName());
vtkm::cont::CellSetSingleType<> outCellSet;
outCellSet.Fill(cellSet.GetNumberOfPoints(), vtkm::CellShapeTagVertex::Id, 1, pointIds);
return outCellSet;

@ -512,7 +512,7 @@ public:
vtkm::cont::DataSet output;
output.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", repPointArray));
vtkm::cont::CellSetSingleType<> triangles("cells");
vtkm::cont::CellSetSingleType<> triangles;
triangles.Fill(repPointArray.GetNumberOfValues(),
vtkm::CellShapeTagTriangle::Id,
3,

@ -225,7 +225,7 @@ public:
vtkm::cont::CoordinateSystem coords{ "coords", dims, origin, this->Spacing };
// And cells:
vtkm::cont::CellSetStructured<3> cellSet{ "cells" };
vtkm::cont::CellSetStructured<3> cellSet;
cellSet.SetPointDimensions(dims);
// Scalars, too

@ -98,7 +98,7 @@ static vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims)
dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates));
static constexpr vtkm::IdComponent ndim = 3;
vtkm::cont::CellSetStructured<ndim> cellSet("cells");
vtkm::cont::CellSetStructured<ndim> cellSet;
cellSet.SetPointDimensions(vdims);
dataSet.SetCellSet(cellSet);

@ -105,7 +105,7 @@ vtkm::cont::DataSet MakeIsosurfaceTestDataSet(vtkm::Id3 dims)
dataSet.AddCoordinateSystem(vtkm::cont::CoordinateSystem("coordinates", coordinates));
static constexpr vtkm::IdComponent ndim = 3;
vtkm::cont::CellSetStructured<ndim> cellSet("cells");
vtkm::cont::CellSetStructured<ndim> cellSet;
cellSet.SetPointDimensions(vdims);
dataSet.SetCellSet(cellSet);
@ -261,7 +261,7 @@ inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComp
vtkm::cont::Field::Association::POINTS,
vtkm::cont::VariantArrayHandle(distanceToOther)));
CellSet cellSet("cells");
CellSet cellSet;
cellSet.Fill((dim + 1) * (dim + 1) * (dim + 1), HexTag::Id, HexTraits::NUM_POINTS, connectivity);
dataSet.SetCellSet(cellSet);

@ -84,7 +84,7 @@ vtkm::cont::DataSet MakeTestDataSet(const CoordinateType& cType)
dataSet.AddCoordinateSystem(
vtkm::cont::make_CoordinateSystem("coordinates", coordinates, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.PrepareToAddCells(numCells, numCells * 4);
for (vtkm::Id j = 0; j < dim - 1; ++j)
{

@ -28,7 +28,7 @@ vtkm::cont::DataSet RunExternalFaces(vtkm::cont::DataSet& inDataSet)
{
const vtkm::cont::DynamicCellSet& inCellSet = inDataSet.GetCellSet();
vtkm::cont::CellSetExplicit<> outCellSet("cells");
vtkm::cont::CellSetExplicit<> outCellSet;
//Run the External Faces worklet
if (inCellSet.IsSameType(vtkm::cont::CellSetStructured<3>()))

@ -239,7 +239,7 @@ vtkm::cont::DataSet MakeTestDataSet()
dataSet.AddField(vtkm::cont::make_Field(
"c_uniform", vtkm::cont::Field::Association::CELL_SET, poisson, nCells, vtkm::CopyFlag::On));
vtkm::cont::CellSetStructured<dimension> cellSet("cells");
vtkm::cont::CellSetStructured<dimension> cellSet;
//Set regular structure
cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts));

@ -39,7 +39,7 @@ vtkm::cont::DataSet Make2DUniformStatDataSet0()
dataSet.AddField(vtkm::cont::make_Field(
"data", vtkm::cont::Field::Association::CELL_SET, data, nCells, vtkm::CopyFlag::On));
vtkm::cont::CellSetStructured<dimension> cellSet("cells");
vtkm::cont::CellSetStructured<dimension> cellSet;
//Set uniform structure
cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts));
@ -274,7 +274,7 @@ vtkm::cont::DataSet Make2DUniformStatDataSet1()
dataSet.AddField(vtkm::cont::make_Field(
"c_uniform", vtkm::cont::Field::Association::CELL_SET, poisson, nCells, vtkm::CopyFlag::On));
vtkm::cont::CellSetStructured<dimension> cellSet("cells");
vtkm::cont::CellSetStructured<dimension> cellSet;
//Set uniform structure
cellSet.SetPointDimensions(vtkm::make_Vec(xVerts, yVerts));

@ -42,7 +42,7 @@ vtkm::cont::DataSet MakePointElevationTestDataSet()
dataSet.AddCoordinateSystem(
vtkm::cont::make_CoordinateSystem("coordinates", coordinates, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.PrepareToAddCells(numCells, numCells * 4);
for (vtkm::Id j = 0; j < dim - 1; ++j)
{

@ -44,7 +44,7 @@ vtkm::cont::DataSet MakePointTransformTestDataSet()
dataSet.AddCoordinateSystem(
vtkm::cont::make_CoordinateSystem("coordinates", coordinates, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.PrepareToAddCells(numCells, numCells * 4);
for (vtkm::Id j = 0; j < dim - 1; ++j)
{

@ -42,7 +42,7 @@ vtkm::cont::DataSet ConvertDataSetUniformToExplicit(const vtkm::cont::DataSet& u
{
vtkm::cont::DataSet eds;
vtkm::cont::CellSetExplicit<> cs(uds.GetCellSet().GetName());
vtkm::cont::CellSetExplicit<> cs;
vtkm::worklet::CellDeepCopy::Run(uds.GetCellSet(), cs);
eds.SetCellSet(cs);

@ -17,7 +17,7 @@ namespace
vtkm::cont::CellSetExplicit<> CreateInputCellSet()
{
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.PrepareToAddCells(2, 7);
cellSet.AddCell(vtkm::CELL_SHAPE_TRIANGLE, 3, vtkm::make_Vec<vtkm::Id>(0, 2, 4));
cellSet.AddCell(vtkm::CELL_SHAPE_QUAD, 4, vtkm::make_Vec<vtkm::Id>(4, 2, 6, 8));

@ -133,7 +133,7 @@ void TestStreamLineUniformGrid()
inDataSet.AddField(
vtkm::cont::Field("vecData", vtkm::cont::Field::Association::POINTS, fieldArray));
vtkm::cont::CellSetStructured<3> inCellSet("cells");
vtkm::cont::CellSetStructured<3> inCellSet;
inCellSet.SetPointDimensions(vtkm::make_Vec(vdims[0], vdims[1], vdims[2]));
inDataSet.SetCellSet(inCellSet);

@ -42,7 +42,7 @@ vtkm::cont::DataSet MakeWarpVectorTestDataSet()
dataSet.AddCoordinateSystem(
vtkm::cont::make_CoordinateSystem("coordinates", coordinates, vtkm::CopyFlag::On));
vtkm::cont::CellSetExplicit<> cellSet("cells");
vtkm::cont::CellSetExplicit<> cellSet;
cellSet.PrepareToAddCells(numCells, numCells * 4);
for (vtkm::Id j = 0; j < dim - 1; ++j)
{

@ -234,9 +234,7 @@ void TryCellSetPermutation()
vtkm::Id permutationArray[] = { 2, 0, 1 };
vtkm::cont::CellSetPermutation<vtkm::cont::CellSetExplicit<>, vtkm::cont::ArrayHandle<vtkm::Id>>
cellSet(vtkm::cont::make_ArrayHandle(permutationArray, 3),
originalCellSet,
originalCellSet.GetName());
cellSet(vtkm::cont::make_ArrayHandle(permutationArray, 3), originalCellSet);
vtkm::UInt8 expectedCellShapes[] = { vtkm::CELL_SHAPE_TETRA,
vtkm::CELL_SHAPE_HEXAHEDRON,

@ -103,18 +103,16 @@ public:
template <typename CellSetType>
vtkm::cont::CellSetSingleType<> Run(
const CellSetType& cellSet,
const CellSetType& vtkmNotUsed(cellSet),
vtkm::cont::ArrayHandle<vtkm::IdComponent>& vtkmNotUsed(outCellsPerCell))
{
vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName());
return outCellSet;
return vtkm::cont::CellSetSingleType<>();
}
vtkm::cont::CellSetSingleType<> Run(const vtkm::cont::CellSetExplicit<>& cellSet,
vtkm::cont::ArrayHandle<vtkm::IdComponent>& outCellsPerCell)
{
vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName());
vtkm::cont::CellSetSingleType<> outCellSet;
// Input topology
auto inShapes =

@ -79,7 +79,7 @@ public:
vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet,
vtkm::cont::ArrayHandle<vtkm::IdComponent>& outCellsPerCell)
{
vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName());
vtkm::cont::CellSetSingleType<> outCellSet;
vtkm::cont::ArrayHandle<vtkm::Id> connectivity;
vtkm::worklet::DispatcherMapTopology<tetrahedralize::TetrahedralizeCell> dispatcher;

@ -103,10 +103,10 @@ public:
};
template <typename CellSetType>
vtkm::cont::CellSetSingleType<> Run(
const CellSetType& cellSet,
const CellSetType& vtkmNotUsed(cellSet),
vtkm::cont::ArrayHandle<vtkm::IdComponent>& vtkmNotUsed(outCellsPerCell))
{
vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName());
vtkm::cont::CellSetSingleType<> outCellSet;
return outCellSet;
}
};
@ -115,7 +115,7 @@ vtkm::cont::CellSetSingleType<> TriangulateExplicit::Run(
const vtkm::cont::CellSetExplicit<>& cellSet,
vtkm::cont::ArrayHandle<vtkm::IdComponent>& outCellsPerCell)
{
vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName());
vtkm::cont::CellSetSingleType<> outCellSet;
// Input topology
auto inShapes =

@ -67,7 +67,7 @@ public:
vtkm::cont::ArrayHandle<vtkm::IdComponent>& outCellsPerCell)
{
vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName());
vtkm::cont::CellSetSingleType<> outCellSet;
vtkm::cont::ArrayHandle<vtkm::Id> connectivity;
vtkm::worklet::DispatcherMapTopology<triangulate::TriangulateCell> dispatcher;