Skip to content

Commit

Permalink
Merge branch 'subcell-limiting' into subcell-limiting-@batch-reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Mar 25, 2024
2 parents bcaad2b + 0085033 commit 1cc21ce
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 81 deletions.
9 changes: 6 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Contributing

Trixi.jl is an open-source project and we are very happy to accept contributions
from the community. Please feel free to open issues or submit patches (preferably
as pull requests) any time. For planned larger contributions, it is often
beneficial to get in contact with one of the principal developers first (see
from the community. Please feel free to
[open issues](https://github.com/trixi-framework/Trixi.jl/issues/new/choose)
or submit patches (preferably as
[pull requests](https://github.com/trixi-framework/Trixi.jl/pulls))
any time. For planned larger contributions, it is often beneficial to get
in contact with one of the principal developers first (see
[AUTHORS.md](AUTHORS.md)).

Trixi.jl and its contributions are licensed under the MIT license (see
Expand Down
4 changes: 1 addition & 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.7.4-pre"
version = "0.7.5-pre"

[deps]
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
Expand Down Expand Up @@ -31,7 +31,6 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
SimpleUnPack = "ce78b400-467f-4804-87d8-8f486da07d0a"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StartUpDG = "472ebc20-7c99-4d4b-9470-8fde4e9faa0f"
Expand Down Expand Up @@ -84,7 +83,6 @@ RecipesBase = "1.1"
Reexport = "1.0"
Requires = "1.1"
SciMLBase = "1.90, 2"
Setfield = "1"
SimpleUnPack = "1.1"
SparseArrays = "1"
StartUpDG = "0.17.7"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3996439.svg)](https://doi.org/10.5281/zenodo.3996439)
[![Downloads](https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/Trixi)](https://pkgs.genieframework.com?packages=Trixi)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8695/badge)](https://www.bestpractices.dev/projects/8695)
<!-- [![Downloads](https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/Trixi)](https://pkgs.genieframework.com?packages=Trixi) -->
<!-- [![GitHub commits since tagged version](https://img.shields.io/github/commits-since/trixi-framework/Trixi.jl/v0.3.43.svg?style=social&logo=github)](https://github.com/trixi-framework/Trixi.jl) -->
<!-- [![PkgEval](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/T/Trixi.svg)](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html) -->

Expand Down
30 changes: 30 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Security Policy

The Trixi.jl development team takes security issues seriously. We appreciate
all efforts to responsibly disclose any security issues and will make every
effort to acknowledge contributions.


## Supported Versions

The current stable release following the interpretation of
[semantic versioning (SemVer)](https://julialang.github.io/Pkg.jl/dev/compatibility/#Version-specifier-format-1)
used in the Julia ecosystem is supported with security updates.


## Reporting a Vulnerability

To report a security issue, please use the GitHub Security Advisory
["Report a Vulnerability"](https://github.com/trixi-framework/Trixi.jl/security/advisories/new)
tab.

We will send a response indicating the next steps in handling your report.
After the initial reply to your report, we will keep you informed of the
progress towards a fix and full announcement, and may ask for additional
information or guidance.

Please report security bugs in third-party modules directly to the person
or team maintaining the module.

Public notifications of vulnerabilities will be shared in community channels
such as Slack.
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
src/code_of_conduct.md
src/contributing.md

43 changes: 30 additions & 13 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,36 @@ DocMeta.setdocmeta!(Trixi2Vtk, :DocTestSetup, :(using Trixi2Vtk); recursive=true
# as necessary
# Based on: https://github.com/ranocha/SummationByPartsOperators.jl/blob/0206a74140d5c6eb9921ca5021cb7bf2da1a306d/docs/make.jl#L27-L41
open(joinpath(@__DIR__, "src", "code_of_conduct.md"), "w") do io
# Point to source license file
println(io, """
```@meta
EditURL = "https://github.com/trixi-framework/Trixi.jl/blob/main/CODE_OF_CONDUCT.md"
```
""")
# Write the modified contents
println(io, "# [Code of Conduct](@id code-of-conduct)")
println(io, "")
for line in eachline(joinpath(dirname(@__DIR__), "CODE_OF_CONDUCT.md"))
line = replace(line, "[AUTHORS.md](AUTHORS.md)" => "[Authors](@ref)")
println(io, "> ", line)
end
# Point to source license file
println(io,
"""
```@meta
EditURL = "https://github.com/trixi-framework/Trixi.jl/blob/main/CODE_OF_CONDUCT.md"
```
""")
# Write the modified contents
println(io, "# [Code of Conduct](@id code-of-conduct)")
println(io, "")
for line in eachline(joinpath(dirname(@__DIR__), "CODE_OF_CONDUCT.md"))
line = replace(line, "[AUTHORS.md](AUTHORS.md)" => "[Authors](@ref)")
println(io, "> ", line)
end
end

open(joinpath(@__DIR__, "src", "contributing.md"), "w") do io
# Point to source license file
println(io,
"""
```@meta
EditURL = "https://github.com/trixi-framework/Trixi.jl/blob/main/CONTRIBUTING.md"
```
""")
# Write the modified contents
for line in eachline(joinpath(dirname(@__DIR__), "CONTRIBUTING.md"))
line = replace(line, "[LICENSE.md](LICENSE.md)" => "[License](@ref)")
line = replace(line, "[AUTHORS.md](AUTHORS.md)" => "[Authors](@ref)")
println(io, line)
end
end

# Create tutorials for the following files:
Expand Down
54 changes: 0 additions & 54 deletions docs/src/contributing.md

This file was deleted.

13 changes: 6 additions & 7 deletions src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ using LinearAlgebra: LinearAlgebra, Diagonal, diag, dot, mul!, norm, cross, norm
UniformScaling, det
using Printf: @printf, @sprintf, println
using SparseArrays: AbstractSparseMatrix, AbstractSparseMatrixCSC, sparse, droptol!,
rowvals, nzrange, nonzeros, spzeros
rowvals, nzrange, nonzeros

# import @reexport now to make it available for further imports/exports
using Reexport: @reexport
Expand All @@ -32,10 +32,10 @@ using Reexport: @reexport
using MPI: MPI

using SciMLBase: CallbackSet, DiscreteCallback,
ODEProblem, ODESolution, ODEFunction,
ODEProblem, ODESolution,
SplitODEProblem
import SciMLBase: get_du, get_tmp_cache, u_modified!,
AbstractODEIntegrator, init, step!, check_error,
init, step!, check_error,
get_proposed_dt, set_proposed_dt!,
terminate!, remake, add_tstop!, has_tstop, first_tstop

Expand All @@ -57,7 +57,6 @@ using Polyester: Polyester, @batch # You know, the cheapest threads you can find
using OffsetArrays: OffsetArray, OffsetVector
using P4est
using T8code
using Setfield: @set
using RecipesBase: RecipesBase
using Requires: @require
using Static: Static, One, True, False
Expand All @@ -66,7 +65,7 @@ using StaticArrays: StaticArrays, MVector, MArray, SMatrix, @SMatrix
using StrideArrays: PtrArray, StrideArray, StaticInt
@reexport using StructArrays: StructArrays, StructArray
using TimerOutputs: TimerOutputs, @notimeit, TimerOutput, print_timer, reset_timer!
using Triangulate: Triangulate, TriangulateIO, triangulate
using Triangulate: Triangulate, TriangulateIO
export TriangulateIO # for type parameter in DGMultiMesh
using TriplotBase: TriplotBase
using TriplotRecipes: DGTriPseudocolor
Expand All @@ -84,9 +83,9 @@ const _PREFERENCE_LOG = @load_preference("log", "log_Trixi_NaN")

# finite difference SBP operators
using SummationByPartsOperators: AbstractDerivativeOperator,
AbstractNonperiodicDerivativeOperator, DerivativeOperator,
AbstractNonperiodicDerivativeOperator,
AbstractPeriodicDerivativeOperator,
PeriodicDerivativeOperator, grid
grid
import SummationByPartsOperators: integrate, semidiscretize,
compute_coefficients, compute_coefficients!,
left_boundary_weight, right_boundary_weight
Expand Down
2 changes: 2 additions & 0 deletions src/auxiliary/auxiliary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ macro threaded(expr)
# !!! danger "Heisenbug"
# Look at the comments for `wrap_array` when considering to change this macro.

# By using `Trixi.@batch` we allow users of Trixi.jl to use `@threaded` without having
# Polyester.jl in their namespace.
return esc(quote
Trixi.@batch $(expr)
end)
Expand Down
2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
FFMPEG = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -16,6 +17,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Aqua = "0.8"
CairoMakie = "0.10"
Downloads = "1"
ExplicitImports = "1.0.1"
FFMPEG = "0.4"
ForwardDiff = "0.10.24"
LinearAlgebra = "1"
Expand Down
9 changes: 9 additions & 0 deletions test/test_aqua.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module TestAqua

using Aqua
using ExplicitImports: check_no_implicit_imports, check_no_stale_explicit_imports
using Test
using Trixi

Expand All @@ -13,6 +14,14 @@ include("test_trixi.jl")
# in src/solvers/dgmulti/sbp.jl
piracies = (treat_as_own = [Trixi.StartUpDG.RefElemData,
Trixi.StartUpDG.MeshData],))
@test isnothing(check_no_implicit_imports(Trixi,
skip = (Core, Base, Trixi.P4est, Trixi.T8code,
Trixi.EllipsisNotation)))
@test isnothing(check_no_stale_explicit_imports(Trixi,
ignore = (:derivative_operator,
:periodic_derivative_operator,
:upwind_operators,
Symbol("@batch"))))
end

end #module

0 comments on commit 1cc21ce

Please sign in to comment.