11# abstract type Constraint end
22"""
3- Dirichlet(u::Symbol, ∂Ω::AbstractVecOrSet, f::Function, components= nothing)
3+ Dirichlet(u::Symbol, ∂Ω::AbstractVecOrSet, f::Function, components = nothing)
44
55Create a Dirichlet boundary condition on `u` on the `∂Ω` part of
66the boundary. `f` is a function of the form `f(x)` or `f(x, t)`
135135
136136const 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
140140Define an affine/linear constraint to constrain one degree of freedom, `u[i]`,
141141such that `u[i] = ∑(u[j] * a[j]) + b`,
@@ -148,7 +148,7 @@ struct AffineConstraint{T}
148148end
149149
150150"""
151- ConstraintHandler([T= Float64], dh::AbstractDofHandler)
151+ ConstraintHandler([T = Float64], dh::AbstractDofHandler)
152152
153153A collection of constraints associated with the dof handler `dh`.
154154`T` is the numeric type for stored values.
@@ -208,7 +208,7 @@ function get_rhs_data(ch::ConstraintHandler, A::SparseMatrixCSC)
208208end
209209
210210"""
211- apply_rhs!(data::RHSData, f::AbstractVector, ch::ConstraintHandler, applyzero::Bool= false)
211+ apply_rhs!(data::RHSData, f::AbstractVector, ch::ConstraintHandler, applyzero::Bool = false)
212212
213213Applies the boundary condition to the right-hand-side vector without modifying the stiffness matrix.
214214
@@ -349,7 +349,7 @@ function add!(ch::ConstraintHandler, ac::AffineConstraint)
349349end
350350
351351"""
352- add_prescribed_dof!(ch, constrained_dof::Int, inhomogeneity, dofcoefficients= nothing)
352+ add_prescribed_dof!(ch, constrained_dof::Int, inhomogeneity, dofcoefficients = nothing)
353353
354354Add a constrained dof directly to the `ConstraintHandler`.
355355This function checks if the `constrained_dof` is already constrained, and overrides the old
@@ -468,7 +468,7 @@ function _add!(ch::ConstraintHandler, dbc::Dirichlet, bcnodes::AbstractVecOrSet{
468468end
469469
470470"""
471- update!(ch::ConstraintHandler, time::Real= 0.0)
471+ update!(ch::ConstraintHandler, time::Real = 0.0)
472472
473473Update time-dependent inhomogeneities for the new time. This calls `f(x)` or `f(x, t)` when
474474applicable, where `f` is the function(s) corresponding to the constraints in the handler, to
@@ -1011,9 +1011,9 @@ struct PeriodicFacetPair
10111011end
10121012
10131013"""
1014- 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)
1014+ 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)
10171017
10181018Create 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
@@ -1373,7 +1373,7 @@ function rotate_local_dofs(local_facet_dofs, local_facet_dofs_offset, ip::Lagran
13731373end
13741374
13751375"""
1376- collect_periodic_facets(grid::Grid, mset, iset, transform::Union{Function,Nothing}= nothing; tol=1e -12)
1376+ collect_periodic_facets(grid::Grid, mset, iset, transform::Union{Function, Nothing} = nothing; tol = 1.0e -12)
13771377
13781378Match all mirror facets in `mset` with a corresponding image facet in `iset`. Return a
13791379dictionary which maps each mirror facet to a image facet. The result can then be passed to
@@ -1397,7 +1397,7 @@ function collect_periodic_facets(grid::Grid, mset::Union{AbstractSet{FacetIndex}
13971397end
13981398
13991399"""
1400- collect_periodic_facets(grid::Grid, all_facets::Union{AbstractSet{FacetIndex},String,Nothing}= nothing; tol=1e -12)
1400+ collect_periodic_facets(grid::Grid, all_facets::Union{AbstractSet{FacetIndex}, String, Nothing} = nothing; tol = 1.0e -12)
14011401
14021402Split all facets in `all_facets` into image and mirror sets. For each matching pair, the facet
14031403located further along the vector `(1, 1, 1)` becomes the image facet.
@@ -1413,7 +1413,7 @@ end
14131413
14141414
14151415"""
1416- collect_periodic_facets!(facet_map::Vector{PeriodicFacetPair}, grid::Grid, mset, iset, transform::Union{Function,Nothing}; tol=1e -12)
1416+ collect_periodic_facets!(facet_map::Vector{PeriodicFacetPair}, grid::Grid, mset, iset, transform::Union{Function, Nothing}; tol = 1.0e -12)
14171417
14181418Same as [`collect_periodic_facets`](@ref) but adds all matches to the existing `facet_map`.
14191419"""
@@ -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
18011803Condensation of affine constraints on element level. If possible this function only
18021804modifies the local arrays.
0 commit comments