Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flexibility to nonconservative BCs #2200

Merged
merged 44 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
e2e2c20
adding flexibility to noncons BCs
MarcoArtiano Dec 10, 2024
1e925fc
minor fix
MarcoArtiano Dec 10, 2024
31f1e0a
Dirichlet BC for noncons
MarcoArtiano Dec 10, 2024
eb1ccdd
formatting
MarcoArtiano Dec 10, 2024
e4bc181
Noncons Dirichlet BC
MarcoArtiano Dec 10, 2024
8c5d2fc
test_type.jl fix
MarcoArtiano Dec 10, 2024
c2b44ae
dg multi fix
MarcoArtiano Dec 10, 2024
b60eaf1
moving 0.5 factor internally
MarcoArtiano Jan 7, 2025
d7dce5e
Merge branch 'main' into noncons
MarcoArtiano Jan 8, 2025
840fa9e
Update src/solvers/dgsem_p4est/dg_2d.jl
MarcoArtiano Jan 8, 2025
2baa52a
Update src/equations/shallow_water_2d.jl
MarcoArtiano Jan 8, 2025
cd2186b
Update src/equations/shallow_water_2d.jl
MarcoArtiano Jan 8, 2025
7a326fe
Update src/equations/equations.jl
MarcoArtiano Jan 8, 2025
f9b19c3
Update examples/dgmulti_2d/elixir_mhd_reflective_wall.jl
MarcoArtiano Jan 8, 2025
c35cff9
Update src/equations/shallow_water_2d.jl
MarcoArtiano Jan 8, 2025
26a756a
Update src/equations/shallow_water_2d.jl
MarcoArtiano Jan 8, 2025
307197d
Update src/equations/shallow_water_2d.jl
MarcoArtiano Jan 8, 2025
8a1a3d5
Update src/equations/equations.jl
MarcoArtiano Jan 8, 2025
5068717
Update src/equations/equations.jl
MarcoArtiano Jan 8, 2025
06b881e
Update src/equations/equations.jl
MarcoArtiano Jan 8, 2025
4d112a4
Update src/equations/shallow_water_1d.jl
MarcoArtiano Jan 8, 2025
ecaf306
Update src/equations/shallow_water_1d.jl
MarcoArtiano Jan 8, 2025
1bd0184
Update src/equations/shallow_water_1d.jl
MarcoArtiano Jan 8, 2025
51505aa
minor fixes
MarcoArtiano Jan 8, 2025
d26925e
fix test type stability
MarcoArtiano Jan 8, 2025
9b4e384
fix test type stability
MarcoArtiano Jan 9, 2025
8332bbe
Update src/equations/shallow_water_1d.jl
MarcoArtiano Jan 24, 2025
53d8a14
Update src/equations/shallow_water_2d.jl
MarcoArtiano Jan 24, 2025
a9e3823
Update src/basic_types.jl
MarcoArtiano Feb 3, 2025
f27b8cf
Update src/basic_types.jl
MarcoArtiano Feb 3, 2025
05bff32
Update src/solvers/dgsem_p4est/dg_2d.jl
MarcoArtiano Feb 3, 2025
7f4ff1a
Update src/solvers/dgsem_unstructured/dg_2d.jl
MarcoArtiano Feb 3, 2025
8e5af14
Update src/solvers/dgsem_unstructured/dg_2d.jl
MarcoArtiano Feb 3, 2025
bf24011
Update src/basic_types.jl
MarcoArtiano Feb 3, 2025
cf31fe9
Merge branch 'main' of github.com:MarcoArtiano/Trixi.jl into noncons
MarcoArtiano Feb 3, 2025
6f80ffa
Merge branch 'noncons' of github.com:MarcoArtiano/Trixi.jl into noncons
MarcoArtiano Feb 3, 2025
dfe1116
formatting
MarcoArtiano Feb 3, 2025
d24578e
Update src/basic_types.jl
MarcoArtiano Feb 4, 2025
8a29ddc
Merge branch 'main' into noncons
ranocha Feb 7, 2025
0e09a32
Update test/test_type.jl
MarcoArtiano Feb 7, 2025
fe7803b
Update test/test_type.jl
MarcoArtiano Feb 7, 2025
d3225fc
Update src/equations/equations.jl
MarcoArtiano Feb 7, 2025
b538a1c
Update src/equations/equations.jl
MarcoArtiano Feb 7, 2025
c85aba7
add docs
MarcoArtiano Feb 7, 2025
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
Prev Previous commit
Next Next commit
minor fixes
  • Loading branch information
MarcoArtiano committed Jan 8, 2025
commit 51505aa396590f8ff54bc761a88b9e7f98085c2e
3 changes: 2 additions & 1 deletion examples/dgmulti_2d/elixir_mhd_reflective_wall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ function boundary_condition_velocity_slip_wall(u_inner, normal_direction::Abstra
v2 - 2 * v_normal * normal[2],
v3, p, B1, B2, B3, psi), equations)
flux = surface_flux_function(u_inner, u_mirror, normal, equations) * norm_
noncons_flux = nonconservative_flux_function(u_inner, u_mirror, normal, equations) * norm_
noncons_flux = nonconservative_flux_function(u_inner, u_mirror, normal, equations) *
norm_
return flux, noncons_flux
end

Expand Down
10 changes: 5 additions & 5 deletions src/equations/equations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,14 @@ end
flux = surface_flux_function(u_inner, u_boundary, orientation_or_normal,
equations)
noncons_flux = nonconservative_flux_function(u_inner, u_boundary,
orientation_or_normal,
equations)
orientation_or_normal,
equations)
else # u_boundary is "left" of boundary, u_inner is "right" of boundary
flux = surface_flux_function(u_boundary, u_inner, orientation_or_normal,
equations)
noncons_flux = nonconservative_flux_function(u_boundary, u_inner,
orientation_or_normal,
equations)
orientation_or_normal,
equations)
end

return flux, noncons_flux
Expand Down Expand Up @@ -241,7 +241,7 @@ end
# Calculate boundary flux
flux = surface_flux_function(u_inner, u_boundary, normal_direction, equations)
noncons_flux = nonconservative_flux_function(u_inner, u_boundary, normal_direction,
equations)
equations)
return flux, noncons_flux
end

Expand Down
8 changes: 4 additions & 4 deletions src/equations/shallow_water_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ For details see Section 9.2.5 of the book:
flux = surface_flux_function(u_inner, u_boundary, orientation_or_normal,
equations)
noncons_flux = nonconservative_flux_function(u_inner, u_boundary,
orientation_or_normal,
equations)
orientation_or_normal,
equations)
else # u_boundary is "left" of boundary, u_inner is "right" of boundary
flux = surface_flux_function(u_boundary, u_inner, orientation_or_normal,
equations)
noncons_flux = nonconservative_flux_function(u_boundary, u_inner,
orientation_or_normal,
equations)
orientation_or_normal,
equations)
end

return flux, noncons_flux
Expand Down
6 changes: 3 additions & 3 deletions src/equations/shallow_water_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ For details see Section 9.2.5 of the book:
# calculate the boundary flux
flux = surface_flux_function(u_inner, u_boundary, normal_direction, equations)
noncons_flux = nonconservative_flux_function(u_inner, u_boundary, normal_direction,
equations)
equations)

return flux, noncons_flux
end
Expand Down Expand Up @@ -227,11 +227,11 @@ Should be used together with [`TreeMesh`](@ref).
if iseven(direction) # u_inner is "left" of boundary, u_boundary is "right" of boundary
flux = surface_flux_function(u_inner, u_boundary, orientation, equations)
noncons_flux = nonconservative_flux_function(u_inner, u_boundary, orientation,
equations)
equations)
else # u_boundary is "left" of boundary, u_inner is "right" of boundary
flux = surface_flux_function(u_boundary, u_inner, orientation, equations)
noncons_flux = nonconservative_flux_function(u_boundary, u_inner, orientation,
equations)
equations)
end

return flux, noncons_flux
Expand Down
6 changes: 3 additions & 3 deletions src/solvers/dgsem_p4est/dg_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -364,16 +364,16 @@ end
# Call pointwise numerical flux function for the conservative part
# in the normal direction on the boundary
MarcoArtiano marked this conversation as resolved.
Show resolved Hide resolved
flux, noncons_flux = boundary_condition(u_inner, normal_direction, x, t,
surface_integral.surface_flux, equations)
surface_integral.surface_flux, equations)

# Copy flux to element storage in the correct orientation
for v in eachvariable(equations)
DanielDoehring marked this conversation as resolved.
Show resolved Hide resolved
# Note the factor 0.5 necessary for the nonconservative fluxes based on
# the interpretation of global SBP operators coupled discontinuously via
# central fluxes/SATs
ranocha marked this conversation as resolved.
Show resolved Hide resolved
surface_flux_values[v, node_index, direction_index, element_index] = flux_[v] +
surface_flux_values[v, node_index, direction_index, element_index] = flux[v] +
0.5f0 *
noncons_[v]
noncons_flux[v]
end
end

Expand Down
Loading