Skip to content

Commit

Permalink
Merge branch 'main' into lc/gpu-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
benegee committed Nov 18, 2024
2 parents c8bba9b + 9c2f326 commit a82608f
Show file tree
Hide file tree
Showing 226 changed files with 4,878 additions and 2,585 deletions.
39 changes: 6 additions & 33 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: format-check
name: Format suggestions

on:
push:
Expand All @@ -8,37 +8,10 @@ on:
pull_request:

jobs:
check-format:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1]
julia-arch: [x86]
os: [ubuntu-latest]
format-suggestions:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}

- uses: actions/checkout@v4
- name: Install JuliaFormatter and format
# This will use the latest version by default but you can set the version like so:
#
# julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version = "0.13.0"))'
#
# TODO: Change the call below to
# format(".")
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.60"))'
julia -e 'using JuliaFormatter; format(["benchmark", "examples", "ext", "src", "test", "utils"])'
- name: Format check
run: |
julia -e '
out = Cmd(`git diff --name-only`) |> read |> String
if out == ""
exit(0)
else
@error "Some files have not been formatted !!!"
write(stdout, out)
exit(1)
end'
- uses: julia-actions/julia-format@v3
with:
version: "1.0.60"
2 changes: 1 addition & 1 deletion .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@v1.25.0
uses: crate-ci/typos@v1.27.0
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ Trixi.jl follows the interpretation of [semantic versioning (semver)](https://ju
used in the Julia ecosystem. Notable changes will be documented in this file
for human readability.

## Changes in the v0.9 lifecycle

#### Added

- New time integrator `PairedExplicitRK3`, implementing the third-order paired explicit Runge-Kutta
method with [Convex.jl](https://github.com/jump-dev/Convex.jl), [ECOS.jl](https://github.com/jump-dev/ECOS.jl),
and [NLsolve.jl](https://github.com/JuliaNLSolvers/NLsolve.jl) ([#2008])

## Changes when updating to v0.9 from v0.8.x

#### Added
Expand Down
12 changes: 9 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Trixi"
uuid = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
authors = ["Michael Schlottke-Lakemper <[email protected]>", "Gregor Gassner <[email protected]>", "Hendrik Ranocha <[email protected]>", "Andrew R. Winters <[email protected]>", "Jesse Chan <[email protected]>"]
version = "0.9.2-DEV"
version = "0.9.7-DEV"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down Expand Up @@ -37,6 +37,7 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SimpleUnPack = "ce78b400-467f-4804-87d8-8f486da07d0a"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
StartUpDG = "472ebc20-7c99-4d4b-9470-8fde4e9faa0f"
Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
StaticArrayInterface = "0d7ed370-da01-4f52-bd93-41d350b8b718"
Expand All @@ -56,10 +57,12 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
Convex = "f65535da-76fb-5f13-bab9-19810c17039a"
ECOS = "e2685f51-7e38-5353-a97d-a921fd2c8199"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"

[extensions]
TrixiConvexECOSExt = ["Convex", "ECOS"]
TrixiMakieExt = "Makie"
TrixiNLsolveExt = "NLsolve"

[compat]
Adapt = "3.7, 4.0"
Expand All @@ -82,9 +85,10 @@ KernelAbstractions = "0.9"
LinearAlgebra = "1"
LinearMaps = "2.7, 3.0"
LoopVectorization = "0.12.151"
MPI = "0.20"
MPI = "0.20.6"
Makie = "0.19, 0.20"
MuladdMacro = "0.2.2"
NLsolve = "4.5.1"
Octavian = "0.3.21"
OffsetArrays = "1.12"
P4est = "0.4.9"
Expand All @@ -98,14 +102,15 @@ Requires = "1.1"
SciMLBase = "1.90, 2"
SimpleUnPack = "1.1"
SparseArrays = "1"
StableRNGs = "1.0.2"
StartUpDG = "0.17.7, 1.1.5"
Static = "0.8.7, 1"
StaticArrayInterface = "1.4"
StaticArrays = "1.5"
StrideArrays = "0.1.26"
StructArrays = "0.6.11"
SummationByPartsOperators = "0.5.41"
T8code = "0.6"
T8code = "0.7"
TimerOutputs = "0.5.7"
Triangulate = "2.2"
TriplotBase = "0.1"
Expand All @@ -118,3 +123,4 @@ julia = "1.8"
Convex = "f65535da-76fb-5f13-bab9-19810c17039a"
ECOS = "e2685f51-7e38-5353-a97d-a921fd2c8199"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ installation and postprocessing procedures. Its features include:
* Discontinuous Galerkin methods
* Kinetic energy-preserving and entropy-stable methods based on flux differencing
* Entropy-stable shock capturing
* [Finite difference summation by parts (SBP) methods](https://github.com/ranocha/SummationByPartsOperators.jl)
* Advanced limiting strategies
* Positivity-preserving limiting
* Subcell invariant domain-preserving (IDP) limiting
* [Finite difference summation by parts (SBP) methods](https://github.com/ranocha/SummationByPartsOperators.jl)
* Entropy-bounded limiting
* Compatible with the [SciML ecosystem for ordinary differential equations](https://diffeq.sciml.ai/latest/)
* [Explicit low-storage Runge-Kutta time integration](https://diffeq.sciml.ai/latest/solvers/ode_solve/#Low-Storage-Methods)
* [Strong stability preserving methods](https://diffeq.sciml.ai/latest/solvers/ode_solve/#Explicit-Strong-Stability-Preserving-Runge-Kutta-Methods-for-Hyperbolic-PDEs-(Conservation-Laws))
Expand Down
42 changes: 24 additions & 18 deletions docs/literate/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ using Test: @testset
import Pkg

# Create markdown and notebook files for `file`
function create_files(title, file, repo_src, pages_dir, notebooks_dir; folder="")
function create_files(title, file, repo_src, pages_dir, notebooks_dir; folder = "")
notebook_filename = first(splitext(file)) * ".ipynb"
if !isempty(folder)
notebook_filename = joinpath(folder, notebook_filename)
end

binder_logo = "https://mybinder.org/badge_logo.svg"
binder_logo = "https://mybinder.org/badge_logo.svg"
nbviewer_logo = "https://img.shields.io/badge/render-nbviewer-f37726"
raw_notebook_logo = "https://img.shields.io/badge/raw-notebook-4cc61e"

notebook_path = "tutorials/notebooks/$notebook_filename"
binder_url = "https://mybinder.org/v2/gh/trixi-framework/Trixi.jl/tutorial_notebooks?filepath=$notebook_path"
binder_url = "https://mybinder.org/v2/gh/trixi-framework/Trixi.jl/tutorial_notebooks?filepath=$notebook_path"
nbviewer_url = "https://nbviewer.jupyter.org/github/trixi-framework/Trixi.jl/blob/tutorial_notebooks/$notebook_path"
raw_notebook_url = "https://raw.githubusercontent.com/trixi-framework/Trixi.jl/tutorial_notebooks/$notebook_path"

binder_badge = "# [![]($binder_logo)]($binder_url)"
binder_badge = "# [![]($binder_logo)]($binder_url)"
nbviewer_badge = "# [![]($nbviewer_logo)]($nbviewer_url)"
raw_notebook_badge = "# [![]($raw_notebook_logo)]($raw_notebook_url)"

Expand All @@ -28,25 +28,28 @@ function create_files(title, file, repo_src, pages_dir, notebooks_dir; folder=""
# available for the latest stable release of Trixi.jl at the time of caching.\n\n"
return string("# # $title\n\n", warning, content)
end
Literate.notebook(joinpath(repo_src, folder, file), joinpath(notebooks_dir, folder); execute=false, preprocess=preprocess_notebook, credit=false)
Literate.notebook(joinpath(repo_src, folder, file), joinpath(notebooks_dir, folder);
execute = false, preprocess = preprocess_notebook, credit = false)

# Generate markdown file
function preprocess_docs(content)
return string("# # [$title](@id $(splitext(file)[1]))\n $binder_badge\n $nbviewer_badge\n $raw_notebook_badge\n\n", content)
return string("# # [$title](@id $(splitext(file)[1]))\n $binder_badge\n $nbviewer_badge\n $raw_notebook_badge\n\n",
content)
end
Literate.markdown(joinpath(repo_src, folder, file), joinpath(pages_dir, folder); preprocess=preprocess_docs,)
Literate.markdown(joinpath(repo_src, folder, file), joinpath(pages_dir, folder);
preprocess = preprocess_docs,)
end

# Create tutorials with Literate.jl
function create_tutorials(files)
repo_src = joinpath(@__DIR__, "src", "files")
repo_src = joinpath(@__DIR__, "src", "files")

pages_dir = joinpath(@__DIR__, "..", "src", "tutorials")
notebooks_dir = joinpath(pages_dir, "notebooks")
pages_dir = joinpath(@__DIR__, "..", "src", "tutorials")
notebooks_dir = joinpath(pages_dir, "notebooks")

Sys.rm(pages_dir; recursive=true, force=true)
Sys.rm(pages_dir; recursive = true, force = true)

Sys.rm("out"; recursive=true, force=true)
Sys.rm("out"; recursive = true, force = true)

# Run tests on all tutorial files
@testset "TrixiTutorials" begin
Expand All @@ -59,15 +62,16 @@ function create_tutorials(files)
mod = gensym(filename[j][2][2])
@testset "$(filename[j][2][2])" begin
@eval module $mod
include(joinpath($repo_src, $(filename[j][2][1]), $(filename[j][2][2])))
include(joinpath($repo_src, $(filename[j][2][1]),
$(filename[j][2][2])))
end
end
end
else # Single files
mod = gensym(title)
@testset "$title" begin
@eval module $mod
include(joinpath($repo_src, $filename))
include(joinpath($repo_src, $filename))
end
end
end
Expand All @@ -85,18 +89,20 @@ function create_tutorials(files)
end
return content
end
Literate.markdown(joinpath(repo_src, "index.jl"), pages_dir; name="introduction", preprocess=preprocess_introduction)
Literate.markdown(joinpath(repo_src, "index.jl"), pages_dir; name = "introduction",
preprocess = preprocess_introduction)
# Navigation system for makedocs
pages = Any["Introduction" => "tutorials/introduction.md",]
pages = Any["Introduction" => "tutorials/introduction.md"]

# Create markdown and notebook files for tutorials
for (i, (title, filename)) in enumerate(files)
# Several files of one topic are created separately and pushed to `pages` together.
if filename isa Vector
vector = []
for j in eachindex(filename)
create_files("$i.$j: $title: $(filename[j][1])", filename[j][2][2], repo_src,
pages_dir, notebooks_dir; folder=filename[j][2][1])
create_files("$i.$j: $title: $(filename[j][1])", filename[j][2][2],
repo_src,
pages_dir, notebooks_dir; folder = filename[j][2][1])

path = "$(filename[j][2][1])/$(splitext(filename[j][2][2])[1]).md"
push!(vector, "$i.$j $(filename[j][1])" => "tutorials/$path")
Expand Down
Loading

0 comments on commit a82608f

Please sign in to comment.