Commit 8f545662 authored by Robert Maynard's avatar Robert Maynard
Browse files

CellSet uses NewInstance to be consistent with the rest of VTK-m

parent 04254dbd
......@@ -72,7 +72,7 @@ public:
virtual vtkm::IdComponent GetNumberOfPointsInCell(vtkm::Id id) const = 0;
virtual void GetCellPointIds(vtkm::Id id, vtkm::Id* ptids) const = 0;
virtual std::shared_ptr<CellSet> CreateNewInstance() const = 0;
virtual std::shared_ptr<CellSet> NewInstance() const = 0;
virtual void DeepCopy(const CellSet* src) = 0;
virtual void PrintSummary(std::ostream&) const = 0;
......
......@@ -123,7 +123,7 @@ public:
void PrintSummary(std::ostream& out) const override;
void ReleaseResourcesExecution() override;
std::shared_ptr<CellSet> CreateNewInstance() const override;
std::shared_ptr<CellSet> NewInstance() const override;
void DeepCopy(const CellSet* src) override;
VTKM_CONT vtkm::Id GetSchedulingRange(vtkm::TopologyElementTagCell) const;
......
......@@ -507,7 +507,7 @@ template <typename ShapeStorageTag,
std::shared_ptr<CellSet> CellSetExplicit<ShapeStorageTag,
NumIndicesStorageTag,
ConnectivityStorageTag,
OffsetsStorageTag>::CreateNewInstance() const
OffsetsStorageTag>::NewInstance() const
{
return std::make_shared<CellSetExplicit>();
}
......
......@@ -312,7 +312,7 @@ public:
ptids);
}
std::shared_ptr<CellSet> CreateNewInstance() const override
std::shared_ptr<CellSet> NewInstance() const override
{
return std::make_shared<CellSetPermutation>();
}
......@@ -476,10 +476,7 @@ public:
this->FullCellSet = cellset.GetFullCellSet();
}
std::shared_ptr<CellSet> CreateNewInstance() const
{
return std::make_shared<CellSetPermutation>();
}
std::shared_ptr<CellSet> NewInstance() const { return std::make_shared<CellSetPermutation>(); }
};
template <typename OriginalCellSet, typename PermutationArrayHandleType>
......
......@@ -212,7 +212,7 @@ public:
}
VTKM_CONT
std::shared_ptr<CellSet> CreateNewInstance() const override
std::shared_ptr<CellSet> NewInstance() const override
{
return std::make_shared<CellSetSingleType>();
}
......
......@@ -106,7 +106,7 @@ public:
}
}
std::shared_ptr<CellSet> CreateNewInstance() const override
std::shared_ptr<CellSet> NewInstance() const override
{
return std::make_shared<CellSetStructured>();
}
......
......@@ -147,7 +147,7 @@ void RunTests(const vtkm::cont::CellSet& cellset,
IsPermutationCellSet flag = IsPermutationCellSet::NO)
{
TestAgainstBaseLine(cellset, flag);
auto deepcopy = cellset.CreateNewInstance();
auto deepcopy = cellset.NewInstance();
deepcopy->DeepCopy(&cellset);
TestAgainstBaseLine(*deepcopy, flag);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment