Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zjwegert committed Dec 11, 2024
1 parent 01703a5 commit 2be7919
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ b_Ω(v,p) = - (∇⋅v)*p

a_fluid((u,p),(v,q)) =
( a_Ω(u,v)+b_Ω(u,q)+b_Ω(v,p)) * Ω.dΩf +
( a_Ω(u,v)+b_Ω(u,q)+b_Ω(v,p) + (γ(hmin))*uv ) * Ω.dΩs
( a_Ω(u,v)+b_Ω(u,q)+b_Ω(v,p) + hₕ)*uv ) * Ω.dΩs

## Structure
# Stabilization and material parameters
Expand Down Expand Up @@ -165,7 +165,7 @@ ls_evo = UnfittedFEEvolution(evo,reinit)

## Hilbertian extension-regularisation problems
(hₕ) = (α_coeff*hₕ)^2
a_hilb(p,q) =(((hmin))*(p)(q) + p*q)dΩ_act;
a_hilb(p,q) =((_α hₕ)*(p)(q) + p*q)dΩ_act;
vel_ext = VelocityExtension(a_hilb,U_reg,V_reg)

## Optimiser
Expand Down
3 changes: 2 additions & 1 deletion src/GridapTopOpt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ using PartitionedArrays: getany, tuple_of_arrays, matching_ghost_indices

using GridapSolvers
using GridapSolvers.LinearSolvers, GridapSolvers.NonlinearSolvers, GridapSolvers.BlockSolvers
using GridapSolvers.SolverInterfaces: SolverVerboseLevel, SOLVER_VERBOSE_NONE, SOLVER_VERBOSE_LOW, SOLVER_VERBOSE_HIGH
using GridapSolvers.SolverInterfaces: SolverVerboseLevel, SOLVER_VERBOSE_NONE, SOLVER_VERBOSE_LOW, SOLVER_VERBOSE_HIGH,
SOLVER_CONVERGED_ATOL, SOLVER_CONVERGED_RTOL, ConvergenceLog, finished_flag

using GridapEmbedded
using GridapEmbedded.LevelSetCutters, GridapEmbedded.Interfaces
Expand Down
4 changes: 1 addition & 3 deletions src/LevelSetEvolution/UnfittedEvolution/StabilisedReinit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,14 @@ function solve!(s::StabilisedReinit,φh,cache::Nothing)
# Operator and cache
op = get_algebraic_operator(FEOperator(res,jac,V_φ,V_φ,assembler))
nls_cache = instantiate_caches(get_free_dof_values(φh),nls,op)
s.cache = (;nls_cache,φh_tmp)
s.cache = (;nls_cache,φ_tmp)
# Solve
solve!(get_free_dof_values(φh),nls,op,nls_cache)
copy!(φ_tmp,get_free_dof_values(φ))
update_collection!(s.Ωs,φh) # TODO: remove?
return φh
end

using GridapSolvers.SolverInterfaces: SOLVER_CONVERGED_ATOL,SOLVER_CONVERGED_RTOL,ConvergenceLog,finished_flag

function solve!(s::StabilisedReinit,φh,cache)
nls, V_φ, assembler, = s.nls, s.space, s.assembler
nls_cache, φ_tmp = cache
Expand Down

0 comments on commit 2be7919

Please sign in to comment.