Skip to content

Commit 41f2921

Browse files
committed
format some more
1 parent 67c1b6a commit 41f2921

10 files changed

Lines changed: 36 additions & 31 deletions

src/Dofs/ConstraintHandler.jl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ end
135135

136136
const DofCoefficients{T} = Vector{Pair{Int, T}}
137137
"""
138-
AffineConstraint(constrained_dof::Int, entries::Vector{Pair{Int,T}}, b::T) where T
138+
AffineConstraint(constrained_dof::Int, entries::Vector{Pair{Int, T}}, b::T) where {T}
139139
140140
Define an affine/linear constraint to constrain one degree of freedom, `u[i]`,
141141
such that `u[i] = ∑(u[j] * a[j]) + b`,
@@ -148,7 +148,7 @@ struct AffineConstraint{T}
148148
end
149149

150150
"""
151-
ConstraintHandler([T=Float64], dh::AbstractDofHandler)
151+
ConstraintHandler([T = Float64], dh::AbstractDofHandler)
152152
153153
A collection of constraints associated with the dof handler `dh`.
154154
`T` is the numeric type for stored values.
@@ -1012,8 +1012,8 @@ end
10121012

10131013
"""
10141014
PeriodicDirichlet(u::Symbol, facet_mapping, components = nothing)
1015-
PeriodicDirichlet(u::Symbol, facet_mapping, R::AbstractMatrix, components=nothing)
1016-
PeriodicDirichlet(u::Symbol, facet_mapping, f::Function, components=nothing)
1015+
PeriodicDirichlet(u::Symbol, facet_mapping, R::AbstractMatrix, components = nothing)
1016+
PeriodicDirichlet(u::Symbol, facet_mapping, f::Function, components = nothing)
10171017
10181018
Create a periodic Dirichlet boundary condition for the field `u` on the facet-pairs given in
10191019
`facet_mapping`. The mapping can be computed with [`collect_periodic_facets`](@ref). The
@@ -1793,10 +1793,12 @@ end
17931793
@noinline missing_global() = error("can not condense constraint without the global matrix and vector")
17941794

17951795
"""
1796-
_condense_local!(local_matrix::AbstractMatrix, local_vector::AbstractVector,
1797-
global_matrix#=::SparseMatrixCSC=#, global_vector#=::Vector=#,
1798-
global_dofs::AbstractVector, dofmapping::Dict, dofcoefficients::Vector,
1799-
isconstrained::BitVector)
1796+
_condense_local!(
1797+
local_matrix::AbstractMatrix, local_vector::AbstractVector,
1798+
global_matrix #=::SparseMatrixCSC=#, global_vector #=::Vector=#,
1799+
global_dofs::AbstractVector, dofmapping::Dict, dofcoefficients::Vector,
1800+
isconstrained::BitVector
1801+
)
18001802
18011803
Condensation of affine constraints on element level. If possible this function only
18021804
modifies the local arrays.

src/Dofs/DofHandler.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,9 @@ end
688688

689689
"""
690690
sortface(face::Tuple{Int})
691-
sortface(face::Tuple{Int,Int})
692-
sortface(face::Tuple{Int,Int,Int})
693-
sortface(face::Tuple{Int,Int,Int,Int})
691+
sortface(face::Tuple{Int, Int})
692+
sortface(face::Tuple{Int, Int, Int})
693+
sortface(face::Tuple{Int, Int, Int, Int})
694694
695695
Returns the unique representation of a face.
696696
Here the unique representation is the sorted node index tuple.
@@ -701,9 +701,9 @@ function sortface end
701701

702702
"""
703703
sortface_fast(face::Tuple{Int})
704-
sortface_fast(face::Tuple{Int,Int})
705-
sortface_fast(face::Tuple{Int,Int,Int})
706-
sortface_fast(face::Tuple{Int,Int,Int,Int})
704+
sortface_fast(face::Tuple{Int, Int})
705+
sortface_fast(face::Tuple{Int, Int, Int})
706+
sortface_fast(face::Tuple{Int, Int, Int, Int})
707707
708708
Returns the unique representation of a face.
709709
Here the unique representation is the sorted node index tuple.
@@ -926,7 +926,7 @@ getfieldinterpolation(sdh::SubDofHandler, field_idx::Int) = sdh.field_interpolat
926926
getfieldinterpolation(sdh::SubDofHandler, field_name::Symbol) = getfieldinterpolation(sdh, find_field(sdh, field_name))
927927

928928
"""
929-
evaluate_at_grid_nodes(dh::AbstractDofHandler, u::AbstractVector{T}, fieldname::Symbol) where T
929+
evaluate_at_grid_nodes(dh::AbstractDofHandler, u::AbstractVector{T}, fieldname::Symbol) where {T}
930930
931931
Evaluate the approximated solution for field `fieldname` at the node
932932
coordinates of the grid given the Dof handler `dh` and the solution vector `u`.

src/Dofs/apply_analytical.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ end
77
"""
88
apply_analytical!(
99
a::AbstractVector, dh::AbstractDofHandler, fieldname::Symbol,
10-
f::Function, cellset=1:getncells(get_grid(dh)))
10+
f::Function, cellset = 1:getncells(get_grid(dh))
11+
)
1112
1213
Apply a solution `f(x)` by modifying the values in the degree of freedom vector `a`
1314
pertaining to the field `fieldname` for all cells in `cellset`.

src/Grid/topology.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
"""
66
getneighborhood(topology, grid::AbstractGrid, cellidx::CellIndex, include_self = false)
7-
getneighborhood(topology, grid::AbstractGrid, faceidx::FaceIndex, include_self=false)
8-
getneighborhood(topology, grid::AbstractGrid, vertexidx::VertexIndex, include_self=false)
9-
getneighborhood(topology, grid::AbstractGrid, edgeidx::EdgeIndex, include_self=false)
7+
getneighborhood(topology, grid::AbstractGrid, faceidx::FaceIndex, include_self = false)
8+
getneighborhood(topology, grid::AbstractGrid, vertexidx::VertexIndex, include_self = false)
9+
getneighborhood(topology, grid::AbstractGrid, edgeidx::EdgeIndex, include_self = false)
1010
1111
Returns all connected entities of the same type as defined by the respective topology. If `include_self` is true,
1212
the given entity is included in the returned list as well.
@@ -353,7 +353,7 @@ function getstencil(top::ArrayOfVectorViews{VertexIndex, 1}, grid::Grid, vertex_
353353
end
354354

355355
"""
356-
_create_facet_skeleton(neighborhood::AbstractMatrix{AbstractVector{BI}}, grid::AbstractGrid) where BI <: Union{FaceIndex, EdgeIndex, VertexIndex}
356+
_create_facet_skeleton(neighborhood::AbstractMatrix{AbstractVector{BI}}, grid::AbstractGrid) where {BI <: Union{FaceIndex, EdgeIndex, VertexIndex}}
357357
358358
Materializes the skeleton from the `neighborhood` information by returning a `Vector{FacetIndex}` describing the
359359
unique facets in the grid.

src/Grid/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ addnodeset!(grid::AbstractGrid, name::String, f::Function) =
4141

4242
"""
4343
addfacetset!(grid::AbstractGrid, name::String, faceid::AbstractVecOrSet{FacetIndex})
44-
addfacetset!(grid::AbstractGrid, name::String, f::Function; all::Bool=true)
44+
addfacetset!(grid::AbstractGrid, name::String, f::Function; all::Bool = true)
4545
4646
Adds a facetset to the grid with key `name`.
4747
A facetset maps a `String` key to a `OrderedSet` of tuples corresponding to `(global_cell_id, local_facet_id)`.

src/L2_projection.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ function L2Projector(
9292
end
9393

9494
"""
95-
add!(proj::L2Projector, set::AbstractVecOrSet{Int}, ip::Interpolation;
96-
qr_rhs, [qr_lhs])
95+
add!(
96+
proj::L2Projector, set::AbstractVecOrSet{Int}, ip::Interpolation;
97+
qr_rhs, [qr_lhs]
98+
)
9799
98100
Add an interpolation `ip` on the cells in `set` to the `L2Projector` `proj`.
99101

src/PointEvalHandler.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Base.@kwdef struct NewtonLineSearchPointFinder{T}
55
end
66

77
"""
8-
PointEvalHandler(grid::Grid, points::AbstractVector{Vec{dim,T}}; kwargs...) where {dim, T}
8+
PointEvalHandler(grid::Grid, points::AbstractVector{Vec{dim, T}}; kwargs...) where {dim, T}
99
1010
The `PointEvalHandler` can be used for function evaluation in *arbitrary points* in the
1111
domain -- not just in quadrature points or nodes.
@@ -201,8 +201,8 @@ function _get_node_cell_map(grid::AbstractGrid)
201201
end
202202

203203
"""
204-
evaluate_at_points(ph::PointEvalHandler, dh::AbstractDofHandler, dof_values::AbstractVector{T}, [fieldname::Symbol]) where T
205-
evaluate_at_points(ph::PointEvalHandler, proj::L2Projector, dof_values::AbstractVector{T}) where T
204+
evaluate_at_points(ph::PointEvalHandler, dh::AbstractDofHandler, dof_values::AbstractVector{T}, [fieldname::Symbol]) where {T}
205+
evaluate_at_points(ph::PointEvalHandler, proj::L2Projector, dof_values::AbstractVector{T}) where {T}
206206
207207
Return a `Vector{T}` (for a 1-dimensional field) or a `Vector{Vec{fielddim, T}}` (for a
208208
vector field) with the field values of field `fieldname` in the points of the

src/assembler.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,12 @@ vector_handle(a::Union{AbstractCSCAssembler, AbstractCSRAssembler}) = a.f
223223

224224
"""
225225
start_assemble(K::AbstractSparseMatrixCSC{Tv}; fillzero::Bool = true) -> CSCAssembler{Tv}
226-
start_assemble(K::AbstractSparseMatrixCSC{Tv}, f::Vector{Tv}; fillzero::Bool=true) -> CSCAssembler{Tv}
226+
start_assemble(K::AbstractSparseMatrixCSC{Tv}, f::Vector{Tv}; fillzero::Bool = true) -> CSCAssembler{Tv}
227227
228228
Create a `CSCAssembler{Tv}` from the matrix `K` and optional vector `f` with value type `Tv`.
229229
230-
start_assemble(K::Symmetric{AbstractSparseMatrixCSC{Tv}}; fillzero::Bool=true) -> SymmetricCSCAssembler{Tv}
231-
start_assemble(K::Symmetric{AbstractSparseMatrixCSC{Tv}}, f::Vector=Tv[]; fillzero::Bool=true) -> SymmetricCSCAssembler{Tv}
230+
start_assemble(K::Symmetric{AbstractSparseMatrixCSC{Tv}}; fillzero::Bool = true) -> SymmetricCSCAssembler{Tv}
231+
start_assemble(K::Symmetric{AbstractSparseMatrixCSC{Tv}}, f::Vector = Tv[]; fillzero::Bool = true) -> SymmetricCSCAssembler{Tv}
232232
233233
Create a `SymmetricCSCAssembler{Tv}` from the matrix `K` and optional vector `f` with value type `Tv`.
234234

src/interpolations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ n_components(::VectorInterpolation{vdim}) where {vdim} = vdim
8585
n_dbc_components(ip::Interpolation) = n_components(ip)
8686

8787
"""
88-
shape_value_type(ip::Interpolation, ::Type{T}) where T<:Number
88+
shape_value_type(ip::Interpolation, ::Type{T}) where {T <: Number}
8989
9090
Return the type of `shape_value(ip::Interpolation, ξ::Vec, ib::Int)`.
9191
"""

src/iterators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ getcoordinates(ic::InterfaceCache) = (getcoordinates(ic.a), getcoordinates(ic.b)
218218
## CellIterator ##
219219
"""
220220
CellIterator(grid::Grid, cellset = 1:getncells(grid))
221-
CellIterator(dh::AbstractDofHandler, cellset=1:getncells(dh))
221+
CellIterator(dh::AbstractDofHandler, cellset = 1:getncells(dh))
222222
223223
Create a `CellIterator` to conveniently iterate over all, or a subset, of the cells in a
224224
grid. The elements of the iterator are [`CellCache`](@ref)s which are properly

0 commit comments

Comments
 (0)