@@ -82,26 +82,12 @@ function u_boundary!(result, qpinfo)
8282 return nothing
8383end
8484
85- function initialgrid_cone ()
86- xgrid = ExtendableGrid {Float64, Int32} ()
87- xgrid[Coordinates] = Array {Float64, 2} ([- 1 0 ; 0 - 2 ; 1 0 ]' )
88- xgrid[CellNodes] = Array {Int32, 2} ([1 2 3 ]' )
89- xgrid[CellGeometries] = VectorOfConstants {ElementGeometries, Int} (Triangle2D, 1 )
90- xgrid[CellRegions] = ones (Int32, 1 )
91- xgrid[BFaceRegions] = Array {Int32, 1} ([1 , 2 , 3 ])
92- xgrid[BFaceNodes] = Array {Int32, 2} ([1 2 ; 2 3 ; 3 1 ]' )
93- xgrid[BFaceGeometries] = VectorOfConstants {ElementGeometries, Int} (Edge1D, 3 )
94- xgrid[CoordinateSystem] = Cartesian2D
95- return xgrid
96- end
9785
9886function main (;
9987 μ_final = 0.0005 , # flow parameter
10088 order = 2 , # FE order of the flow field (pressure order is order-1)
10189 h = 1.0e-3 , # grid cell volume
10290 nrefs = 1 , # additional grid refinements
103- method_linear = nothing , # linear solver ("nothing" invokes the default solver)
104- precon_linear = nothing , # preconditioner
10591 Plotter = nothing ,
10692 kwargs...
10793 )
@@ -134,14 +120,9 @@ function main(;
134120 # # prepare plots
135121 plt = GridVisualizer (; Plotter = Plotter, layout = (1 , 2 ), clear = true , size = (1600 , 800 ))
136122
137-
138- # # prepare an initial solution matching the boundary data
139- sol = FEVector (FES; tags = PD. unknowns)
140- interpolate! (sol[u], ON_BFACES, u_boundary!; regions = [1 ])
141-
142-
143123 # # solve by μ embedding
144124 step = 0
125+ sol = nothing
145126 SC = nothing
146127 PE = PointEvaluator ([id (1 )])
147128 while (true )
@@ -151,11 +132,6 @@ function main(;
151132 PD,
152133 FES,
153134 SC;
154- init = sol,
155- method_linear,
156- # use new preconditioner API: https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/#Specifying-Preconditioners
157- # this does currently now work with ILU, see https://github.com/WIAS-PDELib/ExtendableFEM.jl/pull/47#issuecomment-2796849931
158- precon_linear,
159135 return_config = true ,
160136 target_residual = 1.0e-10 ,
161137 maxiterations = 20 ,
@@ -187,15 +163,7 @@ generateplots = ExtendableFEM.default_generateplots(Example250_NSELidDrivenCavit
187163function runtests () # hide
188164 sol, plt = main (; μ_final = 0.005 ) # hide
189165 sum (view (sol[1 ])) ≈ 237.24628017878518 # hide
190-
191- method_linear = KrylovJL_GMRES () # hide
192- precon_linear = IncompleteLU. ilu # hide
193-
194- sol, plt = main (; μ_final = 0.005 , method_linear, precon_linear) # hide
195- @test sum (view (sol[1 ])) ≈ 237.24628017878518 # hide
196-
197166 return nothing # hide
198167end # hide
199168
200-
201169end # module
0 commit comments