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

Update JuliaFormatter to the latest version #2071

Merged
merged 3 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# TODO: Change the call below to
# format(".")
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"))'
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.60"))'
JoshuaLampert marked this conversation as resolved.
Show resolved Hide resolved
efaulhaber marked this conversation as resolved.
Show resolved Hide resolved
julia -e 'using JuliaFormatter; format(["benchmark", "examples", "ext", "src", "test", "utils"])'
- name: Format check
run: |
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks_step/alive.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function Base.show(io::IO, ::MIME"text/plain",
alive_callback = cb.affect!

setup = [
"interval" => alive_callback.alive_interval,
"interval" => alive_callback.alive_interval
]
summary_box(io, "AliveCallback", setup)
end
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks_step/averaging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function Base.show(io::IO, ::MIME"text/plain",

setup = [
"Start time" => first(averaging_callback.tspan),
"Final time" => last(averaging_callback.tspan),
"Final time" => last(averaging_callback.tspan)
]
summary_box(io, "AveragingCallback", setup)
end
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks_step/glm_speed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function Base.show(io::IO, ::MIME"text/plain",
setup = [
"GLM wave speed scaling" => glm_speed_callback.glm_scale,
"Expected CFL number" => glm_speed_callback.cfl,
"Selected semidiscretizations" => glm_speed_callback.semi_indices,
"Selected semidiscretizations" => glm_speed_callback.semi_indices
]
summary_box(io, "GlmSpeedCallback", setup)
end
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks_step/save_restart.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"interval" => save_restart_callback.interval,
"save final solution" => save_restart_callback.save_final_restart ? "yes" :
"no",
"output directory" => abspath(normpath(save_restart_callback.output_directory)),
"output directory" => abspath(normpath(save_restart_callback.output_directory))
]
summary_box(io, "SaveRestartCallback", setup)
end
Expand Down
4 changes: 2 additions & 2 deletions src/callbacks_step/save_solution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"yes" : "no",
"save final solution" => save_solution_callback.save_final_solution ?
"yes" : "no",
"output directory" => abspath(normpath(save_solution_callback.output_directory)),
"output directory" => abspath(normpath(save_solution_callback.output_directory))
]
summary_box(io, "SaveSolutionCallback", setup)
end
Expand All @@ -85,7 +85,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"yes" : "no",
"save final solution" => save_solution_callback.save_final_solution ?
"yes" : "no",
"output directory" => abspath(normpath(save_solution_callback.output_directory)),
"output directory" => abspath(normpath(save_solution_callback.output_directory))
]
summary_box(io, "SaveSolutionCallback", setup)
end
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks_step/steady_state.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Base.show(io::IO, ::MIME"text/plain",

setup = [
"absolute tolerance" => steady_state_callback.abstol,
"relative tolerance" => steady_state_callback.reltol,
"relative tolerance" => steady_state_callback.reltol
]
summary_box(io, "SteadyStateCallback", setup)
end
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks_step/stepsize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function Base.show(io::IO, ::MIME"text/plain",
stepsize_callback = cb.affect!

setup = [
"CFL number" => stepsize_callback.cfl_number,
"CFL number" => stepsize_callback.cfl_number
]
summary_box(io, "StepsizeCallback", setup)
end
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks_step/time_series.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"interval" => time_series_callback.interval,
"solution_variables" => time_series_callback.solution_variables,
"output_directory" => time_series_callback.output_directory,
"filename" => time_series_callback.filename,
"filename" => time_series_callback.filename
]
summary_box(io, "TimeSeriesCallback", setup)
end
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks_step/visualization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"variable names" => visualization_callback.variable_names,
"show mesh" => visualization_callback.show_mesh,
"plot creator" => visualization_callback.plot_creator,
"plot data creator" => visualization_callback.plot_data_creator,
"plot data creator" => visualization_callback.plot_data_creator
]
summary_box(io, "VisualizationCallback", setup)
end
Expand Down
2 changes: 1 addition & 1 deletion src/meshes/p4est_mesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function Base.show(io::IO, ::MIME"text/plain", mesh::P4estMesh)
setup = [
"#trees" => ntrees(mesh),
"current #cells" => ncellsglobal(mesh),
"polydeg" => length(mesh.nodes) - 1,
"polydeg" => length(mesh.nodes) - 1
]
summary_box(io,
"P4estMesh{" * string(ndims(mesh)) * ", " * string(real(mesh)) *
Expand Down
10 changes: 5 additions & 5 deletions src/meshes/t8code_mesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function Base.show(io::IO, ::MIME"text/plain", mesh::T8codeMesh)
setup = [
"#trees" => ntrees(mesh),
"current #cells" => ncellsglobal(mesh),
"polydeg" => length(mesh.nodes) - 1,
"polydeg" => length(mesh.nodes) - 1
]
summary_box(io,
"T8codeMesh{" * string(ndims(mesh)) * ", " * string(real(mesh)) * "}",
Expand Down Expand Up @@ -982,7 +982,7 @@ function fill_mesh_info!(mesh::T8codeMesh, interfaces, mortars, boundaries,
[1, 2, 0, 0, 3, 4, 0, 0], # 2
[0, 0, 1, 2, 0, 0, 3, 4], # 3
[1, 2, 3, 4, 0, 0, 0, 0], # 4
[0, 0, 0, 0, 1, 2, 3, 4], # 5
[0, 0, 0, 0, 1, 2, 3, 4] # 5
]

# Helper variables to compute unique global MPI interface/mortar ids.
Expand Down Expand Up @@ -1235,18 +1235,18 @@ function fill_mesh_info!(mesh::T8codeMesh, interfaces, mortars, boundaries,
global_mortar_id_to_local[global_mortar_id] = local_mpi_mortar_id

mpi_mesh_info.mpi_mortars.local_neighbor_ids[local_mpi_mortar_id] = [
current_index + 1,
current_index + 1
]
mpi_mesh_info.mpi_mortars.local_neighbor_positions[local_mpi_mortar_id] = [
map_iface_to_ichild_to_position[iface + 1][t8_element_child_id(eclass_scheme, element) + 1],
map_iface_to_ichild_to_position[iface + 1][t8_element_child_id(eclass_scheme, element) + 1]
]
init_mortar_node_indices!(mpi_mesh_info.mpi_mortars,
(iface, dual_faces[1]),
orientation, local_mpi_mortar_id)

neighbor_ranks = [
remotes[findlast(ghost_remote_first_elem .<=
neighbor_ielements[1])],
neighbor_ielements[1])]
]
mpi_mesh_info.neighbor_ranks_mortar[local_mpi_mortar_id] = neighbor_ranks

Expand Down
2 changes: 1 addition & 1 deletion src/meshes/tree_mesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"periodicity" => mesh.tree.periodicity,
"current #cells" => mesh.tree.length,
"#leaf-cells" => count_leaf_cells(mesh.tree),
"maximum #cells" => mesh.tree.capacity,
"maximum #cells" => mesh.tree.capacity
]
summary_box(io, "TreeMesh{" * string(NDIMS) * ", " * string(TreeType) * "}",
setup)
Expand Down
2 changes: 1 addition & 1 deletion src/semidiscretization/semidiscretization_euler_gravity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function Base.show(io::IO, ::MIME"text/plain", parameters::ParametersEulerGravit
"gravitational constant (G)" => parameters.gravitational_constant,
"CFL (gravity)" => parameters.cfl,
"max. #iterations" => parameters.n_iterations_max,
"time integrator" => parameters.timestep_gravity,
"time integrator" => parameters.timestep_gravity
]
summary_box(io, "ParametersEulerGravity", setup)
end
Expand Down
12 changes: 6 additions & 6 deletions src/solvers/dg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function Base.show(io::IO, ::MIME"text/plain", integral::VolumeIntegralFluxDiffe
show(io, integral)
else
setup = [
"volume flux" => integral.volume_flux,
"volume flux" => integral.volume_flux
]
summary_box(io, "VolumeIntegralFluxDifferencing", setup)
end
Expand Down Expand Up @@ -178,7 +178,7 @@ function Base.show(io::IO, ::MIME"text/plain",
show(io, integral)
else
setup = [
"FV flux" => integral.volume_flux_fv,
"FV flux" => integral.volume_flux_fv
]
summary_box(io, "VolumeIntegralPureLGLFiniteVolume", setup)
end
Expand Down Expand Up @@ -275,7 +275,7 @@ function Base.show(io::IO, ::MIME"text/plain", integral::VolumeIntegralUpwind)
show(io, integral)
else
setup = [
"flux splitting" => integral.splitting,
"flux splitting" => integral.splitting
]
summary_box(io, "VolumeIntegralUpwind", setup)
end
Expand Down Expand Up @@ -315,7 +315,7 @@ function Base.show(io::IO, ::MIME"text/plain", integral::SurfaceIntegralWeakForm
show(io, integral)
else
setup = [
"surface flux" => integral.surface_flux,
"surface flux" => integral.surface_flux
]
summary_box(io, "SurfaceIntegralWeakForm", setup)
end
Expand All @@ -341,7 +341,7 @@ function Base.show(io::IO, ::MIME"text/plain", integral::SurfaceIntegralStrongFo
show(io, integral)
else
setup = [
"surface flux" => integral.surface_flux,
"surface flux" => integral.surface_flux
]
summary_box(io, "SurfaceIntegralStrongForm", setup)
end
Expand Down Expand Up @@ -372,7 +372,7 @@ function Base.show(io::IO, ::MIME"text/plain", integral::SurfaceIntegralUpwind)
show(io, integral)
else
setup = [
"flux splitting" => integral.splitting,
"flux splitting" => integral.splitting
]
summary_box(io, "SurfaceIntegralUpwind", setup)
end
Expand Down
6 changes: 3 additions & 3 deletions src/solvers/dgsem_tree/indicators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function Base.show(io::IO, ::MIME"text/plain", indicator::IndicatorHennemannGass
"indicator variable" => indicator.variable,
"max. α" => indicator.alpha_max,
"min. α" => indicator.alpha_min,
"smooth α" => (indicator.alpha_smooth ? "yes" : "no"),
"smooth α" => (indicator.alpha_smooth ? "yes" : "no")
]
summary_box(io, "IndicatorHennemannGassner", setup)
end
Expand Down Expand Up @@ -196,7 +196,7 @@ function Base.show(io::IO, ::MIME"text/plain", indicator::IndicatorLöhner)
else
setup = [
"indicator variable" => indicator.variable,
"f_wave" => indicator.f_wave,
"f_wave" => indicator.f_wave
]
summary_box(io, "IndicatorLöhner", setup)
end
Expand Down Expand Up @@ -254,7 +254,7 @@ function Base.show(io::IO, ::MIME"text/plain", indicator::IndicatorMax)
show(io, indicator)
else
setup = [
"indicator variable" => indicator.variable,
"indicator variable" => indicator.variable
]
summary_box(io, "IndicatorMax", setup)
end
Expand Down
28 changes: 14 additions & 14 deletions test/test_dgmulti_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ end
l2=[
7.853842541289665e-7,
9.609905503440606e-7,
2.832322219966481e-6,
2.832322219966481e-6
] ./ sqrt(2.0),
linf=[
1.5003758788711963e-6,
1.802998748523521e-6,
4.83599270806323e-6,
4.83599270806323e-6
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand All @@ -76,12 +76,12 @@ end
l2=[
1.673813320412685,
5.980737909458242,
21.587822949251173,
21.587822949251173
],
linf=[
3.1388039126918064,
10.630952212105246,
37.682826521024865,
37.682826521024865
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand Down Expand Up @@ -117,12 +117,12 @@ end
l2=[
6.437827414849647e-6,
2.1840558851820947e-6,
1.3245669629438228e-5,
1.3245669629438228e-5
],
linf=[
2.0715843751295537e-5,
8.519520630301258e-6,
4.2642194098885255e-5,
4.2642194098885255e-5
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand All @@ -146,12 +146,12 @@ end
l2=[
1.8684509287853788e-5,
1.0641411823379635e-5,
5.178010291876143e-5,
5.178010291876143e-5
],
linf=[
6.933493585936645e-5,
3.0277366229292113e-5,
0.0002220020568932668,
0.0002220020568932668
])
show(stdout, semi.solver.basis)
show(stdout, MIME"text/plain"(), semi.solver.basis)
Expand All @@ -169,11 +169,11 @@ end
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_fdsbp_periodic.jl"),
l2=[
9.146929178341782e-7, 1.8997616876521201e-6,
3.991417701005622e-6,
3.991417701005622e-6
],
linf=[
1.7321089882393892e-6, 3.3252888869128583e-6,
6.525278767988141e-6,
6.525278767988141e-6
])
show(stdout, semi.solver.basis)
show(stdout, MIME"text/plain"(), semi.solver.basis)
Expand Down Expand Up @@ -210,13 +210,13 @@ end
3.03001101100507e-6,
1.692177335948727e-5,
3.002634351734614e-16,
1.1636653574178203e-15,
1.1636653574178203e-15
],
linf=[
1.2043401988570679e-5,
5.346847010329059e-5,
9.43689570931383e-16,
2.220446049250313e-15,
2.220446049250313e-15
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand All @@ -236,13 +236,13 @@ end
1.633271343738687e-5,
9.575385661756332e-6,
1.2700331443128421e-5,
0.0,
0.0
],
linf=[
7.304984704381567e-5,
5.2365944135601694e-5,
6.469559594934893e-5,
0.0,
0.0
])
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand Down
Loading
Loading