[petsc-users] Using real build of Hypre with Complex Build of PETSc

Pierre Jolivet pierre at joliv.et
Thu Sep 29 00:31:58 CDT 2022


Hello Lucas,
Supposedly (I haven’t tried this myself for a while), HYPRE supports real-only complex-stored matrices.
So as long as you assemble a complex Mat with a zero imaginary part, e.g., MatRealPart(Pmat), you could feed that to PCHYPRE.
If you really want to use a real-only build of HYPRE, there could be a strategy using a PCSHELL, but it would require you to assemble all the HYPRE objects yourself, so I would first try the first strategy.

Thanks,
Pierre

> On 29 Sep 2022, at 2:48 AM, Lucas Banting <bantingl at myumanitoba.ca> wrote:
> 
> 
> Hello,
> 
> My application involves the complex-valued curl-curl equation. 
> I use the complex build of PETSc, but would like to try HYPRE AMS as a real preconditioner, in the same way as this paper describes:https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/103394/geo2015-0013.1.pdf?sequence=2 <https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/103394/geo2015-0013.1.pdf?sequence=2>
> My understanding of PETSc is that I can not mix complex and real scalars. Is there a way I can assemble a parallel, real valued matrix, from my complex PETSc matrix and use it with HYPRE? 
> 
> I understand that I can do this by using a real build of PETSc (like MFEM does), but would prefer to keep using the complex build of PETSc as that is what the rest of my application uses.
> 
> Thanks,
> Lucas
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220929/d5d310d1/attachment.html>


More information about the petsc-users mailing list