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

Use latest version of JuliaFormatter #661

Merged
merged 3 commits into from
Nov 12, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
#
# julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version = "0.13.0"))'
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.62"))'
julia -e 'using JuliaFormatter; format(".")'
- name: Format check
run: |
Expand Down
10 changes: 5 additions & 5 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ makedocs(sitename="TrixiParticles.jl",
"Examples" => "examples.md",
"Visualization" => "visualization.md",
"Preprocessing" => [
"Sampling of Geometries" => joinpath("preprocessing", "preprocessing.md"),
"Sampling of Geometries" => joinpath("preprocessing", "preprocessing.md")
],
"Components" => [
"Overview" => "overview.md",
Expand All @@ -127,7 +127,7 @@ makedocs(sitename="TrixiParticles.jl",
"Density Calculators" => joinpath("general", "density_calculators.md"),
"Smoothing Kernels" => joinpath("general", "smoothing_kernels.md"),
"Neighborhood Search" => joinpath("general", "neighborhood_search.md"),
"Util" => joinpath("general", "util.md"),
"Util" => joinpath("general", "util.md")
],
"Systems" => [
"Discrete Element Method (Solid)" => joinpath("systems",
Expand All @@ -138,18 +138,18 @@ makedocs(sitename="TrixiParticles.jl",
"entropically_damped_sph.md"),
"Total Lagrangian SPH (Elastic Structure)" => joinpath("systems",
"total_lagrangian_sph.md"),
"Boundary" => joinpath("systems", "boundary.md"),
"Boundary" => joinpath("systems", "boundary.md")
],
"Time Integration" => "time_integration.md",
"Callbacks" => "callbacks.md",
"TrixiBase.jl API Reference" => "reference-trixibase.md",
"PointNeighbors.jl API Reference" => "reference-pointneighbors.md",
"PointNeighbors.jl API Reference" => "reference-pointneighbors.md"
],
"Authors" => "authors.md",
"Contributing" => "contributing.md",
"Code of Conduct" => "code_of_conduct.md",
"License" => "license.md",
"References" => "references.md",
"References" => "references.md"
])

deploydocs(repo="github.com/trixi-framework/TrixiParticles.jl",
Expand Down
2 changes: 1 addition & 1 deletion examples/n_body/n_body_benchmark_trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ velocity = [0.0 1.66007664274403694e-3 -2.76742510726862411e-3 2.964601375647616

masses = [
1.0, 9.54791938424326609e-4, 2.85885980666130812e-4, 4.36624404335156298e-5,
5.15138902046611451e-5,
5.15138902046611451e-5
] * SOLAR_MASS

# Offset sun momentum
Expand Down
2 changes: 1 addition & 1 deletion examples/n_body/n_body_solar_system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ velocity = [-1.4663 -1.5205e+04 -3.4770e+04 2.9288e+04 2.4533e+04 -1.0724e+03 8.
4.8370 2.5180e+04 -316.8994 -172.5873 -1.9295e+03 -4.8696e+03 -1.3824e+03 2.4527e+03 1.9082e+03]

masses = [
1.99e30, 3.30e23, 4.87e24, 5.97e24, 6.42e23, 1.90e27, 5.68e26, 8.68e25, 1.02e26,
1.99e30, 3.30e23, 4.87e24, 5.97e24, 6.42e23, 1.90e27, 5.68e26, 8.68e25, 1.02e26
]

initial_condition = InitialCondition(; coordinates, velocity, density=1.0, mass=masses)
Expand Down
2 changes: 1 addition & 1 deletion examples/postprocessing/interpolation_point_line.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ println(interpolate_point([
[position_x, 0.1],
[position_x, 0.0],
[position_x, -0.01],
[position_x, -0.05],
[position_x, -0.05]
], semi, fluid_system, sol))

# It is also possible to interpolate along a line
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks/density_reinit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Base.show(io::IO, ::MIME"text/plain",
callback = cb.affect!
setup = [
"interval" => callback.interval,
"reinit_initial_solution" => callback.reinit_initial_solution,
"reinit_initial_solution" => callback.reinit_initial_solution
]
summary_box(io, "DensityReinitializationCallback", setup)
end
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks/info.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Base.show(io::IO, ::MIME"text/plain", cb::DiscreteCallback{<:Any, <:Inf
callback = cb.affect!

setup = [
"interval" => callback.interval,
"interval" => callback.interval
]
summary_box(io, "InfoCallback", setup)
end
Expand Down
4 changes: 2 additions & 2 deletions src/callbacks/post_process.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"output directory" => callback.output_directory,
"append timestamp" => callback.append_timestamp ? "yes" : "no",
"write json file" => callback.write_csv ? "yes" : "no",
"write csv file" => callback.write_json ? "yes" : "no",
"write csv file" => callback.write_json ? "yes" : "no"
]

for (i, key) in enumerate(keys(callback.func))
Expand Down Expand Up @@ -193,7 +193,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"output directory" => callback.output_directory,
"append timestamp" => callback.append_timestamp ? "yes" : "no",
"write json file" => callback.write_csv ? "yes" : "no",
"write csv file" => callback.write_json ? "yes" : "no",
"write csv file" => callback.write_json ? "yes" : "no"
]

for (i, key) in enumerate(keys(callback.func))
Expand Down
6 changes: 3 additions & 3 deletions src/callbacks/solution_saving.jl
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"save final solution" => solution_saving.save_final_solution ? "yes" :
"no",
"output directory" => abspath(solution_saving.output_directory),
"prefix" => solution_saving.prefix,
"prefix" => solution_saving.prefix
]
summary_box(io, "SolutionSavingCallback", setup)
end
Expand All @@ -275,7 +275,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"save final solution" => solution_saving.save_final_solution ? "yes" :
"no",
"output directory" => abspath(solution_saving.output_directory),
"prefix" => solution_saving.prefix,
"prefix" => solution_saving.prefix
]
summary_box(io, "SolutionSavingCallback", setup)
end
Expand All @@ -300,7 +300,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"save final solution" => solution_saving.save_final_solution ? "yes" :
"no",
"output directory" => abspath(solution_saving.output_directory),
"prefix" => solution_saving.prefix,
"prefix" => solution_saving.prefix
]
summary_box(io, "SolutionSavingCallback", setup)
end
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks/stepsize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function Base.show(io::IO, ::MIME"text/plain",

setup = [
"is constant" => string(is_constant(stepsize_callback)),
"CFL number" => stepsize_callback.cfl_number,
"CFL number" => stepsize_callback.cfl_number
]
summary_box(io, "StepsizeCallback", setup)
end
Expand Down
4 changes: 2 additions & 2 deletions src/callbacks/update.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function Base.show(io::IO, ::MIME"text/plain",
else
update_cb = cb.affect!
setup = [
"interval" => update_cb.interval,
"interval" => update_cb.interval
]
summary_box(io, "UpdateCallback", setup)
end
Expand All @@ -132,7 +132,7 @@ function Base.show(io::IO, ::MIME"text/plain",
else
update_cb = cb.affect!.affect!
setup = [
"dt" => update_cb.interval,
"dt" => update_cb.interval
]
summary_box(io, "UpdateCallback", setup)
end
Expand Down
8 changes: 4 additions & 4 deletions test/examples/dam_break_2d_corrections.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"gradient_summation_correction" => GradientCorrection(),
"mixed_kernel_gradient_summation_correction" => MixedKernelGradientCorrection(),
"gradient_continuity_correction" => GradientCorrection(),
"mixed_kernel_gradient_continuity_correction" => MixedKernelGradientCorrection(),
"mixed_kernel_gradient_continuity_correction" => MixedKernelGradientCorrection()
)

smoothing_length_dict = Dict(
Expand All @@ -29,7 +29,7 @@
"gradient_summation_correction" => 3.5 * particle_spacing,
"mixed_kernel_gradient_summation_correction" => 3.5 * particle_spacing,
"gradient_continuity_correction" => 4.5 * particle_spacing,
"mixed_kernel_gradient_continuity_correction" => 4.0 * particle_spacing,
"mixed_kernel_gradient_continuity_correction" => 4.0 * particle_spacing
)

density_calculator_dict = Dict(
Expand All @@ -43,7 +43,7 @@
"gradient_summation_correction" => SummationDensity(),
"gradient_continuity_correction" => ContinuityDensity(),
"mixed_kernel_gradient_summation_correction" => SummationDensity(),
"mixed_kernel_gradient_continuity_correction" => ContinuityDensity(),
"mixed_kernel_gradient_continuity_correction" => ContinuityDensity()
)

smoothing_kernel_dict = Dict(
Expand All @@ -57,7 +57,7 @@
"gradient_summation_correction" => WendlandC6Kernel{2}(),
"gradient_continuity_correction" => WendlandC6Kernel{2}(),
"mixed_kernel_gradient_summation_correction" => WendlandC6Kernel{2}(),
"mixed_kernel_gradient_continuity_correction" => WendlandC6Kernel{2}(),
"mixed_kernel_gradient_continuity_correction" => WendlandC6Kernel{2}()
)

@testset "continuity_reinit" begin
Expand Down
14 changes: 7 additions & 7 deletions test/examples/examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
viscosity=ViscosityMorris(nu=0.0015),
density_calculator=ContinuityDensity(),
acceleration=(0.0,
-gravity)),),
-gravity)),)
)

for (test_description, kwargs) in hydrostatic_water_column_tests
Expand Down Expand Up @@ -157,7 +157,7 @@
correction=AkinciFreeSurfaceCorrection(fluid_density),
density_diffusion=nothing,
adhesion_coefficient=0.05,
sound_speed=100.0),
sound_speed=100.0)
)

for (test_description, kwargs) in dam_break_tests
Expand All @@ -170,7 +170,7 @@
"dam_break_2d.jl");
tspan=(0, 0.1), kwargs...) [
r"┌ Info: The desired tank length in y-direction .*\n",
r"└ New tank length in y-direction.*\n",
r"└ New tank length in y-direction.*\n"
]

@test sol.retcode == ReturnCode.Success
Expand All @@ -185,7 +185,7 @@
"dam_break_oil_film_2d.jl"),
tspan=(0.0, 0.05)) [
r"┌ Info: The desired tank length in y-direction .*\n",
r"└ New tank length in y-direction.*\n",
r"└ New tank length in y-direction.*\n"
]
@test sol.retcode == ReturnCode.Success
@test count_rhs_allocations(sol, semi) == 0
Expand Down Expand Up @@ -286,7 +286,7 @@
r"┌ Info: The desired tank length in y-direction .*\n",
r"└ New tank length in y-direction.*\n",
r"┌ Info: The desired tank length in z-direction .*\n",
r"└ New tank length in z-direction.*\n",
r"└ New tank length in z-direction.*\n"
]
@test sol.retcode == ReturnCode.Success
@test count_rhs_allocations(sol, semi) == 0
Expand Down Expand Up @@ -375,7 +375,7 @@
@test_nowarn_mod trixi_include(@__MODULE__,
joinpath(examples_dir(), "n_body",
"n_body_benchmark_trixi.jl")) [
r"WARNING: Method definition interact!.*\n",
r"WARNING: Method definition interact!.*\n"
]
end

Expand All @@ -402,7 +402,7 @@
r"WARNING: using deprecated binding PlotUtils.*\n",
r"WARNING: Makie.* is deprecated.*\n",
r" likely near none:1\n",
r", use .* instead.\n",
r", use .* instead.\n"
]
@test sol.retcode == ReturnCode.Success
end
Expand Down
Loading
Loading