diff --git a/NEWS.md b/NEWS.md index d6020d5f..7fb9dea9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,25 @@ StartUpDG.jl follows the interpretation of [semantic versioning (semver)](https://julialang.github.io/Pkg.jl/dev/compatibility/#Version-specifier-format-1) used in the Julia ecosystem. Recent changes will be documented in this file for human readability. +## Changes when updating to v1.0.0 + +Most of the major changes are tracked in this [PR](https://github.com/jlchan/StartUpDG.jl/pull/160). Some descriptions of other changes are listed below. + +#### Added + +* Generation of cut-cell meshes using `Subtriangulation` quadrature by default, which ensures positive quadrature weights. The old behavior is retained by specifying a `MomentFitting` quadrature type. + +#### Changed + +* `NamedArrayPartition` was moved to RecursiveArrayTools.jl. +* The required Julia version was increased to v1.10. This was to make StartUpDG.jl compatibility with RecursiveArrayTools.jl (see above). +* Removed SimpleUnpack.jl as a dependency. Loading StartUpDG.jl will no longer reexport `@unpack`, since destructuring via `(; propertyname) = x` is supported natively in Julia 1.7 and up. +* Updated to NodesAndModes v1.0+, which changed the ordering of triangle nodes to make them consistent with tet node ordering. +* We introduced a `MultidimensionalQuadrature` type. All `Polynomial` approximation types now utilize either `MultidimensionalQuadrature` or `TensorProductQuadrature` as a type parameter. The previous type parameter `DefaultPolynomialType` is now simply used to determine the default quadrature type parameter. Note that this is internal behavior and should not impact standard usage of StartUpDG.jl. +* Removed Requires.jl in favor of [package extensions](https://pkgdocs.julialang.org/v1/creating-packages/#Conditional-loading-of-code-in-packages-(Extensions)) for Plots.jl and SummationByPartsOperators.jl dependencies. + + + ## Changes when updating to v0.17 #### Added diff --git a/Project.toml b/Project.toml index ae79fdde..8047a7bd 100644 --- a/Project.toml +++ b/Project.toml @@ -15,19 +15,19 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" Reexport = "189a3867-3050-52da-a836-e630ba90ab69" -Requires = "ae029012-a4dd-5104-9daa-d747884805df" Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46" -SimpleUnPack = "ce78b400-467f-4804-87d8-8f486da07d0a" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Triangulate = "f7e6ffb2-c36d-4f8f-a77e-16e897189344" WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192" [weakdeps] +Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" SummationByPartsOperators = "9f78cca6-572e-554e-b819-917d2f1cf240" [extensions] StartUpDGSummationByPartsOperatorsExt = "SummationByPartsOperators" +TriangulatePlotsExt = "Plots" [compat] ConstructionBase = "1" @@ -39,15 +39,10 @@ PathIntersections = "0.1, 0.2" RecipesBase = "1" RecursiveArrayTools = "3" Reexport = "1" -Requires = "1" Setfield = "1" -SimpleUnPack = "1" SparseArrays = "1" StaticArrays = "1" -SummationByPartsOperators = "0.5.52" +SummationByPartsOperators = "0.5" Triangulate = "2" WriteVTK = "1" -julia = "1.10" - -[extras] -SummationByPartsOperators = "9f78cca6-572e-554e-b819-917d2f1cf240" +julia = "1.10" \ No newline at end of file diff --git a/ext/StartUpDGSummationByPartsOperatorsExt.jl b/ext/StartUpDGSummationByPartsOperatorsExt.jl index e036cda8..f0db42c2 100644 --- a/ext/StartUpDGSummationByPartsOperatorsExt.jl +++ b/ext/StartUpDGSummationByPartsOperatorsExt.jl @@ -6,26 +6,14 @@ using SparseArrays: sparse, droptol!, spzeros using StartUpDG # Required for visualization code -if isdefined(Base, :get_extension) - using SummationByPartsOperators: - SummationByPartsOperators, - DerivativeOperator, - grid, - AbstractDerivativeOperator, - AbstractNonperiodicDerivativeOperator, - PeriodicDerivativeOperator, - AbstractPeriodicDerivativeOperator -else - # Until Julia v1.9 is the minimum required version for Trixi.jl, we still support Requires.jl - using ..SummationByPartsOperators - using ..SummationByPartsOperators: - AbstractDerivativeOperator, - AbstractPeriodicDerivativeOperator, - AbstractNonperiodicDerivativeOperator, - DerivativeOperator, - PeriodicDerivativeOperator, - grid -end +using SummationByPartsOperators: + SummationByPartsOperators, + DerivativeOperator, + grid, + AbstractDerivativeOperator, + AbstractNonperiodicDerivativeOperator, + PeriodicDerivativeOperator, + AbstractPeriodicDerivativeOperator function construct_1d_operators(D::AbstractDerivativeOperator, tol) nodes_1d = collect(grid(D)) diff --git a/src/TriangulatePlots.jl b/ext/TriangulatePlotsExt.jl similarity index 96% rename from src/TriangulatePlots.jl rename to ext/TriangulatePlotsExt.jl index 1fcc6669..7c44d4b9 100644 --- a/src/TriangulatePlots.jl +++ b/ext/TriangulatePlotsExt.jl @@ -1,8 +1,8 @@ -module TriangulatePlots +module TriangulatePlotsExt using StartUpDG: BoundaryTagPlotter, RecipesBase -using ..Plots: Plots +using Plots: Plots RecipesBase.@recipe function f(m::BoundaryTagPlotter) triout = m.triout diff --git a/src/StartUpDG.jl b/src/StartUpDG.jl index 544737a4..0ed77702 100644 --- a/src/StartUpDG.jl +++ b/src/StartUpDG.jl @@ -17,8 +17,7 @@ using RecipesBase: RecipesBase @reexport using RecursiveArrayTools: NamedArrayPartition using StaticArrays: SVector, SMatrix using Setfield: setproperties, @set # for "modifying" structs (setproperties) -@reexport using SimpleUnPack: @unpack -using SparseArrays: sparse, droptol!, blockdiag, nnz +using SparseArrays: sparse, droptol!, blockdiag using Triangulate: Triangulate, TriangulateIO, triangulate @reexport using WriteVTK @@ -107,20 +106,4 @@ export CircularDomain, PartialCircularDomain include("explicit_timestep_utils.jl") export ck45 # LSERK 45 - -using Requires: @require - -function __init__() - @require Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" begin - include("TriangulatePlots.jl") - end - - # Until Julia v1.9 is the minimum required version for StartUpDG.jl, we still support Requires.jl - @static if !isdefined(Base, :get_extension) - @require SummationByPartsOperators = "9f78cca6-572e-554e-b819-917d2f1cf240" begin - include("../ext/StartUpDGSummationByPartsOperatorsExt.jl") - end - end -end - end # module diff --git a/src/mesh/gmsh_utilities.jl b/src/mesh/gmsh_utilities.jl index 51a471ea..936b2668 100644 --- a/src/mesh/gmsh_utilities.jl +++ b/src/mesh/gmsh_utilities.jl @@ -103,7 +103,7 @@ Notes: the version 4 format has a more detailed block data format this leads to more complicated parser. """ function read_Gmsh_2D_v4(filename::String, options::MeshImportOptions) - @unpack grouping, remap_group_name = options + (; grouping, remap_group_name) = options if !isfile(filename) throw(ArgumentError("file $filename does not exist")) diff --git a/test/Project.toml b/test/Project.toml index 45d66fa4..b65cc55d 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -13,5 +13,5 @@ HOHQMesh = "0.2" Plots = "1" StaticArrays = "1" StructArrays = "0.6" -SummationByPartsOperators = "0.5.52" +SummationByPartsOperators = "0.5" Suppressor = "0.2" diff --git a/test/reference_elem_tests.jl b/test/reference_elem_tests.jl index fff8e35e..46f7a419 100644 --- a/test/reference_elem_tests.jl +++ b/test/reference_elem_tests.jl @@ -273,7 +273,7 @@ inverse_trace_constant_compare(rd::RefElemData{3, <:Wedge, <:TensorProductWedge} @test abs(sum(rd.wf .* rd.nsJ)) < tol @test abs(sum(rd.wf .* rd.ntJ)) < tol - @unpack node_ids_by_face = rd.element_type + (; node_ids_by_face) = rd.element_type @test sum(rd.wf[node_ids_by_face[1]]) ≈ 4 # Note: this is not the true area of face 2. Because we map # all faces back to the reference face, there is a factor of