Missing changes for cell centered velocity fields

This commit is contained in:
Abhishek Yenpure 2022-01-06 08:42:21 -08:00 committed by Vicente Adolfo Bolea Sanchez
parent d1fd72e71a
commit 91631760a7
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));