-
Notifications
You must be signed in to change notification settings - Fork 204
Description
In my PDE problem, I do know both nullspaces, one is associated with the U(1) invariance and the other with spatial rotational invariance O(2). At the numerical level, the former is always the case, but the latter depends on the mesh. Ideally, I would like to pass the former in nullspace and the latter in nearnullspace in KSPSolve.
For your convenience, I am attaching a MWE (with input data):
Upon running the code with -ksp_view -ksp_log options, it prints "has attached near null space", and thus it does not recognize the nullspace input. If I delete the "nearnullspace=Rot" option in the KSPSolve, it prints "has attached null space". If now I add "-ksp_constant_null_space", then it recognizes them both, but in my case I don't have a constant nullspace since it is provided explicitly.
I believe the FreeFEM wrapper in PETSc-code.hpp does not allow to use them both although on the PETSc side this seems to be not prohibitive. Looking at the old post "MatNullSpace -> nullspace #276 " by @cmdoug and @prj- , maybe the issue is there and is a very simple fix?
Many thanks for the help in advance!