[petsc-users] Using real and complex matrices together

Karin&NiKo niko.karin at gmail.com
Mon Jan 14 02:13:46 CST 2019


Dear Michael,

I  also have plans to use PETSc on real and complex objects and, at the
moment, I do not see how to do it.
If possible, could you please comment on how you defined your wrappers and
how you link the symbols with the adequate functions? Since both PETSc real
and complex  symbols have the same names, I wonder if you use the paths to
the different symbols? Also, did you write your wrappers by hand and did
you write a script to do it (the hidden question is : do you cover all the
objects and methods of the library)?

I thank you in advance,
Nicolas

Le dim. 13 janv. 2019 à 22:13, Povolotskyi, Mykhailo via petsc-users <
petsc-users at mcs.anl.gov> a écrit :

> Hi Evan,
>
> I’m one of those users, who has multiple shared libraries.
>
> It is quite stable since I create wrappers around the PETSc functions and
> hide the native PETSc symbols.
>
> But, yes, the interoperations are not possible.
>
> Michael.
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> *From: *Jed Brown via petsc-users <petsc-users at mcs.anl.gov>
> *Sent: *Sunday, January 13, 2019 12:48 PM
> *To: *Evan Um <evanum at gmail.com>; petsc-users <petsc-users at mcs.anl.gov>
> *Subject: *Re: [petsc-users] Using real and complex matrices together
>
>
> It is not supported, sorry.  Some users do it with careful linking via
> multiple shared libraries, but that is fragile and doesn't interoperate.
>
> Evan Um via petsc-users <petsc-users at mcs.anl.gov> writes:
>
> > Hi PETSC users,
> >
> > Inside my codes, I have both complex and real matrices. To solve complex
> > matrices, I build and use complex version of PETSC. In this case, is
> there
> > any way to use real matrices too? Do you have such a PETSC code example?
> > Until now, I have used complex matrices to represent real matrices by
> > setting imaginary components of the real matrices to zero. Real value
> > vectors are also realized by setting imaginary components to zero.
> >
> > In advance, thanks for your comments.
> >
> > Evan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190114/ca9a2a15/attachment.html>


More information about the petsc-users mailing list