Skip to content

Commit ae13838

Browse files
committed
fix previous Dirichlet BC
1 parent 878ca5b commit ae13838

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ComputationalModels/Drivers.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ struct StaticNonlinearModel{A,B,C,D,E} <: ComputationalModel
9191

9292
∆U = TrialFESpace(U, dirbc, 0.0)
9393
TrialFESpace!(U, dirbc, 0.0)
94-
spaces = (U, V, ∆U)
94+
Un = get_fe_space(xh⁻)
95+
spaces = (U, V, ∆U, Un)
9596
x = get_free_dof_values(xh)
9697
x⁻ = get_free_dof_values(xh⁻)
9798
# x⁻ = zero_free_values(U)
@@ -124,7 +125,7 @@ function solve!(m::StaticNonlinearModel;
124125

125126
reset!(post)
126127
flagconv = 1 # convergence flag 0 (max bisections) 1 (max steps)
127-
U, V, ∆U = m.spaces
128+
U, V, ∆U, Un = m.spaces
128129
TrialFESpace!(U, m.dirichlet, 0.0)
129130
nls, nls_cache, x, x⁻, assem_U = m.caches
130131

@@ -149,7 +150,8 @@ function solve!(m::StaticNonlinearModel;
149150
end
150151
#@show α
151152
Λ -= ∆Λ
152-
∆Λ= α*∆Λ
153+
∆Λ = α*∆Λ
154+
TrialFESpace!(Un, m.dirichlet, Λ)
153155
Λ += ∆Λ
154156

155157
# U.dirichlet_values .+= α*∆U.dirichlet_values

0 commit comments

Comments
 (0)