From 4c8b022d55cd10ade226a451897f73b291c08509 Mon Sep 17 00:00:00 2001 From: patrickersing Date: Fri, 27 Mar 2026 14:05:21 +0100 Subject: [PATCH 1/5] add downgrade workflow --- .github/workflows/downgrade.yml | 77 +++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/downgrade.yml diff --git a/.github/workflows/downgrade.yml b/.github/workflows/downgrade.yml new file mode 100644 index 00000000..a8c5de03 --- /dev/null +++ b/.github/workflows/downgrade.yml @@ -0,0 +1,77 @@ +name: Downgrade + +on: + push: + branches: + - main + paths-ignore: + - 'LICENSE.md' + - 'README.md' + - '.zenodo.json' + - '.github/workflows/CompatHelper.yml' + - '.github/workflows/TagBot.yml' + - 'docs/**' + pull_request: + paths-ignore: + - 'LICENSE.md' + - 'README.md' + - '.zenodo.json' + - '.github/workflows/CompatHelper.yml' + - '.github/workflows/TagBot.yml' + - 'docs/**' + workflow_dispatch: + +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + +# needed to allow julia-actions/cache to delete old caches that it has created +permissions: + actions: write + contents: read + +jobs: + downgrade_test: + if: "!contains(github.event.head_commit.message, 'skip ci')" + name: Downgrade - ${{ matrix.trixi_test }} - ${{ matrix.os }} - ${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.10' + os: + - ubuntu-latest + arch: + - x64 + trixi_test: + - upstream + steps: + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)' + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-downgrade-compat@v2 + with: + skip: LinearAlgebra,Printf,Test + projects: ., test + mode: forcedeps + # We run the tests manually instead of using julia-action/julia-builpkg and julia-action/julia-runtest or `Pkg.test` + # because otherwise the downgraded Manifest.toml is not used in the tests under julia Date: Fri, 27 Mar 2026 14:10:55 +0100 Subject: [PATCH 2/5] update compat bounds --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 443ef0f2..c9b7eaf0 100644 --- a/Project.toml +++ b/Project.toml @@ -17,7 +17,7 @@ LinearAlgebra = "1" MuladdMacro = "0.2.4" Printf = "1" Roots = "2.1.6" -Static = "1.1.1" -StaticArrays = "1.9" +Static = "1.2" +StaticArrays = "1.9.7" Trixi = "0.15" julia = "1.10" From 882b8a396dc0fe0bc0e950251dc490849971913d Mon Sep 17 00:00:00 2001 From: patrickersing Date: Fri, 27 Mar 2026 14:13:22 +0100 Subject: [PATCH 3/5] update compat bounds --- test/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Project.toml b/test/Project.toml index 18720df0..9d77c64f 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -17,5 +17,5 @@ Roots = "2.1.6" Symbolics = "7.14" Test = "1" Trixi = "0.15" -TrixiBottomTopography = "0.1" +TrixiBottomTopography = "0.1.1" TrixiTest = "0.2.1" From 90aa8113313ae04c7d2da7ad8a164fde56f9bc39 Mon Sep 17 00:00:00 2001 From: patrickersing Date: Fri, 27 Mar 2026 14:23:27 +0100 Subject: [PATCH 4/5] update compat bounds --- .github/copilot-instructions.md | 44 +++++++++++++++++++++++++++++++++ Project.toml | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000..0fc58f88 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,44 @@ +# Copilot instructions for Trixi.jl + +## Big picture architecture +- Trixi.jl is a **method-of-lines PDE framework**: elixirs define a spatial `semi` object, then `semidiscretize(semi, tspan)` creates an `ODEProblem` solved by SciML integrators. +- Simulation setup is **code-first**, not config-file-first. Primary user entrypoint is `trixi_include(...)` (re-exported from `TrixiBase`), typically used with files in `examples/`. +- The top-level assembly is in `src/Trixi.jl`; include order matters. Core domains are split into `src/equations/`, `src/meshes/`, `src/solvers/`, `src/semidiscretization/`, `src/time_integration/`, and callbacks. +- `SemidiscretizationHyperbolic(mesh, equations, ic, solver; ...)` is the central composition pattern. Keep features modular by dispatching on mesh/equation/solver combinations. +- Representative elixir structure: `examples/tree_2d_dgsem/elixir_advection_basic.jl`. + +## Mesh/solver boundaries you should respect +- Mesh implementations are separated in `src/meshes/meshes.jl` (Tree/Structured/Unstructured/P4est/T8code/DGMulti families). +- Solver entrypoints live in `src/solvers/solvers.jl` (`DGSEM`, `DGMulti`, parabolic solver includes). +- Prefer adding specialized methods for valid combinations instead of forcing broad generic support across all mesh types. +- Optional package features are implemented as Julia package extensions in `ext/` (e.g. `ext/TrixiCUDAExt.jl`, `ext/TrixiMakieExt.jl`). + +## Callbacks architecture +- Callback code is split into `src/callbacks_step/` and `src/callbacks_stage/`, with exports and ordering defined in `src/callbacks_step/callbacks.jl`. +- Step callbacks are typically `DiscreteCallback`/`PeriodicCallback` wrappers built from methods on callback types (see `SummaryCallback`, `AnalysisCallback`, `SaveSolutionCallback`, `StepsizeCallback`). +- Preserve callback ordering in `CallbackSet`: summary/analysis/alive/save first, then AMR, then `StepsizeCallback`, then physics-specific post-step updates. +- Interval checks should use accepted steps via `integrator.stats.naccept`; final-step behavior should use `isfinished(integrator)` from `src/callbacks_step/summary.jl`. +- `SaveSolutionCallback` has both `interval` and `dt` modes (the latter via `PeriodicCallback`); keep both paths consistent when extending output. +- Trixi has a separate stage-callback pipeline for `SimpleSSPRK33(stage_callbacks = (...))` in `src/time_integration/ssprk43.jl`; implement `init_callback`/`finalize_callback` in `src/time_integration/methods_SSP.jl` for new stage callback types. +- For output extensions, prefer overload hooks like `get_element_variables!` (used by `AMRCallback`) instead of hard-coding into save routines. +- Wire callbacks in elixirs as explicit variables plus `CallbackSet(...)` (see `examples/tree_2d_dgsem/elixir_advection_basic.jl`), and test via `@test_trixi_include` overrides in `test/test_trixi.jl` and callback-focused tests. + +## Developer workflows (project-specific) +- Recommended local dev loop is REPL + Revise: `julia --project=run`, then `using Revise, Trixi`. +- Run package tests via `Pkg.test("Trixi")`; CI shards tests using `TRIXI_TEST` in `test/runtests.jl`. +- For targeted local runs, include specific files such as `include("test/test_tree_2d_part1.jl")`. +- Threading/MPI behavior in tests is intentional; `test/runtests.jl` computes `TRIXI_NTHREADS` and `TRIXI_MPI_NPROCS` dynamically. +- Keep new example elixirs covered by tests (see `examples/README.md` and existing `@trixi_testset` usage in `test/test_threaded.jl`). + +## Coding and testing conventions to follow +- Formatting is enforced with JuliaFormatter (`.JuliaFormatter.toml`, SciML style, 4-space indent, max line length 92). +- Use provided formatter helper: `utils/trixi-format.jl` (or `utils/pre-commit` hook flow). +- Naming conventions are strict: `CamelCase` for types/modules, `snake_case` for functions/variables, mutating functions end with `!`. +- Internal argument-order pattern matters: backend first (if present), then generally `mesh, equations, solver, cache`; modified argument first for mutating APIs. +- Existing tests frequently use `@test_trixi_include` wrappers from `test/test_trixi.jl`; prefer this style for elixir-based regression tests. + +## Practical guidance for AI edits +- When adding physics/numerics, update the appropriate domain file (`equations`, `solvers`, or `semidiscretization`) and add at least one elixir-backed test in the matching `test/test_*.jl` shard. +- Preserve include organization and avoid moving files between subsystem directories unless required by design. +- Use discoverable examples from `examples/` as templates rather than inventing new setup patterns. +- If behavior is backend-specific (CUDA/MPI/weakdeps), gate it in extension files or existing backend dispatch paths instead of unconditional imports. diff --git a/Project.toml b/Project.toml index c9b7eaf0..d91199f4 100644 --- a/Project.toml +++ b/Project.toml @@ -18,6 +18,6 @@ MuladdMacro = "0.2.4" Printf = "1" Roots = "2.1.6" Static = "1.2" -StaticArrays = "1.9.7" +StaticArrays = "1.9.8" Trixi = "0.15" julia = "1.10" From ccdb86289ec88e7740c3f980d3b3ea79766aae81 Mon Sep 17 00:00:00 2001 From: patrickersing Date: Fri, 27 Mar 2026 14:50:08 +0100 Subject: [PATCH 5/5] remove instructions file --- .github/copilot-instructions.md | 44 --------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md deleted file mode 100644 index 0fc58f88..00000000 --- a/.github/copilot-instructions.md +++ /dev/null @@ -1,44 +0,0 @@ -# Copilot instructions for Trixi.jl - -## Big picture architecture -- Trixi.jl is a **method-of-lines PDE framework**: elixirs define a spatial `semi` object, then `semidiscretize(semi, tspan)` creates an `ODEProblem` solved by SciML integrators. -- Simulation setup is **code-first**, not config-file-first. Primary user entrypoint is `trixi_include(...)` (re-exported from `TrixiBase`), typically used with files in `examples/`. -- The top-level assembly is in `src/Trixi.jl`; include order matters. Core domains are split into `src/equations/`, `src/meshes/`, `src/solvers/`, `src/semidiscretization/`, `src/time_integration/`, and callbacks. -- `SemidiscretizationHyperbolic(mesh, equations, ic, solver; ...)` is the central composition pattern. Keep features modular by dispatching on mesh/equation/solver combinations. -- Representative elixir structure: `examples/tree_2d_dgsem/elixir_advection_basic.jl`. - -## Mesh/solver boundaries you should respect -- Mesh implementations are separated in `src/meshes/meshes.jl` (Tree/Structured/Unstructured/P4est/T8code/DGMulti families). -- Solver entrypoints live in `src/solvers/solvers.jl` (`DGSEM`, `DGMulti`, parabolic solver includes). -- Prefer adding specialized methods for valid combinations instead of forcing broad generic support across all mesh types. -- Optional package features are implemented as Julia package extensions in `ext/` (e.g. `ext/TrixiCUDAExt.jl`, `ext/TrixiMakieExt.jl`). - -## Callbacks architecture -- Callback code is split into `src/callbacks_step/` and `src/callbacks_stage/`, with exports and ordering defined in `src/callbacks_step/callbacks.jl`. -- Step callbacks are typically `DiscreteCallback`/`PeriodicCallback` wrappers built from methods on callback types (see `SummaryCallback`, `AnalysisCallback`, `SaveSolutionCallback`, `StepsizeCallback`). -- Preserve callback ordering in `CallbackSet`: summary/analysis/alive/save first, then AMR, then `StepsizeCallback`, then physics-specific post-step updates. -- Interval checks should use accepted steps via `integrator.stats.naccept`; final-step behavior should use `isfinished(integrator)` from `src/callbacks_step/summary.jl`. -- `SaveSolutionCallback` has both `interval` and `dt` modes (the latter via `PeriodicCallback`); keep both paths consistent when extending output. -- Trixi has a separate stage-callback pipeline for `SimpleSSPRK33(stage_callbacks = (...))` in `src/time_integration/ssprk43.jl`; implement `init_callback`/`finalize_callback` in `src/time_integration/methods_SSP.jl` for new stage callback types. -- For output extensions, prefer overload hooks like `get_element_variables!` (used by `AMRCallback`) instead of hard-coding into save routines. -- Wire callbacks in elixirs as explicit variables plus `CallbackSet(...)` (see `examples/tree_2d_dgsem/elixir_advection_basic.jl`), and test via `@test_trixi_include` overrides in `test/test_trixi.jl` and callback-focused tests. - -## Developer workflows (project-specific) -- Recommended local dev loop is REPL + Revise: `julia --project=run`, then `using Revise, Trixi`. -- Run package tests via `Pkg.test("Trixi")`; CI shards tests using `TRIXI_TEST` in `test/runtests.jl`. -- For targeted local runs, include specific files such as `include("test/test_tree_2d_part1.jl")`. -- Threading/MPI behavior in tests is intentional; `test/runtests.jl` computes `TRIXI_NTHREADS` and `TRIXI_MPI_NPROCS` dynamically. -- Keep new example elixirs covered by tests (see `examples/README.md` and existing `@trixi_testset` usage in `test/test_threaded.jl`). - -## Coding and testing conventions to follow -- Formatting is enforced with JuliaFormatter (`.JuliaFormatter.toml`, SciML style, 4-space indent, max line length 92). -- Use provided formatter helper: `utils/trixi-format.jl` (or `utils/pre-commit` hook flow). -- Naming conventions are strict: `CamelCase` for types/modules, `snake_case` for functions/variables, mutating functions end with `!`. -- Internal argument-order pattern matters: backend first (if present), then generally `mesh, equations, solver, cache`; modified argument first for mutating APIs. -- Existing tests frequently use `@test_trixi_include` wrappers from `test/test_trixi.jl`; prefer this style for elixir-based regression tests. - -## Practical guidance for AI edits -- When adding physics/numerics, update the appropriate domain file (`equations`, `solvers`, or `semidiscretization`) and add at least one elixir-backed test in the matching `test/test_*.jl` shard. -- Preserve include organization and avoid moving files between subsystem directories unless required by design. -- Use discoverable examples from `examples/` as templates rather than inventing new setup patterns. -- If behavior is backend-specific (CUDA/MPI/weakdeps), gate it in extension files or existing backend dispatch paths instead of unconditional imports.