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

Similiarize Structured1D to Tree1D #2153

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ equations = TrafficFlowLWREquations1D()

solver = DGSEM(polydeg = 3, surface_flux = FluxHLL(min_max_speed_davis))

coordinates_min = (-1.0,) # minimum coordinate
coordinates_max = (1.0,) # maximum coordinate
coordinates_min = -1.0 # minimum coordinate
coordinates_max = 1.0 # maximum coordinate
cells_per_dimension = (64,)

mesh = StructuredMesh(cells_per_dimension, coordinates_min, coordinates_max,
Expand Down
5 changes: 5 additions & 0 deletions src/meshes/structured_mesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ end
function coordinates2mapping(coordinates_min::NTuple{1}, coordinates_max::NTuple{1})
mapping(xi) = linear_interpolate(xi, coordinates_min[1], coordinates_max[1])
end
# Convenience function for 1D: Do not insist on tuples
function coordinates2mapping(coordinates_min::RealT,
coordinates_max::RealT) where {RealT <: Real}
mapping(xi) = linear_interpolate(xi, coordinates_min, coordinates_max)
end

function coordinates2mapping(coordinates_min::NTuple{2}, coordinates_max::NTuple{2})
function mapping(xi, eta)
Expand Down
Loading