I am trying to show a deformed mesh that is read in from an exodusII file.
The display of the mesh should update the nodal positions by a vector called “DM”.
I have been successful showing the undeformed mesh and displaying it with a color based on a scalar field in the mesh. To do this I followed the example at the Lorensen github page. However I am really struggling with the use of vtkMultiblockDataSet, the output of vtkExodusIIReader, and vtkWarpVector, which is the suggested route to displaying deformed mesh.
My pipeline is below.
vtkNew<vtkExodusIIReader> exoSource;
exoSource->SetFileName("file.exoII");
exoSource->UpdateInformation();
exoSource->SetTimeStep(0);
exoSource->SetAllArrayStatus(vtkExodusIIReader::NODAL, 1);
exoSource->SetGlobalResultArrayStatus("DM", 1);
vtkNew<vtkWarpVector> meshWarp;
meshWarp->SetInputData(exoSource->GetOutput());
meshWarp->Update();
vtkNew<vtkPolyDataMapper> exoMapper;
exoMapper->SetInputConnection(meshWarp->GetOutputPort());
vtkNew<vtkActor> exoActor;
exoActor->SetMapper(exoMapper);
vtkNew<vtkRenderer> exoRenderer;
exoRenderer->AddActor(exoActor);
The code compiles fine, there are no complaints in the application output, however the renderer displays nothing but the background.
I have also been studying the vtkWarpVector example but I think what I’m missing is how to reconcile the vtkMultiBlockDataSet output by the vtkExodusIIReader with the vtkPolyData input to the vtkWarpVector.
Does anyone have any ideas? Thanks!