{"id":21044311,"url":"https://github.com/trixi-framework/tutorial-2023-snubic","last_synced_at":"2025-03-13T22:09:51.603Z","repository":{"id":104003861,"uuid":"588589647","full_name":"trixi-framework/tutorial-2023-snubic","owner":"trixi-framework","description":"Companion repository for a tutorial on the Julia programming language and Trixi.jl","archived":false,"fork":false,"pushed_at":"2023-01-20T05:10:08.000Z","size":1454,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-08T18:53:35.609Z","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-13T13:51:57.000Z","updated_at":"2024-08-14T11:26:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"d43915fe-b2c7-4cd4-943a-df86409bd268","html_url":"https://github.com/trixi-framework/tutorial-2023-snubic","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%2Ftutorial-2023-snubic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftutorial-2023-snubic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftutorial-2023-snubic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trixi-framework%2Ftutorial-2023-snubic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trixi-framework","download_url":"https://codeload.github.com/trixi-framework/tutorial-2023-snubic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243489898,"owners_count":20299001,"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.242Z","updated_at":"2025-03-13T22:09:51.584Z","avatar_url":"https://github.com/trixi-framework.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trixi.jl: High-Order Numerical Simulations of Conservation Laws in Julia\n\nThis is the companion repository for the online tutorial on the\n[Julia programming language](https://julialang.org) and\n[Trixi.jl](https://github.com/trixi-framework/Trixi.jl), given in the context of\nthe DFG research unit [SNuBIC](https://snubic.io) on 19th January 2023.\n\nIn case of questions before the beginning of the tutorial, please get in touch with\n[Michael](https://lakemper.eu) or\n[create an issue](https://github.com/trixi-framework/tutorial-2023-snubic/issues/new).\nFor Trixi.jl-specific questions, you can also create an issue in the\n[Trixi.jl GitHub repository](https://github.com/trixi-framework/Trixi.jl)\nor\n[join the Trixi.jl Slack workspace](https://join.slack.com/t/trixi-framework/shared_invite/zt-sgkc6ppw-6OXJqZAD5SPjBYqLd8MU~g).\n\n\n## Tutorial files\n| Item | [nbviewer](https://nbviewer.jupyter.org/) | [mybinder](https://mybinder.org/) |\n|:-|:-:|:-:|\n| [`introduction_to_julia.ipynb`](introduction_to_julia.ipynb) | [![nbviewer](https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.jupyter.org/github/trixi-framework/tutorial-2023-snubic/blob/main/introduction_to_julia.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/trixi-framework/tutorial-2023-snubic/HEAD?filepath=introduction_to_julia.ipynb) |\n| [`introduction_to_trixi.ipynb`](introduction_to_trixi.ipynb) | [![nbviewer](https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.jupyter.org/github/trixi-framework/tutorial-2023-snubic/blob/main/introduction_to_trixi.ipynb) | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/trixi-framework/tutorial-2023-snubic/HEAD?filepath=introduction_to_trixi.ipynb) |\n\n**Note: The Jupyter notebook files will be provided at the latest on the day of the\ntutorial.** You can, however, already follow the instructions\nbelow to\n[set up a local Julia/Jupyter installation](#setting-up-a-local-juliajupyter-installation),\nincluding installing Julia/IJulia and the required Julia packages.\n\nAdditional tutorials are available in the\n[documentation of Trixi.jl](https://trixi-framework.github.io/Trixi.jl/stable/).\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\nallows users to easily extend its functionality and was designed to be\nuseful to experienced researchers and new users alike.\nIn this two-part tutorial, we will first give a brief introduction to the\nJulia programming language. In the second part, we will\ndemonstrate what you can do with Trixi.jl and how you can use it (and extend it)\nfor your own research. You can follow the tutorials interactively\nusing reproducible Jupyter notebooks provided in a companion repository.\nIn addition, we will end with a hands-on session where you can try out\nJulia and Trixi.jl for yourself using these notebooks.\n\n**Note:** The tutorial is intended for researchers who are already\nfamiliar with at least one other high-level language scientific programming\nlanguage such as Python, C/C++, or Fortran.\n\n\n## Getting started\n\nYou can view a static version of the Jupyter notebooks `*.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\" badges in the table of contents above)\n\nThese static versions do not contain output of the code cells.\n\nBelow you will find information on how to use the notebooks either via\n[mybinder.org](#using-mybinderorg) or by\n[setting up a local installation](#setting-up-a-local-juliajupyter-installation).\nAs an alternative to using Jupyter, you may also just copy the code from the\nnotebooks into the [Julia REPL](#using-the-julia-repl) and execute it there.\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### Using mybinder.org\nThe easiest way to get started is to click on the *Launch Binder* badges\nin the table of contents 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.jl 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.8.5 as of 2023-01-15; 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.jl 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/tutorial-2023-snubic.git\n```\nThen, navigate to your repository folder and install the required packages:\n```shell\ncd tutorial-2023-snubic\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.jl](https://github.com/trixi-framework/Trixi.jl).\nThe `--project=.` argument tells Julia's package manager\n[Pkg.jl](https://pkgdocs.julialang.org/v1/)\nto use the [`Project.toml`](Project.toml) and [`Manifest.toml`](Manifest.toml)\nfiles from this repository to figure out which packages to install.\n\n#### Starting JupyterHub from Julia\nYou can finally start JupyterHub from Julia using the following command inside\nthe repository folder:\n```shell\njulia -e 'using IJulia; jupyterlab(dir=\".\")'\n```\n\n### Using the Julia REPL\nIf you want, you can also directly execute the notebook contents in the Julia\nREPL. In this case, please also follow the instructions on installing the\nrequired Julia packages [above](#installing-the-required-julia-packages). Then,\nstart the REPL inside the repository folder with\n```shell\njulia --project=.\n```\n\n\n## Authors\nThis repository was created by [Michael\nSchlottke-Lakemper](https://lakemper.eu). It is based on a tutorial previously\ngiven at [ICOSAHOM 2021](https://github.com/trixi-framework/tutorial-2021-icosahom),\nwhich was initiated jointly by [Hendrik Ranocha](https://ranocha.de), Michael\nand [Andrew R. Winters](https://liu.se/en/employee/andwi94).\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%2Ftutorial-2023-snubic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrixi-framework%2Ftutorial-2023-snubic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrixi-framework%2Ftutorial-2023-snubic/lists"}