Modify method names to clarify intent.
This commit is contained in:
parent
283ad78007
commit
b211bef814
@ -41,12 +41,12 @@ public:
|
||||
Pathline();
|
||||
|
||||
VTKM_CONT
|
||||
void SetTimeOne(vtkm::worklet::particleadvection::ScalarType t) { this->TimeOne = t; }
|
||||
void SetPreviousTime(vtkm::worklet::particleadvection::ScalarType t) { this->PreviousTime = t; }
|
||||
VTKM_CONT
|
||||
void SetTimeTwo(vtkm::worklet::particleadvection::ScalarType t) { this->TimeTwo = t; }
|
||||
void SetNextTime(vtkm::worklet::particleadvection::ScalarType t) { this->NextTime = t; }
|
||||
|
||||
VTKM_CONT
|
||||
void SetDataSetTwo(const vtkm::cont::DataSet& ds) { this->DataSetTwo = ds; }
|
||||
void SetNextDataSet(const vtkm::cont::DataSet& ds) { this->NextDataSet = ds; }
|
||||
|
||||
VTKM_CONT
|
||||
void SetStepSize(vtkm::worklet::particleadvection::ScalarType s) { this->StepSize = s; }
|
||||
@ -75,9 +75,9 @@ public:
|
||||
private:
|
||||
vtkm::worklet::Streamline Worklet;
|
||||
vtkm::worklet::particleadvection::ScalarType StepSize;
|
||||
vtkm::worklet::particleadvection::ScalarType TimeOne;
|
||||
vtkm::worklet::particleadvection::ScalarType TimeTwo;
|
||||
vtkm::cont::DataSet DataSetTwo;
|
||||
vtkm::worklet::particleadvection::ScalarType PreviousTime;
|
||||
vtkm::worklet::particleadvection::ScalarType NextTime;
|
||||
vtkm::cont::DataSet NextDataSet;
|
||||
vtkm::Id NumberOfSteps;
|
||||
vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::FloatDefault, 3>> Seeds;
|
||||
};
|
||||
|
@ -61,14 +61,14 @@ inline VTKM_CONT vtkm::cont::DataSet Pathline::DoExecute(
|
||||
|
||||
const vtkm::cont::DynamicCellSet& cells = input.GetCellSet(this->GetActiveCellSetIndex());
|
||||
const vtkm::cont::DynamicCellSet& cells2 =
|
||||
this->DataSetTwo.GetCellSet(this->GetActiveCellSetIndex());
|
||||
this->NextDataSet.GetCellSet(this->GetActiveCellSetIndex());
|
||||
const vtkm::cont::CoordinateSystem& coords =
|
||||
input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex());
|
||||
const vtkm::cont::CoordinateSystem& coords2 =
|
||||
this->DataSetTwo.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex());
|
||||
this->NextDataSet.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex());
|
||||
|
||||
auto field2 = vtkm::cont::Cast<vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>, StorageType>>(
|
||||
this->DataSetTwo.GetField(this->GetActiveFieldName()).GetData());
|
||||
this->NextDataSet.GetField(this->GetActiveFieldName()).GetData());
|
||||
|
||||
if (!fieldMeta.IsPointField())
|
||||
{
|
||||
@ -79,7 +79,8 @@ inline VTKM_CONT vtkm::cont::DataSet Pathline::DoExecute(
|
||||
using GridEvalType = vtkm::worklet::particleadvection::TemporalGridEvaluator<FieldHandle>;
|
||||
using RK4Type = vtkm::worklet::particleadvection::RK4Integrator<GridEvalType>;
|
||||
|
||||
GridEvalType eval(coords, cells, field, this->TimeOne, coords2, cells2, field2, this->TimeTwo);
|
||||
GridEvalType eval(
|
||||
coords, cells, field, this->PreviousTime, coords2, cells2, field2, this->NextTime);
|
||||
RK4Type rk4(eval, static_cast<vtkm::worklet::particleadvection::ScalarType>(this->StepSize));
|
||||
|
||||
vtkm::worklet::Streamline streamline;
|
||||
|
@ -63,7 +63,6 @@ void TestStreamline()
|
||||
streamline.SetStepSize(0.1f);
|
||||
streamline.SetNumberOfSteps(20);
|
||||
streamline.SetSeeds(seedArray);
|
||||
vtkm::cont::Field vecField = ds.GetField("vector");
|
||||
|
||||
streamline.SetActiveField("vector");
|
||||
auto output = streamline.Execute(ds);
|
||||
@ -100,13 +99,12 @@ void TestPathline()
|
||||
|
||||
vtkm::filter::Pathline pathline;
|
||||
|
||||
pathline.SetTimeOne(0.0f);
|
||||
pathline.SetTimeTwo(1.0f);
|
||||
pathline.SetDataSetTwo(ds2);
|
||||
pathline.SetPreviousTime(0.0f);
|
||||
pathline.SetNextTime(1.0f);
|
||||
pathline.SetNextDataSet(ds2);
|
||||
pathline.SetStepSize(0.05f);
|
||||
pathline.SetNumberOfSteps(20);
|
||||
pathline.SetSeeds(seedArray);
|
||||
vtkm::cont::Field vecField = ds1.GetField("vector");
|
||||
|
||||
pathline.SetActiveField("vector");
|
||||
auto output = pathline.Execute(ds1);
|
||||
|
Loading…
Reference in New Issue
Block a user