{"id":21044312,"url":"https://github.com/trixi-framework/talk-2021-juliacon","last_synced_at":"2025-05-15T17:32:42.051Z","repository":{"id":47756959,"uuid":"378204566","full_name":"trixi-framework/talk-2021-juliacon","owner":"trixi-framework","description":"Adaptive and extendable numerical simulations with Trixi.jl at JuliaCon 2021","archived":false,"fork":false,"pushed_at":"2021-08-14T11:16:15.000Z","size":28254,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-10T00:53:09.341Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trixi-framework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-18T16:13:58.000Z","updated_at":"2023-07-25T14:47:06.000Z","dependencies_parsed_at":"2022-09-12T23:22:50.098Z","dependency_job_id":null,"html_url":"https://github.com/trixi-framework/talk-2021-juliacon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftalk-2021-juliacon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftalk-2021-juliacon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftalk-2021-juliacon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftalk-2021-juliacon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trixi-framework","download_url":"https://codeload.github.com/trixi-framework/talk-2021-juliacon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225365741,"owners_count":17462973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T14:16:16.361Z","updated_at":"2024-11-19T14:16:17.258Z","avatar_url":"https://github.com/trixi-framework.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JuliaCon 2021: Adaptive and extendable numerical simulations with Trixi.jl\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)\n[![nbviewer](https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.jupyter.org/github/trixi-framework/talk-2021-juliacon/blob/main/demo.ipynb)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/trixi-framework/talk-2021-juliacon/HEAD?filepath=demo.ipynb)\n[![YouTube](https://img.shields.io/youtube/views/hoViWRAhCBE?style=social)](https://www.youtube.com/watch?v=hoViWRAhCBE)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.youtube.com/watch?v=hoViWRAhCBE\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg\n    src=\"https://user-images.githubusercontent.com/3637659/124484059-4ca59c00-ddab-11eb-9ebc-bcf152b095bb.png\"\n    width=\"500px\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis is the companion repository for the [JuliaCon 2021](https://juliacon.org/2021) talk\n\n**Adaptive and extendable numerical simulations with Trixi.jl**\u003cbr\u003e\n*Michael Schlottke-Lakemper and Hendrik Ranocha*\u003cbr\u003e\n[Recorded talk on YouTube](https://www.youtube.com/watch?v=hoViWRAhCBE)\n\n(see abstract [below](#abstract)). Here you can find the presentation slides\n[talk.pdf](talk.pdf) as well as the [Jupyter](https://jupyter.org) notebook\n[demo.ipynb](demo.ipynb), which was used during the talk for a live\ndemonstration of [Trixi.jl](https://github.com/trixi-framework/Trixi.jl).\nNote that to play the video linked in the presentation, you also need to\ndownload the [media/](media/) directory and place it in the same folder as the\nPDF. There are also some additional Trixi elixirs (simulation setups) in the\n[examples](examples/) directory.\n\n\n## Abstract\n\nTrixi.jl is a numerical simulation framework for adaptive, high-order\ndiscretizations of conservation laws. It has a modular architecture that allows\nusers to easily extend its functionality and was designed to be useful to\nexperienced researchers and new users alike. In this talk, we will give an\noverview of Trixi’s current features, present a typical workflow for creating\nand running a simulation, and show how to add new capabilities for your own\nresearch projects.\n\n### More detailed description\n\nWhen doing research on numerical discretization methods, scientists are often\nfaced with a dilemma when choosing the appropriate simulation tool: In the\nbeginning of a project, you often want a code that is nimble and with low\noverhead, which allows rapid prototyping to assist you in experimenting with\ndifferent approaches. Later on, however, you want to evaluate your newly\ndeveloped methods and algorithms in a production setting and require a\nhigh-performance implementation, support for parallelization, and a full\ntoolchain for postprocessing and visualizing your results.\n\nWith [Trixi.jl](https://github.com/trixi-framework/Trixi.jl), we try to bridge\nthis gap by using a simple but modular architecture, which allows us to easily\nextend Trixi beyond the existing functionality. The main components, such as\nthe mesh, the solvers, or the equations, can each be selected and combined\nindividually in a library-like manner. At the same time, Trixi is a\ncomprehensive numerical simulation framework for hyperbolic PDEs and comes with\nall necessary ingredients to set up a simulation, run it in parallel, and\nvisualize the results.\n\nAt its core, various systems of equations are solved on hierarchical\nquadtree/octree grids that provide adaptive mesh refinement via solution-based\nindicators. The equations, e.g., compressible Euler, ideal MHD, or hyperbolic\ndiffusion, are discretized with high-order discontinuous Galerkin spectral\nelement methods, with support for entropy-stable shock capturing. Trixi puts an\nemphasis on having a fast implementation with shared memory parallelization,\nand integrates well with other packages of the Julia ecosystem, such as\n[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) for time\nintegration, [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) for\nautomatic differentiation, or [Plots.jl](https://github.com/JuliaPlots/Plots.jl)\nfor visualization. One of the key goals of Trixi is to be useful to experienced\nresearchers while remaining accessible for new users or students. Thus, we\ncontinuously strive to keep the implementation as simple as reasonably possible.\n\nDue to Julia’s unique capabilities and ecosystem including\n[LoopVectorization.jl](https://github.com/JuliaSIMD/LoopVectorization.jl),\nserial performance of Trixi can be on par with large-scale C++ and Fortran\nprojects in performance benchmarks using a subset of optimized methods. At the\nsame time, the general framework is simple and extendable enough to allow\nporting new solver infrastructures within a few hours.\n\nIn this talk, we will give an overview of the currently implemented features\nand discuss the overall architecture of Trixi. We will show a typical workflow\nfor creating and running a simulation, and present scientific results that were\nobtained with Trixi. Finally, we will demonstrate how to add new capabilities to\nTrixi for your own research projects.\n\n\n## Getting started\n\nYou can view a static version of the Jupyter notebook [`demo.ipynb`](demo.ipynb)\n\n- directly on GitHub (select the notebook; this may fail sometimes)\n- or on [nbviewer.jupyter.org](https://nbviewer.jupyter.org/)\n  (select the \"render\" badge at the top of this README)\n\nThese static versions do not contain output of the code cells.\n\n### Using mybinder.org\nThe easiest way to get started is to click on the *Launch Binder* badge above.\nThis launches the notebook for interactive use in your browser without the need\nto download or install anything locally.\n\nIn this case, you can skip the rest of this *Getting started* section. A\nJupyter instance will be started automagically in the cloud via\n[mybinder.org](https://mybinder.org), and the notebook will loaded directly from\nthis repository.\n\n*Note:*  Depending on current usage and available resources, it typically takes\na few minutes to launch a notebook with [mybinder.org](https://mybinder.org)\n(sometimes a little longer), so try to remain patient. Similarly, the first two\ncells of the notebook take much longer to execute than usual (around 1.5 minutes\nfor the first Trixi simulation and about 1 minute for the first plot), since\nJulia compiles all methods \"just-ahead-of-time\" at first use. Subsequent runs\nwill be much faster.\n\n### Setting up a local Julia/Jupyter installation\nAlternatively, you can also clone this repository and open the notebook on your\nlocal machine. This is recommended if you already have a Julia + Jupyter setup\nor if you plan to try out Julia anyways.\n\n#### Installing Julia and IJulia\nTo obtain Julia, go to https://julialang.org/downloads/ and download the latest\nstable release (v1.6.1 as of 2021-06-28; neither use the LTS release nor\nJulia Pro). Then, follow the\n[platform-specific instructions](https://julialang.org/downloads/platform/)\nto install Julia on your machine. Note that there is no need to compile anything\nif you are using Linux, MacOS, or Windows.\n\nAfter the installation, open a terminal and start the Julia *REPL*\n(i.e., the interactive prompt) with\n```shell\njulia\n```\nTo use the notebook, you also need to get the\n[IJulia](https://github.com/JuliaLang/IJulia.jl) package, which provides a Julia\nbackend for Jupyter. In the REPL, execute\n```julia\nusing Pkg\nPkg.add(\"IJulia\")\n```\nto install IJulia. For more details, especially on how to use an existing Jupyter\ninstallation, please refer to the\n[IJulia documentation](https://julialang.github.io/IJulia.jl/stable/).\nFrom here on, we assume that you have a working installation of Julia, Jupyter,\nand the Julia kernel for Jupyter.\n\n#### Installing the required Julia packages\nTo make the notebook fully reproducible, we have used Julia's package manager\nto pin all packages to a fixed release. This ensures that you always have a\nJulia environment in which all examples in this notebook work. Later you can\nalways install the latest versions of Trixi and its dependencies by following\nthe instructions in the Trixi\n[documentation](https://trixi-framework.github.io/Trixi.jl/stable/).\n\nIf you have not done it yet, clone the repository where this notebook is stored:\n```shell\ngit clone https://github.com/trixi-framework/talk-2021-juliacon.git\n```\nThen, navigate to your repository folder and install the required packages:\n```shell\ncd talk-2021-juliacon\njulia --project=. -e 'using Pkg; Pkg.instantiate()'\n```\nThis will download and build all required packages, including the ODE package\n[OrdinaryDiffEq](https://github.com/SciML/OrdinaryDiffEq.jl), the visualization\npackage [Plots](https://github.com/JuliaPlots/Plots.jl), and of course\n[Trixi](https://github.com/trixi-framework/Trixi.jl).\nThe `--project=.` argument tells Julia to use the `Project.toml`\nand `Manifest.toml` files from this repository to figure out which packages to install.\n\nAs an alternative to running the examples in the notebook directly, you may\nalso just view the notebook *statically* by opening it within\n[Jupyter NBViewer](https://nbviewer.jupyter.org/github/trixi-framework/talk-2021-Introduction_to_Julia_and_Trixi/blob/main/Talk.ipynb?flush_cache=true).\n\n*General note:* Make sure that you execute the examples (either in the notebook\nor in the REPL) *in order*, at least for the first time. Both the notebook and\nthe Julia REPL maintain an internal state and and some snippets depend on\nearlier statements having been executed.\n\n#### Displaying the presentation\n\nTo display the presentation as in the talk (skipping some cells/slides that\nprovide further information), you need the\n[Jupyter extension RISE](https://rise.readthedocs.io/en/stable),\nthat you can install via\n```shell\npip3 install --user RISE\n```\nAfter opening the Jupyter notebook, you can enter the RISE presentation mode\nwith `Alt + R`.\n\n\n## Authors\nThis repository was initiated by\n[Michael Schlottke-Lakemper](https://www.mi.uni-koeln.de/NumSim/schlottke-lakemper)\nand [Hendrik Ranocha](https://ranocha.de).\n\n\n## License\nThe contents of this repository are licensed under the MIT license\n(see [LICENSE.md](LICENSE.md)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrixi-framework%2Ftalk-2021-juliacon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrixi-framework%2Ftalk-2021-juliacon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrixi-framework%2Ftalk-2021-juliacon/lists"}