Path: blob/main/docs/literate/src/files/first_steps/changing_trixi.jl
5593 views
#src # Changing Trixi.jl itself12# If you plan on editing Trixi.jl itself, you can download Trixi.jl locally and run it from3# the cloned directory.456# ## Forking Trixi.jl78# To create your own fork of Trixi.jl, log in to your GitHub account, visit the9# [Trixi.jl GitHub repository](https://github.com/trixi-framework/Trixi.jl) and click the `Fork`10# button located in the upper-right corner of the page. Then, click on `Create fork` in the opened11# window to complete the forking process.121314# ## Cloning Trixi.jl151617# ### Windows1819# If you are using Windows, you can clone Trixi.jl by using the GitHub Desktop tool:20# - If you do not have a GitHub account yet, create it on21# the [GitHub website](https://github.com/join).22# - Download and install [GitHub Desktop](https://desktop.github.com/) and then log in to23# your account.24# - Open GitHub Desktop, press `Ctrl+Shift+O`.25# - In the opened window, navigate to the `URL` tab and paste `trixi-framework/Trixi.jl` or26# `YourGitHubUserName/Trixi.jl` to clone your own fork of Trixi.jl, and choose the27# path to the folder where you want to save Trixi.jl. Then click `Clone` and Trixi.jl will be28# cloned to your computer.2930# Now you cloned Trixi.jl and only need to tell Julia to use the local clone as the package sources:31# - Open a terminal using `Win+r` and `cmd`. Navigate to the folder with the cloned Trixi.jl using `cd`.32# - Create a new directory `run`, enter it, and start Julia with the `--project=.` flag:33# ```shell34# mkdir run35# cd run36# julia --project=.37# ```38# - Now run the following commands to install all relevant packages:39# ````julia40# using Pkg; Pkg.develop(PackageSpec(path="..")) # Tell Julia to use the local Trixi.jl clone41# Pkg.add(["OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqSSPRK", "Plots"]) # Install additional packages42# ````4344# Now you already installed Trixi.jl from your local clone. Note that if you installed Trixi.jl45# this way, you always have to start Julia with the `--project` flag set to your `run` directory,46# e.g.,47# ```shell48# julia --project=.49# ```50# if already inside the `run` directory.515253# ### Linux5455# You can clone Trixi.jl to your computer by executing the following commands:56# ```shell57# git clone [email protected]:trixi-framework/Trixi.jl.git58# # If an error occurs, try the following:59# # git clone https://github.com/trixi-framework/Trixi.jl60# cd Trixi.jl61# mkdir run62# cd run63# julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path=".."))' # Tell Julia to use the local Trixi.jl clone64# julia --project=. -e 'using Pkg; Pkg.add(["OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqSSPRK", "Plots"])' # Install additional packages65# ```66# Alternatively, you can clone your own fork of Trixi.jl by replacing the link67# `[email protected]:trixi-framework/Trixi.jl.git` with `[email protected]:YourGitHubUserName/Trixi.jl.git`.6869# Note that if you installed Trixi.jl this way,70# you always have to start Julia with the `--project` flag set to your `run` directory, e.g.,71# ```shell72# julia --project=.73# ```74# if already inside the `run` directory.757677# ## Developing Trixi.jl7879# If you've created and cloned your own fork of Trixi.jl, you can make local changes to Trixi.jl80# and propose them as a Pull Request (PR) to be merged into `trixi-framework/Trixi.jl`.8182# Linux and MacOS utilize the `git` version control system to manage changes between your local and83# remote repositories. The most commonly used commands include `add`, `commit`, `push` and `pull`.84# You can find detailed information about these functions in the85# [Git documentation](https://git-scm.com/docs).8687# For Windows and GitHub Desktop users, refer to the88# [documentation of GitHub Desktop](https://docs.github.com/en/desktop/overview/getting-started-with-github-desktop#making-changes-in-a-branch).8990# After making local changes to Trixi.jl and pushing them to the remote repository, you can open a91# Pull Request (PR) from your branch to the main branch of `trixi-framework/Trixi.jl`. Then, follow92# the Review checklist provided in the Pull Request to streamline the review process.939495# ## Additional reading9697# To further delve into Trixi.jl, you may have a look at the following introductory tutorials.98# - [Behind the scenes of a simulation setup](@ref behind_the_scenes_simulation_setup) will guide99# you through a simple Trixi.jl setup ("elixir"), giving an overview of what happens in the100# background during the initialization of a simulation. It clarifies some of the more101# fundamental, technical concepts that are applicable to a variety of (also more complex)102# configurations.103# - [Introduction to DG methods](@ref scalar_linear_advection_1d) will teach you how to set up a104# simple way to approximate the solution of a hyperbolic partial differential equation. It will105# be especially useful to learn about the106# [Discontinuous Galerkin method](https://en.wikipedia.org/wiki/Discontinuous_Galerkin_method)107# and the way it is implemented in Trixi.jl.108# - [Adding a new scalar conservation law](@ref adding_new_scalar_equations) and109# [Adding a non-conservative equation](@ref adding_nonconservative_equation)110# describe how to add new physics models that are not yet included in Trixi.jl.111# - [Callbacks](@ref callbacks-id) gives an overview of how to regularly execute specific actions112# during a simulation, e.g., to store the solution or adapt the mesh.113114115