Skip to content

Commit

Permalink
Similarize Structured1D to Tree1D
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring committed Nov 8, 2024
1 parent 9fa4e27 commit 6cd6caa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
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 constructor 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

0 comments on commit 6cd6caa

Please sign in to comment.