From 9d93750fa4e1fab4467664adc6affacffdb8f428 Mon Sep 17 00:00:00 2001 From: Martin Reuter Date: Sun, 15 Dec 2024 01:48:24 +0100 Subject: [PATCH] specify bcondition at single vertex in compute_rotated --- lapy/diffgeo.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lapy/diffgeo.py b/lapy/diffgeo.py index f41ba1c..4abd0c9 100644 --- a/lapy/diffgeo.py +++ b/lapy/diffgeo.py @@ -366,7 +366,11 @@ def tria_compute_rotated_f(tria, vfunc): # we can pass identity instead of B here: # div is the integrated divergence (so it is already B*div) fem.mass = sparse.eye(fem.stiffness.shape[0], dtype=vfunc.dtype) - vf = fem.poisson(divf) + # since the solution is ill defined (addition of constant) + # we specify an arbitary boundary condition at a single vertex to + # remove that degree of freedom + dtup = ( np.array([0]), np.array([0.0])) + vf = fem.poisson(divf,dtup) return vf