fixed: poisson() diverges when dirichlet_gradient() has degenerate cells

63 views
Skip to first unread message

Robert A

unread,
Sep 17, 2026, 10:46:24 AMSep 17
to basilisk-fr
Dear Basilisk Users,

For EMBED surfaces. it seems that there is a sign inconsistency in poisson.h between `relax()` and `residual()` in how coefficient `e` enters the calculations:
 
    relax():     n -= c*sq(Delta);  d += e*sq(Delta);    (poisson.h:321-322)
    residual():  res[] += c - e*a[]; (poisson.h:373, 389)

Fix: in poisson.h, lines 373 and 389,
 
    res[] += c + e*a[];                               // was  c - e*a[]

The attached minimal sample case with a star-shaped surface (4 degenerate cells) now converges excelently (both for uniform and refined-around-the-surface grids).

All the best,

Robert
embed-degenerate-minimal.c
a_converged.jpg
cs_star.jpg
Reply all
Reply to author
Forward
0 new messages