I inserted the data from std::vector<double> data into the cell data of the dataset, and then when I used GetRange to get the data range, range[0] was -431602080.000000
vtkSmartPointer<vtkDataSet> dataset = m_dataset.at(0);
vtkSmartPointer<vtkFloatArray> vtkTmp =
vtkSmartPointer<vtkFloatArray>::New();
vtkTmp->SetName(phiName.c_str());
vtkTmp->SetNumberOfTuples(data.size);
vtkTmp->SetNumberOfComponents(1);
for (int i = 0; i < m_nAllCellNumber; i++)
{
vtkTmp->InsertNextTuple1(data.at(i));
}
if (!dataset->GetCellData()->HasArray(phiName.c_str()))
{
dataset->GetCellData()->AddArray(vtkTmp);
}
vtkSmartPointer<vtkCellData> cellData =
vtkSmartPointer<vtkCellData>::New();
cellData = dataset->GetCellData();
int celldatanum = cellData->GetNumberOfArrays();
for (int i = 0; i < celldatanum; i++)
{
const char *name = cellData->GetArrayName(i);
double *range = cellData->GetArray(i)->GetRange(-1);
qDebug() << name << range[0] << range[1];
}