[petsc-users] call petsc real/petsc complex in same application
Jed Brown
jed at 59A2.org
Thu Oct 7 07:33:47 CDT 2010
On Thu, Oct 7, 2010 at 14:17, Darach Golden <darach at tchpc.tcd.ie> wrote:
> - one is a poisson solve using dmmg (real). So we don't want to store
> complex PetscScalars -- or am I just missing the fact that we can use
> PetscReal here with a complex compile?
>
The matrices and vectors use PetscScalar.
> - the other is operations on (possibly including inversion of) complex
> matrices
>
What is the relative size? What sort of problem are you solving and why do
you want an inverse?
The issue is that unless the complex system is much smaller, the memory and
performance gains of using PetscScalar=real for the real problem would
actually be small. The worst case would be a large difficult real system
and a small, easy complex system. In that case, you might consider using an
equivalent real formulation for the complex problem. One could ask to
template everything over the scalar type, but there are downsides to that.
The more common case seems to be that the complex problem is big and
difficult, so the cost of using PetscScalar=complex for the real problem is
not too painful.
Jed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101007/bd300f73/attachment.htm>
More information about the petsc-users
mailing list