mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 10:35:42 +00:00
Add fields to the cow nose testing dataset.
This commit is contained in:
parent
c2a7e4faba
commit
5420368ae0
@ -28,6 +28,8 @@
|
|||||||
#include <vtkm/cont/DataSetBuilderUniform.h>
|
#include <vtkm/cont/DataSetBuilderUniform.h>
|
||||||
#include <vtkm/cont/DataSetFieldAdd.h>
|
#include <vtkm/cont/DataSetFieldAdd.h>
|
||||||
|
|
||||||
|
#include <numeric>
|
||||||
|
|
||||||
namespace vtkm
|
namespace vtkm
|
||||||
{
|
{
|
||||||
namespace cont
|
namespace cont
|
||||||
@ -976,6 +978,15 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSetCowNose()
|
|||||||
cellSet.Fill(nVerts, vtkm::CELL_SHAPE_TRIANGLE, 3, connectivity);
|
cellSet.Fill(nVerts, vtkm::CELL_SHAPE_TRIANGLE, 3, connectivity);
|
||||||
dataSet.AddCellSet(cellSet);
|
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;
|
return dataSet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user