Change Oscillator output field name to oscillating

This commit is contained in:
Kenneth Moreland 2021-10-05 08:20:26 -06:00
parent a3462b41ce
commit 03a4750a3f
4 changed files with 19 additions and 3 deletions

@ -0,0 +1,16 @@
# Make field names from sources more descriptive
The VTK-m sources (like `Oscillator`, `Tangle`, and `Wavelet`) were all
creating fields with very generic names like `pointvar` or `scalars`. These
are very unhelpful names as it is impossible for downstream processes to
identify the meaning of these fields. Imagine having these data saved to a
file and then a different person trying to identify what they mean. Or
imagine dealing with more than one such source at a time and trying to
manage fields with similar or overlapping names.
The following renames happened:
* `Oscillator`: `scalars` -> `oscillating`
* `Tangle`: `pointvar` -> `tangle`
* `Wavelet`: `scalars` -> `RTData` (matches VTK source)

@ -319,7 +319,7 @@ int main(int argc, char** argv)
if (generateOutput)
{
vtkm::cont::ArrayHandleBasic<vtkm::Float64> tmp;
rdata.GetField("scalars", vtkm::cont::Field::Association::POINTS).GetData().CopyTo(tmp);
rdata.GetField("oscillating", vtkm::cont::Field::Association::POINTS).GetData().CopyTo(tmp);
const double* values = tmp.GetReadPointer();
writeData(outputDirectory, count++, sizeX, sizeY, sizeZ, values);
}

@ -86,7 +86,7 @@ vtkm::cont::DataSet Oscillator::Execute() const
//todo, we need to use the policy to determine the valid conversions
//that the dispatcher should do
this->Invoke(this->Worklet, coordinates, outArray);
dataSet.AddField(vtkm::cont::make_FieldPoint("scalars", outArray));
dataSet.AddField(vtkm::cont::make_FieldPoint("oscillating", outArray));
return dataSet;
}

@ -21,7 +21,7 @@ namespace source
/**\brief An analytical, time-varying uniform dataset with a point based array
*
* The Execute method creates a complete structured dataset that have a
* point field names 'scalars'
* point field names 'oscillating'
*
* This array is based on the coordinates and evaluates to a sum of time-varying
* Gaussian exponentials specified in its configuration.