Commit c778929b authored by David Thompson's avatar David Thompson
Browse files

Fix builds against older VTK releases.

parent 7bab4f0c
...@@ -403,7 +403,7 @@ int DataAdaptor::AddArray(vtkDataObject* mesh, const std::string &meshName, ...@@ -403,7 +403,7 @@ int DataAdaptor::AddArray(vtkDataObject* mesh, const std::string &meshName,
for (vtkIdType i = 0; i < array->GetNumberOfTuples(); ++i) for (vtkIdType i = 0; i < array->GetNumberOfTuples(); ++i)
{ {
vtkIdType ugid = particles[i].id; vtkIdType ugid = particles[i].id;
array->SetTypedTuple(i, &ugid); array->SetValue(i, ugid);
} }
pd->AddArray(array.Get()); pd->AddArray(array.Get());
} }
...@@ -419,7 +419,7 @@ int DataAdaptor::AddArray(vtkDataObject* mesh, const std::string &meshName, ...@@ -419,7 +419,7 @@ int DataAdaptor::AddArray(vtkDataObject* mesh, const std::string &meshName,
vel[0] = particles[i].velocity[0]; vel[0] = particles[i].velocity[0];
vel[1] = particles[i].velocity[1]; vel[1] = particles[i].velocity[1];
vel[2] = particles[i].velocity[2]; vel[2] = particles[i].velocity[2];
array->SetTypedTuple(i, vel); array->SetTuple(i, vel);
} }
pd->SetScalars(array.Get()); pd->SetScalars(array.Get());
pd->SetActiveScalars(array->GetName()); pd->SetActiveScalars(array->GetName());
...@@ -433,7 +433,7 @@ int DataAdaptor::AddArray(vtkDataObject* mesh, const std::string &meshName, ...@@ -433,7 +433,7 @@ int DataAdaptor::AddArray(vtkDataObject* mesh, const std::string &meshName,
for (vtkIdType i = 0; i < array->GetNumberOfTuples(); ++i) for (vtkIdType i = 0; i < array->GetNumberOfTuples(); ++i)
{ {
float magnitude = std::sqrt(particles[i].velocity.norm()); float magnitude = std::sqrt(particles[i].velocity.norm());
array->SetTypedTuple(i, &magnitude); array->SetValue(i, magnitude);
} }
pd->SetScalars(array.Get()); pd->SetScalars(array.Get());
pd->SetActiveScalars(array->GetName()); pd->SetActiveScalars(array->GetName());
......
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