{
    "componentChunkName": "component---src-templates-markdown-doc-tsx",
    "path": "/2025.1.3/updates/2024_1/update_guide",
    "result": {"data":{"mdx":{"id":"c99a8931-2abe-541b-a219-c16ed3318be1","frontmatter":{"title":"Updating Guide from Salvus 0.12.x to Salvus 2024.1.x","images":[{"publicURL":"/static/1d3753f7f08f6d8976f3385483f5972a/project_migration_dialog.png","childImageSharp":{"gatsbyImageData":{"layout":"constrained","backgroundColor":"#f8f8f8","images":{"fallback":{"src":"/static/1d3753f7f08f6d8976f3385483f5972a/12b22/project_migration_dialog.png","srcSet":"/static/1d3753f7f08f6d8976f3385483f5972a/318a1/project_migration_dialog.png 150w,\n/static/1d3753f7f08f6d8976f3385483f5972a/19969/project_migration_dialog.png 300w,\n/static/1d3753f7f08f6d8976f3385483f5972a/12b22/project_migration_dialog.png 600w,\n/static/1d3753f7f08f6d8976f3385483f5972a/42487/project_migration_dialog.png 1200w","sizes":"(min-width: 600px) 600px, 100vw"},"sources":[{"srcSet":"/static/1d3753f7f08f6d8976f3385483f5972a/73c4d/project_migration_dialog.webp 150w,\n/static/1d3753f7f08f6d8976f3385483f5972a/1f876/project_migration_dialog.webp 300w,\n/static/1d3753f7f08f6d8976f3385483f5972a/448bc/project_migration_dialog.webp 600w,\n/static/1d3753f7f08f6d8976f3385483f5972a/75575/project_migration_dialog.webp 1200w","type":"image/webp","sizes":"(min-width: 600px) 600px, 100vw"}]},"width":600,"height":72.99999999999999}}}]},"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\": \"Updating Guide from Salvus 0.12.x to Salvus 2024.1.x\",\n  \"images\": [\"../../images/project_migration_dialog.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, \"Updating Guide from Salvus 0.12.x to Salvus 2024.1.x\"), mdx(\"h2\", null, \"Users Who Should not Update (yet)\"), mdx(\"p\", null, \"Salvus \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"2024.1.0\"), \" contains major improvements and changes in all areas of\\nSalvus. We took great care to maintain backwards compatibility and most users\\nshould be able to safely update. Nonetheless, a few users should be careful when\\nupdating:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Meshing functionality for SmoothieSEM and simulating gravity has been\\ntemporarily disabled due to changes in our underlying meshing routines but we\\nplan to enable it again before too long. Until that point, please keep using\\nSalvus \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"0.12.x\"), \".\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"The chunked meshing interface has been removed. This has always been a bit\\ntricky to use and we might bring it back with a different interface in the\\nfuture.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Users with big, ongoing inversions and an active Salvus\", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"Project\"), \". While we\\nbelieve upgrading these should not result in any problems, things can always\\nbreak at scale so we advise some caution. Please feel free to reach out to our\\nsupport team to assist with this.\")), mdx(\"h2\", null, \"Updating Guide\"), mdx(\"p\", null, \"Nothing special needs to be done for the Salvus\", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Compute\"), \" binaries. Just\\nrunning the Mondaic downloader will update them.\"), mdx(\"p\", null, \"The Python installation requires a bit more work, as, starting with Salvus\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"2024.1.0\"), \", Salvus now requires Python 3.11. \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"We recommend to create a new\\nPython environment\"), \" for Salvus \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"2024.1.0\"), \", while backing up the old one:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-shell\"\n  }, \"mamba create --name salvus_backup --clone salvus\\nmamba remove --name salvus --all\\n\")), mdx(\"p\", null, \"Once this is done, please follow the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"../../installation/python_packages\"\n  }, \"usual installation\\ninstructions\"), \" to set\\nup a new environment.\"), mdx(\"h3\", null, \"Required Python Code Changes\"), mdx(\"p\", null, \"By and large, Salvus \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"2024.1.0\"), \" is fully compatible with projects and scripts\\ncreated with older versions of Salvus. However, there are a few important\\nchanges to note:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"A new module \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"salvus.material\"), \" has been added, which for now only contains\\nutilities for handling attenuation. In the future more functionality to handle\\nmaterial properties will be added or moved to here.\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Dealing with attenuation has been streamlined. For defining a standard linear\\nsolids model (SLS) using default arguments, the recommended way is to specify\\nthe \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"LinearSolids\"), \" as part of the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ModelConfiguration\"), \". The former class\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"LinearSolid\"), \" in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"salvus.mesh\"), \" has been removed, but it is still possible to\\ncompute a tailored least-squares fit to the Q-factor model using the\\nfunctionality in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"salvus.material.attenuation\"), \".\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"The meshing backend has undergone a major overhaul. While we strive for\\ncompatibility of the stable API, some rarely used advanced features have been\\nmoved or depreacted. When in doubt if this would affect you, please have a\\nlook at the current \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"../../examples/\"\n  }, \"tutorials\"), \" or reach out for support.\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"We started versioning the project files and directory structure on disk to\\nfacilitate migration steps in the future. The first time to try to load a\\nproject created with an older version of Salvus, you will see a message like\\nthis\"))), mdx(props.images.Img1, null), mdx(\"p\", null, \"Just to make sure you are not accidentially submitting the wrong answer, it\\nwill ask you again to confirm.\"), mdx(\"h4\", null, \"Required changes for expert use of the \", mdx(\"inlineCode\", {\n    parentName: \"h4\"\n  }, \"UnstructuredMesh\"), \" class\"), mdx(\"p\", null, \"The core fields of the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"UnstructuredMesh\"), \" class can no longer be directly\\nassigned. Most workflows should likely create new mesh objects instead. Please\\nsee the following collection of migration examples:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"mesh = sn.UnstructuredMesh(...)\\n\\n# No longer works:\\nmesh.points = points\\nmesh.connectivity = connectivity\\n# Instead use:\\nmesh = sn.UnstructuredMesh(points=points, connectivity=connectivity, ...)\\n\\n# No longer works:\\nmesh.points *= 1.1\\n# Instead use:\\nmesh.points[:] *= 1.1\\n\\n# No longer works:\\nmesh.elemental_fields = {}\\nmesh.side_sets = {}\\n# Instead use:\\nmesh.elemental_fields.clear()\\nmesh.side_sets.clear()\\n# Or create a new mesh object:\\nmesh = sn.UnstructuredMesh(..., elemental_fields={}, side_sets={})\\n\")));\n}\n;\nMDXContent.isMDXComponent = true;"},"site":{"siteMetadata":{"salvusDocVersions":{"current":"2026.5.0"}}}},"pageContext":{"id":"c99a8931-2abe-541b-a219-c16ed3318be1"}},
    "staticQueryHashes": ["1756726491","1865182279","3419370438","3597190305","4112489441","519097329"]}