[VTK] Output of multiple vtk sets
I tried visualizing two different sets of vtk files by adding an entry to the config file. For simulation-2, I did:
...
},
"output": [{
...,
{
"id": "matrix",
"type": "vtk",
"basename": "case1_single_tracer_matrix",
"extensions": ["vtu"],
"update" : { "type": "stdout", "key": "[[Wrote tracer vtk output]]" }
},
{
"id": "fracture",
"type": "vtk",
"basename": "case1_single_tracer_fracture",
"extensions": ["vtu"],
"update" : { "type": "stdout", "key": "[[Wrote tracer vtk output]]" }
}
All files are passed to the front end, but appear in the same viewer and are displayed consecutively. Is there a restriction on having a single viewer?
As a first shot, I tried modifying views/RunSimulation/index.jsx
to show two vtk viewers with (still) the same output, but ultimately only one is shown. Apart from that, it seems to me that in this part of the code:
...
} else if (file.mimetype === 'text/xml') {
// loop through the expected output configs
vtkOutputConfig.forEach((expectedOutput) => {
// if there is a match with the base name and file name
if (file.name.match(expectedOutput.basename)) {
const content = Base64.decode(file.content)
const blob = new Blob([content], { type: file.mimetype })
const vtkFile = new File([blob], file.name)
setResultVTKFiles((vtkFiles) => [...vtkFiles, vtkFile])
}
})
}
...
all files, independently of the base name, are added to the same array of files which ultimately end up in the viewer?