Skip to content

Commit

Permalink
Applied autoformatter on smview elixir.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCan committed Nov 9, 2023
1 parent 4a3062f commit c555b18
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions examples/structured_2d_dgsem/elixir_advection_smview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ advection_velocity = (0.2, -0.7)
equations = LinearScalarAdvectionEquation2D(advection_velocity)

# Create DG solver with polynomial degree = 2 and (local) Lax-Friedrichs/Rusanov flux as surface flux
solver = DGSEM(polydeg=2, surface_flux=flux_lax_friedrichs)
solver = DGSEM(polydeg = 2, surface_flux = flux_lax_friedrichs)

coordinates_min = ( -1.0, -1.0) # maximum coordinates (max(x), max(y))
coordinates_max = ( 1.0, 1.0) # maximum coordinates (max(x), max(y))
coordinates_min = (-1.0, -1.0) # maximum coordinates (max(x), max(y))
coordinates_max = (1.0, 1.0) # maximum coordinates (max(x), max(y))

cells_per_dimension = (16, 16)
# cells_per_dimension = (32, 16)
Expand All @@ -29,30 +29,31 @@ mesh1 = StructuredMeshView(parent; index_min = (1, 1), index_max = (8, 16))
mesh2 = StructuredMeshView(parent; index_min = (9, 1), index_max = (16, 16))

# Define the coupled boundary conditions
boundary_conditions1=(
# Connect left boundary with right boundary of left mesh
x_neg=boundary_condition_periodic,
x_pos=boundary_condition_periodic,
# x_pos=BoundaryConditionCoupled(2, (:begin, :i_forward), Float64),
y_neg=boundary_condition_periodic,
y_pos=boundary_condition_periodic)
boundary_conditions2=(
# Connect left boundary with right boundary of left mesh
# x_neg=BoundaryConditionCoupled(1, (:end, :i_forward), Float64),
x_neg=boundary_condition_periodic,
x_pos=boundary_condition_periodic,
y_neg=boundary_condition_periodic,
y_pos=boundary_condition_periodic)
boundary_conditions1 = (
# Connect left boundary with right boundary of left mesh
x_neg = boundary_condition_periodic,
x_pos = boundary_condition_periodic,
# x_pos=BoundaryConditionCoupled(2, (:begin, :i_forward), Float64),
y_neg = boundary_condition_periodic,
y_pos = boundary_condition_periodic)
boundary_conditions2 = (
# Connect left boundary with right boundary of left mesh
# x_neg=BoundaryConditionCoupled(1, (:end, :i_forward), Float64),
x_neg = boundary_condition_periodic,
x_pos = boundary_condition_periodic,
y_neg = boundary_condition_periodic,
y_pos = boundary_condition_periodic)

# A semidiscretization collects data structures and functions for the spatial discretization
# semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition_convergence_test, solver)
semi1 = SemidiscretizationHyperbolic(mesh1, equations, initial_condition_convergence_test, solver,
boundary_conditions=boundary_conditions1)
semi2 = SemidiscretizationHyperbolic(mesh2, equations, initial_condition_convergence_test, solver,
boundary_conditions=boundary_conditions2)
semi1 = SemidiscretizationHyperbolic(mesh1, equations, initial_condition_convergence_test,
solver,
boundary_conditions = boundary_conditions1)
semi2 = SemidiscretizationHyperbolic(mesh2, equations, initial_condition_convergence_test,
solver,
boundary_conditions = boundary_conditions2)
semi = SemidiscretizationCoupled(semi1, semi2)


###############################################################################
# ODE solvers, callbacks etc.

Expand All @@ -77,14 +78,13 @@ summary_callback = SummaryCallback()
# callbacks = CallbackSet(summary_callback, analysis_callback, save_solution, stepsize_callback)
callbacks = CallbackSet(summary_callback)


###############################################################################
# run the simulation

# OrdinaryDiffEq's `solve` method evolves the solution in time and executes the passed callbacks
sol = solve(ode, CarpenterKennedy2N54(williamson_condition=false),
dt=5.0e-2, # solve needs some value here but it will be overwritten by the stepsize_callback
save_everystep=false, callback=callbacks);
sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false),
dt = 5.0e-2, # solve needs some value here but it will be overwritten by the stepsize_callback
save_everystep = false, callback = callbacks);

errors_ref = (l2 = [8.312427642603623e-6], linf = [6.626865824577166e-5])

Expand Down

0 comments on commit c555b18

Please sign in to comment.