Skip to content
Snippets Groups Projects
Commit d2caba49 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MeL] Update vtkMeshConverter for field data.

Now the field data are interpreted as integration point
mesh properties.
parent c9e0cd42
No related branches found
No related tags found
No related merge requests found
...@@ -205,6 +205,15 @@ void VtkMeshConverter::convertScalarArrays(vtkUnstructuredGrid &grid, MeshLib::M ...@@ -205,6 +205,15 @@ void VtkMeshConverter::convertScalarArrays(vtkUnstructuredGrid &grid, MeshLib::M
unsigned const n_cell_arrays = static_cast<unsigned>(cell_data->GetNumberOfArrays()); unsigned const n_cell_arrays = static_cast<unsigned>(cell_data->GetNumberOfArrays());
for (unsigned i=0; i<n_cell_arrays; ++i) for (unsigned i=0; i<n_cell_arrays; ++i)
convertArray(*cell_data->GetArray(i), mesh.getProperties(), MeshLib::MeshItemType::Cell); convertArray(*cell_data->GetArray(i), mesh.getProperties(), MeshLib::MeshItemType::Cell);
vtkFieldData* field_data = grid.GetFieldData();
unsigned const n_field_arrays =
static_cast<unsigned>(field_data->GetNumberOfArrays());
for (unsigned i = 0; i < n_field_arrays; ++i)
convertArray(
*vtkDataArray::SafeDownCast(field_data->GetAbstractArray(i)),
mesh.getProperties(),
MeshLib::MeshItemType::IntegrationPoint);
} }
void VtkMeshConverter::convertArray(vtkDataArray &array, MeshLib::Properties &properties, MeshLib::MeshItemType type) void VtkMeshConverter::convertArray(vtkDataArray &array, MeshLib::Properties &properties, MeshLib::MeshItemType type)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment