Skip to content

Commit

Permalink
specify bcondition at single vertex in compute_rotated
Browse files Browse the repository at this point in the history
  • Loading branch information
m-reuter committed Dec 15, 2024
1 parent 87604aa commit 9d93750
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lapy/diffgeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 9d93750

Please sign in to comment.