I have recently added a SENSEI interface to our solver, based on a working CATALYST interface.
I have refactored an existing Catalyst-Solver interface so that the code to create the VTK data structure and updating the fields in unsteady simulations is coded only once. I have then created the solver_sensei_bridge code using the sensei::VTKDataAdaptor class. As a result I have 2 separate executables of my solver, one with Catalyst, one with Sensei interface. Both can write in-situ output (point and cell data) for multiple time steps, which is identical regardless whether I use the Catalyst or the Sensei interface.
However when I add some field data (let’s say the current time step as a double value) to each block in a multiblock hierarchy, with Catalyst, those FieldData entries show up in the co-processing results, but with SENSEI they are silently dropped somewhere. I read through the SENSEI source code, but can’t find any reason why they are dropped. It looks like the Catalyst interface is doing some copying, which the Sensei interface does not. I saw some ParaView version dependent code in SENSEI that looked like the place where the VTK dataset is shallow copied
auto mesh = solverDataAdaptor->GetMesh(config, *time); dataAdaptor->SetDataTime(*time); dataAdaptor->SetDataTimeStep(*step); dataAdaptor->SetDataObject("input", mesh);
Above, mesh has proper Point, Cell, and Field data, but the FieldData never shows up when running scripts in sensei.
This happend with Sensei 3.1.0 and I have tried PV 5.4 and PV 5.6.
So my questions are:
- Should this work for FieldData as it does for Point and Cell data?
- Can I fix this from outside or is a change in SENSEI required?
- Is there maybe a recommended version combination between ParaView and SENSEI, where this actually works?
Many thanks for any hints,