I am not so sure here. Our problem is not with type parametrization so much I think (since MatScalar is there)<div>but with mixing this with another value type. I suspect that a templated version would have 1G of compiler</div>
<div>errors right now.</div><div><br></div><div>   Matt<br><br><div class="gmail_quote">On Tue, Jun 29, 2010 at 1:53 PM, Aron Ahmadia <span dir="ltr"><<a href="mailto:aron.ahmadia@kaust.edu.sa">aron.ahmadia@kaust.edu.sa</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><div>This might be one of the rare cases which makes a strong argument for C++ template metaprogramming.  A well-defined extension could make this seamless.  I know this is already one of the strengths of the Eigen libraries (freedom to mix types).</div>

<div><br></div><font color="#888888"><div>A</div></font><div><div></div><div class="h5"><br><div class="gmail_quote">On Tue, Jun 29, 2010 at 2:49 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br><div><div><div>On Jun 29, 2010, at 12:59 PM, Matthew Knepley wrote:</div><br><blockquote type="cite">On Tue, Jun 29, 2010 at 12:58 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org" target="_blank">jed@59a2.org</a>></span> wrote:<br>

<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Tue, 29 Jun 2010 12:43:36 -0500, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br>
> 3) What you really want is to make MatScalar to be float. Then use<br>
>     doubles for the residual calculation.<br>
<br>
</div>I have no idea what Luke's usage is, but MatScalar != PetscScalar is not<br>
currently supported.<br>
<br>
  <a href="http://lists.mcs.anl.gov/pipermail/petsc-dev/2009-June/001417.html" target="_blank">http://lists.mcs.anl.gov/pipermail/petsc-dev/2009-June/001417.html</a><br>
<br>
I'm intrigued by it because my matrices are only for preconditioning<br>
purposes, but haven't caught the bug to try fixing it since the above<br>
thread.</blockquote><div><br></div><div>If someone really needs it, I will fix it.</div></div></blockquote><div><br></div></div>   It is a major mother to fix. Unless we can come up with a new clever paradigm it will be a big mess of ugly nasty code to "fix". The problem is that in many places in the code, values in the arrays of the matrices are passed as values through PETSc functions (which are all prototyped as PetscScalar) so at each passage one must be write code to convert from double to single pass in then free the copy.</div>

<div><br></div><font color="#888888"><div>   Barry</div></font><div><div><br></div><div><br><blockquote type="cite"><div class="gmail_quote"><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<font color="#888888"><br>
Jed<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>



</blockquote></div><br></div></div></blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>

</div>