<div class="gmail_quote">On Thu, Oct 7, 2010 at 14:17, Darach Golden <span dir="ltr"><<a href="mailto:darach@tchpc.tcd.ie">darach@tchpc.tcd.ie</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":37g">- one is a poisson solve using dmmg (real). So we don't want to store<br>
complex PetscScalars -- or am I just missing the fact that we can use<br>
PetscReal here with a complex compile?<br></div></blockquote><div><br></div><div>The matrices and vectors use PetscScalar.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":37g">
- the other is operations on (possibly including inversion of) complex<br>
matrices</div></blockquote></div><br><div>What is the relative size? What sort of problem are you solving and why do you want an inverse?</div><div><br></div><div>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.</div>
<div><br></div><div>Jed</div>