I managed to compile ngs-petsc using petsc with real numbers. However, I would like to also use complex numbers. When I tried to compile ngs-petsc with petsc using complex numbers, the compilation failed.
Am I right that this interface is currently not implemented? Are there any plans to implement this or is there anything speaking against this?
You are right, I have not touched the complex case at all yet.
In principle, I do not think it would be hard to handle the complex case. I have not done it yet mostly because I do not know how to make the complex and the real interface work at the same time.
I will try it out sometime this week or next, if I do not run into troubles it should be available in the GitHub at some point.
I have push a new branch, “complex”, to the github repo.
You must set -DPETSC_COMPLEX=ON, and the complex version of the interface will be built.
(Compiling will throw an error when it tries to compile against a real PETSc installation when this is turned on, or if it finds a complex one when it is turned off)
You can have the real and complex interfaces installed at the same time, one will be called “ngs_petsc” and the other “ngs_petsc_complex”.
Unfortunately:
You cannot load both at the same time
When you a complex and a real PETSc installation at the same time, you have to be careful with your LD_LIBRARY_PATH/PETSC_ARCH/PETSC_DIR environment variables! For me, loading ngs_petsc when the complex libraries take priority will not produce an error but garbage output!
Hi Lukas
I think i am missing something when you say the complex petsc interface should get built automatically. I have the option DPETSC_COMPLEX=ON but cmake warns it’s not being used. Do i have to specify where the ngsolve-petsc is located?