@@ -26,8 +26,6 @@ using ExtendableGrids
2626using SimplexGridFactory
2727using LinearAlgebra
2828using GridVisualize
29- using LinearSolve
30- using IncompleteLU
3129using Test # hide
3230
3331
@@ -82,26 +80,12 @@ function u_boundary!(result, qpinfo)
8280 return nothing
8381end
8482
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
9783
9884function main (;
9985 μ_final = 0.0005 , # flow parameter
10086 order = 2 , # FE order of the flow field (pressure order is order-1)
10187 h = 1.0e-3 , # grid cell volume
10288 nrefs = 1 , # additional grid refinements
103- method_linear = nothing , # linear solver ("nothing" invokes the default solver)
104- precon_linear = nothing , # preconditioner
10589 Plotter = nothing ,
10690 kwargs...
10791 )
@@ -134,14 +118,9 @@ function main(;
134118 # # prepare plots
135119 plt = GridVisualizer (; Plotter = Plotter, layout = (1 , 2 ), clear = true , size = (1600 , 800 ))
136120
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-
143121 # # solve by μ embedding
144122 step = 0
123+ sol = nothing
145124 SC = nothing
146125 PE = PointEvaluator ([id (1 )])
147126 while (true )
@@ -151,11 +130,6 @@ function main(;
151130 PD,
152131 FES,
153132 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,
159133 return_config = true ,
160134 target_residual = 1.0e-10 ,
161135 maxiterations = 20 ,
@@ -187,15 +161,7 @@ generateplots = ExtendableFEM.default_generateplots(Example250_NSELidDrivenCavit
187161function runtests () # hide
188162 sol, plt = main (; μ_final = 0.005 ) # hide
189163 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-
197164 return nothing # hide
198165end # hide
199166
200-
201167end # module
0 commit comments