Skip to content

Commit

Permalink
Merge branch 'dev' into jc/add_subcell_ops
Browse files Browse the repository at this point in the history
  • Loading branch information
jlchan committed May 21, 2024
2 parents 018bd2b + dc531b4 commit 2d15b07
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 52 deletions.
19 changes: 19 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 4 additions & 9 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
28 changes: 8 additions & 20 deletions ext/StartUpDGSummationByPartsOperatorsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions src/TriangulatePlots.jl → ext/TriangulatePlotsExt.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
19 changes: 1 addition & 18 deletions src/StartUpDG.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/mesh/gmsh_utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ HOHQMesh = "0.2"
Plots = "1"
StaticArrays = "1"
StructArrays = "0.6"
SummationByPartsOperators = "0.5.52"
SummationByPartsOperators = "0.5"
Suppressor = "0.2"
2 changes: 1 addition & 1 deletion test/reference_elem_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d15b07

Please sign in to comment.