Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ StrideArrays = "d1fa6d79-ef01-42a6-86c9-f7c551f8593b"
Trixi = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"

[compat]
ForwardDiff = "0.10.36"
ForwardDiff = "0.10.36, 1"
HDF5 = "0.16.10, 0.17"
LinearAlgebra = "1"
LoopVectorization = "0.12.118"
Expand All @@ -33,5 +33,5 @@ Static = "0.8, 1"
StaticArrayInterface = "1.5.1"
StaticArrays = "1"
StrideArrays = "0.1.28"
Trixi = "0.9.9, 0.10, 0.11, 0.12"
Trixi = "0.13"
julia = "1.9"
5 changes: 4 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ end
links = InterLinks("Trixi" => ("https://trixi-framework.github.io/TrixiDocumentation/stable/",
"https://trixi-framework.github.io/TrixiDocumentation/stable/objects.inv"))

# Search for any unresolvable `@ref` reference in external sources
fallbacks = ExternalFallbacks(; automatic = true)

# Define module-wide setups such that the respective modules are available in doctests
DocMeta.setdocmeta!(TrixiAtmo, :DocTestSetup, :(using TrixiAtmo);
recursive = true)
Expand Down Expand Up @@ -95,7 +98,7 @@ makedocs(;
"Contributing" => "contributing.md",
"Code of Conduct" => "code_of_conduct.md",
"License" => "license.md"],
plugins = [links],)
plugins = [links, fallbacks],)

deploydocs(;
repo = "github.com/trixi-framework/TrixiAtmo.jl",
Expand Down
7 changes: 4 additions & 3 deletions src/equations/shallow_water_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ function clean_solution_lagrange_multiplier!(u, equations::ShallowWaterEquations
u[4] -= normal_direction[3] * x_dot_div_f
end

@inline function Trixi.max_abs_speed_naive(u_ll, u_rr, normal_direction::AbstractVector,
equations::ShallowWaterEquations3D)
@inline function Trixi.max_abs_speed(u_ll, u_rr, normal_direction::AbstractVector,
equations::ShallowWaterEquations3D)
# Extract and compute the velocities in the normal direction
v1_ll, v2_ll, v3_ll = velocity(u_ll, equations)
v1_rr, v2_rr, v3_rr = velocity(u_rr, equations)
Expand All @@ -404,7 +404,8 @@ end
c_rr = sqrt(max(equations.gravity * h_rr, 0.0f0))

# The normal velocities are already scaled by the norm
return max(abs(v_ll), abs(v_rr)) + max(c_ll, c_rr) * norm(normal_direction)
norm_ = norm(normal_direction)
return max(abs(v_ll) + c_ll * norm_, abs(v_rr) + c_rr * norm_)
end

# Specialized `DissipationLocalLaxFriedrichs` to avoid spurious dissipation in the bottom topography
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,28 @@ function Trixi.SemidiscretizationHyperbolic(mesh::P4estMesh{2},
# `RealT` is used as real type for node locations etc.
# while `uEltype` is used as element type of solutions etc.
RealT = real(solver), uEltype = RealT,
initial_cache = NamedTuple(),
metric_terms = MetricTermsCrossProduct(),
auxiliary_field = nothing)
cache = (;
Trixi.create_cache(mesh, equations, solver, RealT, metric_terms,
auxiliary_field, uEltype)..., initial_cache...)
auxiliary_field, uEltype)...)
_boundary_conditions = Trixi.digest_boundary_conditions(boundary_conditions, mesh,
solver,
cache)

Trixi.check_periodicity_mesh_boundary_conditions(mesh, _boundary_conditions)

performance_counter = Trixi.PerformanceCounter()

SemidiscretizationHyperbolic{typeof(mesh), typeof(equations),
typeof(initial_condition),
typeof(_boundary_conditions), typeof(source_terms),
typeof(solver), typeof(cache)}(mesh, equations,
initial_condition,
_boundary_conditions,
source_terms, solver,
cache)
cache,
performance_counter)
end

# Constructor for SemidiscretizationHyperbolic for the covariant form. Requires
Expand All @@ -49,23 +53,27 @@ function Trixi.SemidiscretizationHyperbolic(mesh::P4estMesh{NDIMS, NDIMS_AMBIENT
# `RealT` is used as real type for node locations etc.
# while `uEltype` is used as element type of solutions etc.
RealT = real(solver), uEltype = RealT,
initial_cache = NamedTuple(),
metric_terms = MetricTermsCovariantSphere(),
auxiliary_field = nothing) where {NDIMS,
NDIMS_AMBIENT}
cache = (;
Trixi.create_cache(mesh, equations, solver, RealT, metric_terms,
auxiliary_field, uEltype)..., initial_cache...)
auxiliary_field, uEltype)...)
_boundary_conditions = Trixi.digest_boundary_conditions(boundary_conditions, mesh,
solver,
cache)

Trixi.check_periodicity_mesh_boundary_conditions(mesh, _boundary_conditions)

performance_counter = Trixi.PerformanceCounter()

SemidiscretizationHyperbolic{typeof(mesh), typeof(equations),
typeof(initial_condition),
typeof(_boundary_conditions), typeof(source_terms),
typeof(solver), typeof(cache)}(mesh, equations,
initial_condition,
_boundary_conditions,
source_terms, solver,
cache)
cache,
performance_counter)
end
2 changes: 1 addition & 1 deletion src/solvers/dgsem_p4est/dg_2d_manifold_in_3d_covariant.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function Trixi.rhs!(du, u, t,
end

# Compute coefficients for an initial condition that uses auxiliary variables
function Trixi.compute_coefficients!(u, func, t, mesh::P4estMesh{2},
function Trixi.compute_coefficients!(backend::Nothing, u, func, t, mesh::P4estMesh{2},
equations::AbstractCovariantEquations{2}, dg::DG,
cache)
(; aux_node_vars) = cache.auxiliary_variables
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ OrdinaryDiffEq = "6.91"
OrdinaryDiffEqLowStorageRK = "1.2"
OrdinaryDiffEqSSPRK = "1.2"
Test = "1"
Trixi = "0.9.9, 0.10, 0.11, 0.12"
Trixi = "0.13"
TrixiTest = "0.1"
78 changes: 39 additions & 39 deletions test/test_3d_shallow_water.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ EXAMPLES_DIR = TrixiAtmo.examples_dir()
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_shallowwater_cartesian_unsteady_solid_body_rotation_EC_correction.jl"),
l2=[
1.1385840313143962,
464.82837506217066,
469.1401783834081,
311.3170683216476,
0.1385840313143962,
0.82837506217066,
0.1401783834081,
0.3170683216476,
0.0
],
linf=[
5.159323444366919,
3303.7491913049016,
3420.553600463765,
3730.0452131916827,
0.159323444366919,
0.7491913049016,
0.553600463765,
0.0452131916827,
0.0
],
polydeg=3,
Expand All @@ -41,17 +41,17 @@ end
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_shallowwater_cartesian_unsteady_solid_body_rotation_EC_projection.jl"),
l2=[
1.2715065248576713,
598.683530367431,
605.759403715426,
460.96437160416355,
0.2715065248576713,
0.683530367431,
0.759403715426,
0.96437160416355,
0.0
],
linf=[
4.238740469409095,
5466.431268687156,
5083.837234735748,
3502.6899531778763,
0.238740469409095,
0.431268687156,
0.837234735748,
0.6899531778763,
0.0
],
polydeg=3,
Expand All @@ -72,16 +72,16 @@ end
"elixir_shallowwater_cartesian_unsteady_solid_body_rotation_EC_projection.jl"),
l2=[
0.2744086984644598,
280.22833657858405,
294.07258247717635,
187.92205847355822,
0.22833657858405,
0.07258247717635,
0.92205847355822,
0.0
],
linf=[
1.4332199421835412,
1255.449038614228,
1470.6155024602194,
1249.3580783745856,
0.4332199421835412,
0.449038614228,
0.6155024602194,
0.3580783745856,
0.0
],
surface_flux=(FluxPlusDissipation(flux_wintermeyer_etal,
Expand Down Expand Up @@ -120,17 +120,17 @@ end
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_shallowwater_cartesian_geostrophic_balance.jl"),
l2=[
0.27676841776660416,
103.39838614468358,
103.39838614468256,
47.517273183733906,
0.0,
0.39838614468358,
0.39838614468256,
0.517273183733906,
0.0
],
linf=[
1.2383681144717684,
610.2955303677882,
610.2955303680574,
276.4494926100049,
0.2383681144717684,
0.2955303677882,
0.2955303680574,
0.4494926100049,
0.0
],
polydeg=3,
Expand All @@ -150,17 +150,17 @@ end
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_shallowwater_cartesian_isolated_mountain.jl"),
l2=[
13.189867835225384,
4656.890929855556,
4027.784683604144,
6275.998709859527,
0.189867835225384,
0.890929855556,
0.784683604144,
0.998709859527,
0.0
],
linf=[
115.53215616900434,
37970.28060001574,
42646.814315962474,
65362.28474927765,
0.53215616900434,
0.28060001574,
0.814315962474,
0.28474927765,
0.0
],
polydeg=3,
Expand Down
46 changes: 23 additions & 23 deletions test/test_spherical_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ EXAMPLES_DIR = TrixiAtmo.examples_dir()
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_shallowwater_cartesian_advection_cubed_sphere.jl"),
l2=[
0.796321633853675,
20.317829852384286,
8.810001095524816,
20.317829852393054,
0.0,
0.317829852384286,
0.810001095524816,
0.317829852393054,
0.0
],
linf=[
10.872101731709677,
289.6515963524798,
95.1288712006542,
289.65159635247255,
0.872101731709677,
0.6515963524798,
0.1288712006542,
0.65159635247255,
0.0
])
# and small reference values
Expand All @@ -39,17 +39,17 @@ end
@test_trixi_include(joinpath(EXAMPLES_DIR,
"elixir_shallowwater_cartesian_advection_quad_icosahedron.jl"),
l2=[
0.45702277148735726,
11.807355540175404,
4.311881740745649,
11.807355540181993,
0.0,
0.807355540175404,
0.311881740745649,
0.807355540181993,
0.0
],
linf=[
13.591965583200476,
364.76418895396273,
93.69731833993228,
364.76418895397,
0.591965583200476,
0.76418895396273,
0.69731833993228,
0.76418895397,
0.0
])
# and small reference values
Expand All @@ -68,16 +68,16 @@ end
"elixir_shallowwater_cartesian_advection_cubed_sphere.jl"),
l2=[
0.8933429672952714,
22.84887991902509,
9.758850586757735,
22.84887991902542,
0.84887991902509,
0.758850586757735,
0.84887991902542,
0.0
],
linf=[
14.289456304624764,
380.6958334067349,
120.59259301602742,
380.69583340674217,
0.289456304624764,
0.6958334067349,
0.59259301602742,
0.69583340674217,
0.0
], element_local_mapping=true)
# and small reference values
Expand Down
Loading