Skip to content

Commit

Permalink
[insitu] Fixed number of array components.
Browse files Browse the repository at this point in the history
Clarified save-parameter usage in vtkAOSDataArrayTemplate::setArray().
  • Loading branch information
bilke committed Mar 23, 2017
1 parent 4dfc9a3 commit 4960c6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion MeshLib/Vtk/VtkMappedMeshSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ class VtkMappedMeshSource final : public vtkUnstructuredGridAlgorithm
return false;

vtkNew<vtkAOSDataArrayTemplate<T> > dataArray;
const bool hasArrayOwnership = false;
dataArray->SetArray(propertyVector->data(),
static_cast<vtkIdType>(propertyVector->size()), 1);
static_cast<vtkIdType>(propertyVector->size()),
static_cast<int>(!hasArrayOwnership));
dataArray->SetNumberOfComponents(propertyVector->getNumberOfComponents());
dataArray->SetName(prop_name.c_str());

if(propertyVector->getMeshItemType() == MeshLib::MeshItemType::Node)
Expand Down

0 comments on commit 4960c6f

Please sign in to comment.