Add fields to the cow nose testing dataset.

This commit is contained in:
Allison Vacanti 2017-08-24 10:22:59 -04:00
parent c2a7e4faba
commit 5420368ae0

@ -28,6 +28,8 @@
#include <vtkm/cont/DataSetBuilderUniform.h>
#include <vtkm/cont/DataSetFieldAdd.h>
#include <numeric>
namespace vtkm
{
namespace cont
@ -976,6 +978,15 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSetCowNose()
cellSet.Fill(nVerts, vtkm::CELL_SHAPE_TRIANGLE, 3, connectivity);
dataSet.AddCellSet(cellSet);
std::vector<vtkm::Float32> pointvar(nVerts);
std::iota(pointvar.begin(), pointvar.end(), 15.f);
std::vector<vtkm::Float32> cellvar(connectivitySize / 3);
std::iota(cellvar.begin(), cellvar.end(), 132.f);
vtkm::cont::DataSetFieldAdd dsf;
dsf.AddPointField(dataSet, "pointvar", pointvar);
dsf.AddCellField(dataSet, "cellvar", cellvar, "cells");
return dataSet;
}
}