Merge topic 'cell-centered-advection' into release

91631760a Missing changes for cell centered velocity fields

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2663
This commit is contained in:
Vicente Bolea 2022-01-28 17:44:50 +00:00 committed by Kitware Robot
commit 1f22a2350b
2 changed files with 3 additions and 2 deletions

@ -57,7 +57,7 @@ FilterParticleAdvection<Derived>::CreateDataSetIntegrators(
{
vtkm::Id blockId = boundsMap.GetLocalBlockId(i);
auto ds = input.GetPartition(i);
if (!ds.HasPointField(activeField))
if (!ds.HasPointField(activeField) && !ds.HasCellField(activeField))
throw vtkm::cont::ErrorFilterExecution("Unsupported field assocation");
dsi.push_back(DSIType(ds, blockId, activeField));
}

@ -55,7 +55,8 @@ FilterTemporalParticleAdvection<Derived>::CreateDataSetIntegrators(
vtkm::Id blockId = boundsMap.GetLocalBlockId(i);
auto dsPrev = input.GetPartition(i);
auto dsNext = this->NextDataSet.GetPartition(i);
if (!dsPrev.HasPointField(activeField) || !dsNext.HasPointField(activeField))
if (!(dsPrev.HasPointField(activeField) || dsPrev.HasCellField(activeField)) ||
!(dsNext.HasPointField(activeField) || dsNext.HasCellField(activeField)))
throw vtkm::cont::ErrorFilterExecution("Unsupported field assocation");
dsi.push_back(
DSIType(dsPrev, this->PreviousTime, dsNext, this->NextTime, blockId, activeField));