Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D Dumux Web App
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • dumux-repositories
  • Dumux Web App
  • Issues
  • #13
Closed
Open
Created Aug 20, 2020 by Dennis Gläser@DennisGlaeserOwner

[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?

Edited Sep 01, 2020 by Timo Koch
Assignee
Assign to
Time tracking