Dear Lawrence, No, I get the following error: Traceback (most recent call last): File "main.py", line 103, in <module> solve(a==0,u,bcs=[bc_left, bc_right, bc_disk_only,bc_plane_only], solver_parameter=parameters) File "/Users/mmfg/firedrake/src/firedrake/firedrake/solving.py", line 124, in solve _solve_varproblem(*args, **kwargs) File "/Users/mmfg/firedrake/src/firedrake/firedrake/solving.py", line 172, in _solve_varproblem solver.solve() File "/Users/mmfg/firedrake/src/firedrake/firedrake/variational_solver.py", line 220, in solve self.snes.solve(None, v) File "PETSc/SNES.pyx", line 537, in petsc4py.PETSc.SNES.solve (src/petsc4py.PETSc.c:172544) petsc4py.PETSc.Error: error code 56 [0] SNESSolve() line 3967 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/snes/interface/snes.c [0] SNESSolve_KSPONLY() line 38 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/snes/impls/ksponly/ksponly.c [0] KSPSolve() line 598 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/ksp/ksp/interface/itfunc.c [0] KSPSetUp() line 378 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/ksp/ksp/interface/itfunc.c [0] PCSetUp() line 924 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/ksp/pc/interface/precon.c [0] PCSetUp_LU() line 84 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/ksp/pc/impls/factor/lu/lu.c [0] MatGetOrdering() line 250 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/mat/order/sorder.c [0] MatGetOrdering_ND() line 17 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/mat/order/spnd.c [0] No support for this operation for this object type [0] Cannot get rows for matrix type nest ________________________________ De : firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> de la part de Lawrence Mitchell <wence@gmx.li> Envoyé : lundi 5 novembre 2018 09:22 À : firedrake Objet : Re: [firedrake] local discontinuity Dear Floriane,
On 5 Nov 2018, at 09:18, Floriane Gidel [RPG] <mmfg@leeds.ac.uk> wrote:
Dear all,
I went back to the problem with one disk because I realized it only converges when initialized with the exact solution (in which case I made a test of convergence that confirmed convergence to the exact solution). When I initialise it with u=0 both in the plane and disk, then the solver diverges (DIVERGED_MAX_IT). My solver is defined as follows:
V = V_p*V_d u = Function(V) u_d, u_p = split(u) v_d, v_p = TestFunction(V)
a = dot(grad(u_p),grad(v_p))*I_p*dx + dot(grad(u_d),grad(v_d))*I_d*dx + (u_d('+')-u_p('+'))*(v_d('+')-v_p('+'))*4*avg(I_d)*avg(I_p)*dS solve(a==0, u, bcs=[bc_left, bc_right, bc_disk_only, bc_plane_only])
where bc_disk_only and bc_plane_only force nodes of V.sub(0) to be zeros in the plane and nodes of V.sub(1) to be zeros in the disk, respectively, and are defined as in Tomasz fluid/structure code, using continuous indicators I_cg_d and I_cg_p (while I_d and I_p are discontinuous). The solver above only converges when u_d and u_p are initialized with the exact analytical solution, or when I replace I_d and I_p in the first two integrals by their continuous forms I_cg_d and I_cg_p (but then the obtained solution is wrong).
This is quite a simple equation so I don't know what I'm doing wrong. Does anyone understand what's wrong ?
Let's start by confirming that you can solve this equation with an exact (direct) solver. If you say: parameters = {"snes_type": "ksponly", "ksp_type": "preonly", "pc_type": "lu", "pc_factor_mat_solver_type": "mumps", "ksp_converged_reason": True, "snes_converged_reason": True} and run with: solve(..., solver_parameters=parameters) can you obtain a solution? Cheers, Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake