Skip to content

Commit 6ce05ef

Browse files
committed
Generalizes injectivity line search β parameter
Transforms the `β` parameter in the injectivity-preserving line search from a constant `Float64` to a `CellField`. This change allows `β` to potentially vary across the computational domain, enhancing the flexibility of the injectivity preservation criterion. The constructor now ensures `β` is stored as a `CellField`, converting scalar inputs as needed, and `update_cellstate!` adapts its usage accordingly.
1 parent 93e0da6 commit 6ce05ef

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Solvers/LineSearches.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ struct Injectivity_Preserving_LS{A} <: AbstractLineSearch
6262
αmin::Float64
6363
ρ::Float64
6464
c::Float64
65-
β::Float64
65+
β::CellField
6666
caches::A
6767
function Injectivity_Preserving_LS::CellState, U, V; maxiter::Int64=50, αmin::Float64=1e-16, ρ::Float64=0.5, c::Float64=0.95, β::Float64=0.95)
6868
caches = (U, V)
69-
new{typeof(caches)}(α, maxiter, αmin, ρ, c, β, caches)
69+
new{typeof(caches)}(α, maxiter, αmin, ρ, c, CellField(β, α.points.trian), caches)
7070
end
7171

7272

@@ -109,6 +109,6 @@ end
109109

110110

111111
function update_cellstate!(obj::Injectivity_Preserving_LS, xh, dxh)
112-
update_state!(InjectivityCheck, obj.α, (xh)', (dxh)', x->obj.β)
112+
update_state!(InjectivityCheck, obj.α, (xh)', (dxh)', obj.β)
113113
return minimum(minimum((obj.α.values)))
114114
end

0 commit comments

Comments
 (0)