{
    "componentChunkName": "component---src-templates-markdown-doc-tsx",
    "path": "/2025.1.3/references/visualization",
    "result": {"data":{"mdx":{"id":"daff7744-6483-536e-96bf-b69e1538d2c6","frontmatter":{"title":"Visualizing input and output files","images":[{"publicURL":"/static/15d41f3b80dd0626582c539275cb59b7/xdmf.png","childImageSharp":{"gatsbyImageData":{"layout":"constrained","backgroundColor":"#080808","images":{"fallback":{"src":"/static/15d41f3b80dd0626582c539275cb59b7/3a29f/xdmf.png","srcSet":"/static/15d41f3b80dd0626582c539275cb59b7/b3222/xdmf.png 140w,\n/static/15d41f3b80dd0626582c539275cb59b7/0dc9f/xdmf.png 280w,\n/static/15d41f3b80dd0626582c539275cb59b7/3a29f/xdmf.png 559w","sizes":"(min-width: 559px) 559px, 100vw"},"sources":[{"srcSet":"/static/15d41f3b80dd0626582c539275cb59b7/ed27c/xdmf.webp 140w,\n/static/15d41f3b80dd0626582c539275cb59b7/982c3/xdmf.webp 280w,\n/static/15d41f3b80dd0626582c539275cb59b7/1560b/xdmf.webp 559w","type":"image/webp","sizes":"(min-width: 559px) 559px, 100vw"}]},"width":600,"height":630.0536672629696}}},{"publicURL":"/static/b2d9c7d0154db14ed385801191b6ac11/xdmf_blocks.png","childImageSharp":{"gatsbyImageData":{"layout":"constrained","backgroundColor":"#f8f8f8","images":{"fallback":{"src":"/static/b2d9c7d0154db14ed385801191b6ac11/fb679/xdmf_blocks.png","srcSet":"/static/b2d9c7d0154db14ed385801191b6ac11/03ed7/xdmf_blocks.png 120w,\n/static/b2d9c7d0154db14ed385801191b6ac11/29b4c/xdmf_blocks.png 240w,\n/static/b2d9c7d0154db14ed385801191b6ac11/fb679/xdmf_blocks.png 480w","sizes":"(min-width: 480px) 480px, 100vw"},"sources":[{"srcSet":"/static/b2d9c7d0154db14ed385801191b6ac11/1472f/xdmf_blocks.webp 120w,\n/static/b2d9c7d0154db14ed385801191b6ac11/7b774/xdmf_blocks.webp 240w,\n/static/b2d9c7d0154db14ed385801191b6ac11/cb3cd/xdmf_blocks.webp 480w","type":"image/webp","sizes":"(min-width: 480px) 480px, 100vw"}]},"width":600,"height":183.75}}},{"publicURL":"/static/00946704a11c1018879f3ef80970a06d/nonlinear_subdivision.png","childImageSharp":{"gatsbyImageData":{"layout":"constrained","backgroundColor":"#e8e8e8","images":{"fallback":{"src":"/static/00946704a11c1018879f3ef80970a06d/a7a6e/nonlinear_subdivision.png","srcSet":"/static/00946704a11c1018879f3ef80970a06d/10569/nonlinear_subdivision.png 118w,\n/static/00946704a11c1018879f3ef80970a06d/1a211/nonlinear_subdivision.png 237w,\n/static/00946704a11c1018879f3ef80970a06d/a7a6e/nonlinear_subdivision.png 473w","sizes":"(min-width: 473px) 473px, 100vw"},"sources":[{"srcSet":"/static/00946704a11c1018879f3ef80970a06d/f3591/nonlinear_subdivision.webp 118w,\n/static/00946704a11c1018879f3ef80970a06d/dd82f/nonlinear_subdivision.webp 237w,\n/static/00946704a11c1018879f3ef80970a06d/5b82d/nonlinear_subdivision.webp 473w","type":"image/webp","sizes":"(min-width: 473px) 473px, 100vw"}]},"width":600,"height":52.00845665961945}}}]},"body":"var _excluded = [\"components\"];\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n/* @jsxRuntime classic */\n/* @jsx mdx */\n\nvar _frontmatter = {\n  \"title\": \"Visualizing input and output files\",\n  \"images\": [\"../images/xdmf.png\", \"../images/xdmf_blocks.png\", \"../images/nonlinear_subdivision.png\"]\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n    props = _objectWithoutProperties(_ref, _excluded);\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h1\", null, \"Visualizing input and output files\"), mdx(\"h2\", null, \"Point data\"), mdx(\"p\", null, \"Point (receiver) data are output in the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://seismic-data.org/\"\n  }, \"ASDF\"), \"\\nfile format. Please see the ASDF website for details and documentation.\"), mdx(\"h2\", null, \"Volume and surface data\"), mdx(\"p\", null, \"Meshes and wavefield data are read and written as\\n\", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.hdfgroup.org/solutions/hdf5/\"\n  }, \"HDF5\"), \" files. The HDF5 library\\nallows us to performantly access single files in parallel, as well as\\nallowing for the portable sharing of such files. To see a visual\\nrepresentation of what's in these files we recommend using\\n\", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.paraview.org\"\n  }, \"Paraview\"), \".\"), mdx(Message, {\n    color: \"violet\",\n    header: \"Paraview 5.10 and 5.11 on Windows\",\n    content: mdx(\"div\", null, mdx(\"p\", null, \"Paraview versions 5.10 and 5.11 on Windows cannot open files from the WSL file system. Please copy them to a Windows file system or use Paraview 5.9.1.\")),\n    mdxType: \"Message\"\n  }), mdx(\"p\", null, \"Note that we \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"strongly recommend\"), \" to download Paraview from the official\\nwebsite -- the versions installed through Linux package management systems\\noften do not come with the correct libraries installed.\"), mdx(\"p\", null, \"Files are visualized in Paraview using the\\n\", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://xdmf.org/\"\n  }, \"XDMF\"), \" standard. This is why you'll see\\nfor every mesh, surface, or volume output file used by Salvus, an associated\\nfile with the same name but with a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".xdmf\"), \" file suffix. It is this \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".xdmf\"), \"\\nfile that should be opened in Paraview. When you do open such a file, you\\nshould see a dialogue box which looks similar to the following image:\"), mdx(props.images.Img1, null), mdx(\"p\", null, \"The reader you require is \\\"XDMF Reader\\\". Selecting a different reader may\\ncause Paraview to crash.\"), mdx(\"h2\", null, \"Meshes and Models\"), mdx(\"p\", null, \"Not all data that is required to visualize the mesh and the model defined on\\nthat mesh in detail is also required for the numerical computations. To avoid\\nunnecessarily large files, salvus can write meshes with different level of\\ndetail for visualization. If a mesh lacks the visualization data, it can always\\nbe added later on by reading and rewriting the mesh:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"UnstructuredMesh.from_h5(\\\"input.h5\\\").write_h5(\\\"output.h5\\\", mode=\\\"all\\\")\\n\")), mdx(\"p\", null, \"Similarly, the mesh file size can be reduced by removing unnecessary data:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"UnstructuredMesh.from_h5(\\\"input.h5\\\").write_h5(\\\"output.h5\\\", mode=\\\"minimal\\\")\\n\")), mdx(\"p\", null, \"For details on the different output modes see\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"salvus.mesh.UnstructuredMesh.write_h5()\")), mdx(\"h2\", null, \"Multi-Block XDMF Files\"), mdx(\"p\", null, \"XDMF files can contain multiple blocks of data, in particular salvus meshes can\\ncontain:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"the \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Skeleton Mesh\"), \", that is the first order mesh. This is useful to look\\nat the element sizes and where refinements are placed. For higher order\\nmeshes, this should not be used to judge element shape or quality, but for\\nfirst order meshes the skeleton is equal to actual mesh.\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"the \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"GLL Model\"), \": this block contains a sub-connectivity for each element\\nin the case of higher order meshes and duplicated nodes to correctly\\nrepresent discontinuous fields such as the material properties as nodal\\nfields.\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"the \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"GLL Mesh\"), \": this block also contains the sub-connectivity, but does\\nnot duplicate the nodes. As such it allows paraview to correctly detect the\\nouter boundaries of the domain, which leads to better performance and\\nsmoother rendering. On the downside, the model cannot be represented on this\\nblock.\"))), mdx(Grid, {\n    verticalAlign: \"middle\",\n    stackable: true,\n    columns: 2,\n    mdxType: \"Grid\"\n  }, mdx(Grid.Column, null, mdx(Segment, {\n    basic: true,\n    mdxType: \"Segment\"\n  }, mdx(props.images.Img2, null))), mdx(Grid.Column, null, mdx(Segment, {\n    basic: true,\n    mdxType: \"Segment\"\n  }, \"Unfortunately, paraview by default enables all blocks when opening a multi-block file and the user has to select a single one to get a useful view.\"))), mdx(\"h2\", null, \"High Order Meshes in Paraview\"), mdx(\"p\", null, \"As XDMF does not support correct handling of high order meshes, we have\\nresorted to sub-connectivities above. To get a more accurate representation of\\nthe smooth shapes of higher order elements, salvus can output meshes in\\n\", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://vtk.org/wp-content/uploads/2015/04/file-formats.pdf\"\n  }, \"VTK format\"), \".\\n3D meshes can be written both in the legacy ASCII format and the newer xml\\nbased format, 2D meshes currently only support the legacy format. For paraview\\nto correctly detect the files, the file endings need to be \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"*.vtu\"), \" for xml\\nfiles and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"*.vtk\"), \" for the legacy files. Note that these files do not contain\\nthe model and cannot be used for numerical computations, but are only meant to\\nvisualize the geometry of the mesh.\"), mdx(Grid, {\n    verticalAlign: \"middle\",\n    stackable: true,\n    columns: 2,\n    mdxType: \"Grid\"\n  }, mdx(Grid.Column, null, mdx(Segment, {\n    basic: true,\n    mdxType: \"Segment\"\n  }, mdx(props.images.Img3, null))), mdx(Grid.Column, null, mdx(Segment, {\n    basic: true,\n    mdxType: \"Segment\"\n  }, \"Once opened, paraview renders the high order elements by a linear subdivision, to get a smooth view the user has to increase the `Nonlinear Subdivision Level` to a reasonable level. High values may lead to very high memory usage.\"))));\n}\n;\nMDXContent.isMDXComponent = true;"},"site":{"siteMetadata":{"salvusDocVersions":{"current":"2026.5.0"}}}},"pageContext":{"id":"daff7744-6483-536e-96bf-b69e1538d2c6"}},
    "staticQueryHashes": ["1756726491","1865182279","3419370438","3597190305","4112489441","519097329"]}