Skip to content

Commit

Permalink
add constructor for NonlinearAlias
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Dec 10, 2024
1 parent fb70e00 commit e1e45fd
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/problems/nonlinear_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,17 @@ end


struct NonlinearAliasSpecifier <: AbstractAliasSpecifier
alias_p
alias_f
alias_p::Union{Bool,Nothing}
alias_f::Union{Bool,Nothing}
alias_u0::Union{Bool,Nothing}
end

function NonlinearAliasSpecifier(;alias_p = nothing, alias_f = nothing, alias_u0 = nothing, alias = nothing)
if isnothing(alias)
NonlinearAliasSpecifier(alias_p, alias_f, alias_u0)
elseif alias
NonlinearAliasSpecifier(true, true, true)
elseif !alias
NonlinearAliasSpecifier(false, false, false)
end
end

0 comments on commit e1e45fd

Please sign in to comment.