4242
4343function solve! (m:: StaggeredModel ;
4444 stepping= (nsteps= 20 , nsubsteps= 1 , maxbisec= 15 ),
45+ presolver= (τ,∆τ)-> nothing ,
4546 kargsolve)
4647
4748 nsubsteps= stepping[:nsubsteps ]
@@ -52,14 +53,15 @@ function solve!(m::StaggeredModel;
5253 map ((x, y) -> TrialFESpace! (x. fe_space, y. dirichlet, 0.0 ), m. state⁻, m. compmodels)
5354
5455 flagconv = 1 # convergence flag 0 (max bisections) 1 (max steps)
55- ∆Λ = 1.0 / nsteps
56- for time in 0 : nsteps- 1
56+ ∆τ = 1.0 / nsteps
57+ for τ in 0 : nsteps- 1
5758 println (" *******************************************" )
58- println (" Staggered Step: $time " )
59+ println (" Staggered Step: $τ " )
5960 println (" *******************************************" )
60- stevol (Λ) = ∆Λ * (Λ + time)
61+ presolver (τ,∆τ)
62+ stevol (Λ) = ∆τ * (Λ + τ)
6163 map (x -> updateBC! (x. dirichlet, x. dirichlet. caches, [stevol for _ in 1 : length (x. dirichlet. caches)]), m. compmodels)
62- for Λ_inner in 1 : nsubsteps
64+ for τ_inner in 1 : nsubsteps
6365 map ((x) -> TrialFESpace! (x. spaces[1 ], x. dirichlet, 1.0 ), m. compmodels)
6466 _, flagconv = map ((x, y) -> solve! (x; y... ), m. compmodels, kargsolve)
6567 map ((x, y) -> TrialFESpace! (x. fe_space, y. dirichlet, 1.0 ), m. state⁻, m. compmodels)
@@ -120,7 +122,7 @@ get_assemblers(m::StaticNonlinearModel) = (m.caches[4])
120122# vtk::WriteVTK.CollectionFile=paraview_collection(datadir("sims", "Temp") * "/Results", append=false)
121123
122124function solve! (m:: StaticNonlinearModel ;
123- stepping= (nsteps= 20 , maxbisec= 15 ), RestartState:: Bool = false , ProjectDirichlet:: Bool = true ,
125+ stepping= (nsteps= 20 , maxbisec= 15 ), RestartState:: Bool = false , ProjectDirichlet:: Bool = false ,
124126 post= PostProcessor ())
125127
126128 reset! (post)
0 commit comments