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

This commit is contained in:
Robert Maynard 2019-04-02 16:23:51 -04:00
parent 04254dbd25
commit 8f545662d7
7 changed files with 8 additions and 11 deletions

@ -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);
}