From: Derek Gaston <friedmud@gm...>  20131209 18:34:52

Good to hear Lorenzo! How many linear iterations are you taking? (use ksp_monitor to see) You might be able to get better performance using a better preconditioner... I still highly recommend trying Hypre... Derek On Mon, Dec 9, 2013 at 11:31 AM, Lorenzo Zanon <zanon@...>wrote: > Hello, > > I'm sorry it took so long. > > There were actually a couple of mistakes in my jacobian and residual. > > Now for the small problem without specifying any options I get: > > Running ./exampleopt > > Mesh Information: > mesh_dimension()=3 > spatial_dimension()=3 > n_nodes()=66 > n_local_nodes()=66 > n_elem()=20 > n_local_elem()=20 > n_active_elem()=20 > n_subdomains()=1 > n_partitions()=1 > n_processors()=1 > n_threads()=1 > processor_id()=0 > > EquationSystems > n_systems()=1 > System #0, "StVen" > Type "NonlinearImplicit" > Variables={ "u" "v" "z" } > Finite Element Types="LAGRANGE" > Approximation Orders="FIRST" > n_dofs()=198 > n_local_dofs()=198 > n_constrained_dofs()=18 > n_local_constrained_dofs()=18 > n_vectors()=1 > n_matrices()=1 > DofMap Sparsity > Average OnProcessor Bandwidth <= 39.4545 > Average OffProcessor Bandwidth <= 0 > Maximum OnProcessor Bandwidth <= 54 > Maximum OffProcessor Bandwidth <= 0 > DofMap Constraints > Number of DoF Constraints = 18 > Average DoF Constraint Length= 0 > > NL step 0, residual_2 = 3.464102e05 > NL step 1, residual_2 = 3.126867e05 > NL step 2, residual_2 = 2.835742e05 > NL step 3, residual_2 = 2.579682e05 > NL step 4, residual_2 = 2.351091e05 > NL step 5, residual_2 = 2.144758e05 > NL step 6, residual_2 = 1.957083e05 > NL step 7, residual_2 = 1.785531e05 > NL step 8, residual_2 = 1.628262e05 > NL step 9, residual_2 = 1.463259e05 > NL step 10, residual_2 = 1.280174e05 > NL step 11, residual_2 = 1.073276e05 > NL step 12, residual_2 = 8.355152e06 > NL step 13, residual_2 = 7.606801e06 > NL step 14, residual_2 = 9.503420e11 > NL step 15, residual_2 = 2.354762e15 > StVen system solved at nonlinear iteration 15 , final nonlinear residual > norm: 2.354762e15 > > > I get faster convergence with e.g. snes_linesearch_type basic ksp_rtol > 1e4: > > NL step 0, residual_2 = 3.464102e05 > NL step 1, residual_2 = 2.417540e04 > NL step 2, residual_2 = 6.174706e08 > NL step 3, residual_2 = 3.577768e12 > NL step 4, residual_2 = 7.687278e17 > StVen system solved at nonlinear iteration 4 , final nonlinear residual > norm: 7.687278e17 > > > I think it would be fine to use these last options also on a finer mesh > then. It finally looks like I don't need JFNK. > > Thanks! > Lorenzo > > On Nov 26, 2013, at 8:42 PM, Derek Gaston wrote: > > On Tue, Nov 26, 2013 at 11:59 AM, Dmitry Karpeyev <karpeev@...>wrote: > >> LU, naturally, should do better, and we should at least see quicker >> linear convergence. >> If not, it's an indication that your problem is singular. >> > > LU should only take 1 (ish) linear iteration. > > However, I still suspect that the issue here is that his Jacobian is > wrong... which accounts for the degraded nonlinear convergence. > > Lorenzo: Have you double checked your Jacobian statements? Have you > checked them against your friend doing FEAP? Your statements should look > very similar to theirs... > > Derek > > > 