From 0594907372d0813857d9ccac24b86e9e0f331deb Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 22 Mar 2024 14:33:13 -0600 Subject: [PATCH] fix formatting --- src/field_utils.jl | 16 +++++++++++++--- src/grids/uniform_cartesian_grid.jl | 2 +- src/interpolation.jl | 6 +++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/field_utils.jl b/src/field_utils.jl index 19fb8a5..2a81e28 100644 --- a/src/field_utils.jl +++ b/src/field_utils.jl @@ -4,12 +4,19 @@ struct FiniteDifferenceToEdges{F1,F2,NT} <: AbstractSimulationStep edge_lengths::NT - function FiniteDifferenceToEdges(nodal_field::Field{T1,N1,NodeOffset}, edge_field::Field{T2,N2,EdgeOffset}) where {T1,T2,N1,N2} + function FiniteDifferenceToEdges( + nodal_field::Field{T1,N1,NodeOffset}, + edge_field::Field{T2,N2,EdgeOffset}, + ) where {T1,T2,N1,N2} @assert edge_field.upper_guard_cells >= 1 edge_lengths = cell_lengths(nodal_field.grid) - new{typeof(nodal_field),typeof(edge_field),typeof(edge_lengths)}(nodal_field, edge_field, edge_lengths) + new{typeof(nodal_field),typeof(edge_field),typeof(edge_lengths)}( + nodal_field, + edge_field, + edge_lengths, + ) end end @@ -33,7 +40,10 @@ struct AverageEdgesToNodes{F1,F2} <: AbstractSimulationStep edge_field::F1 nodal_field::F2 - function AverageEdgesToNodes(edge_field::Field{T1,N1,EdgeOffset}, nodal_field::Field{T2,N2,NodeOffset}) where {T1,T2,N1,N2} + function AverageEdgesToNodes( + edge_field::Field{T1,N1,EdgeOffset}, + nodal_field::Field{T2,N2,NodeOffset}, + ) where {T1,T2,N1,N2} @assert edge_field.lower_guard_cells >= 1 @assert edge_field.upper_guard_cells >= 1 diff --git a/src/grids/uniform_cartesian_grid.jl b/src/grids/uniform_cartesian_grid.jl index 26183c1..801c205 100644 --- a/src/grids/uniform_cartesian_grid.jl +++ b/src/grids/uniform_cartesian_grid.jl @@ -19,7 +19,7 @@ end return (grid.upper_bounds .- grid.lower_bounds) ./ grid.num_cells end -@inline function cell_coords_to_phys_coords( grid::UniformCartesianGrid, idxs) +@inline function cell_coords_to_phys_coords(grid::UniformCartesianGrid, idxs) return grid.lower_bounds .+ idxs .* cell_lengths(grid) end diff --git a/src/interpolation.jl b/src/interpolation.jl index 5cc4c0a..174c92b 100644 --- a/src/interpolation.jl +++ b/src/interpolation.jl @@ -147,7 +147,11 @@ struct BSplineChargeInterpolation{S,F,IF} <: AbstractSimulationStep interp_func::IF - function BSplineChargeInterpolation(species::S, rho::Field{T,N,NodeOffset}, bspline_degree::Int) where {T,N,S} + function BSplineChargeInterpolation( + species::S, + rho::Field{T,N,NodeOffset}, + bspline_degree::Int, + ) where {T,N,S} interp_width = div(bspline_degree, 2) + 1 interp_func = select_bs_interp(bspline_degree)