An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit 2bbf501c authored by Sujin Philip's avatar Sujin Philip
Browse files

Fix a bug in MakeTestDataset

In Make3DExplicitDataSetZoo, only 25 cells are added, but the variable `nCells`
is set to 27.
parent d0d33f98
......@@ -1047,8 +1047,8 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSetZoo()
vtkm::cont::DataSetFieldAdd dsf;
// Coordinates
const int nVerts = 30;
const int nCells = 27;
constexpr int nVerts = 30;
constexpr int nCells = 25;
using CoordType = vtkm::Vec<vtkm::Float32, 3>;
std::vector<CoordType> coords =
......@@ -1279,8 +1279,8 @@ inline vtkm::cont::DataSet MakeTestDataSet::Make3DExplicitDataSetZoo()
vtkm::Float32 cellvar[nCells] =
{ 4.0f, 5.0f, 9.5f, 5.5f, 6.0f, 9.5f, 5.0f, 5.5f, 5.7f, 6.5f, 6.4f, 6.9f, 6.6f, 6.1f,
7.1f, 7.2f, 7.3f, 7.4f, 9.1f, 9.2f, 9.3f, 5.4f, 9.5f, 9.6f, 6.7f, 9.8f, 6.0f };
{ 4.0f, 5.0f, 9.5f, 5.5f, 6.0f, 9.5f, 5.0f, 5.5f, 5.7f, 6.5f, 6.4f, 6.9f, 6.6f,
6.1f, 7.1f, 7.2f, 7.3f, 7.4f, 9.1f, 9.2f, 9.3f, 5.4f, 9.5f, 9.6f, 6.7f };
dsf.AddPointField(dataSet, "pointvar", pointvar, nVerts);
dsf.AddCellField(dataSet, "cellvar", cellvar, nCells, "cells");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment