On Tue, 29 Jun 2010 15:26:38 -0500, Matthew Knepley <knepley at gmail.com> wrote: > I am not so sure here. Our problem is not with type parametrization so much > I think (since MatScalar is there) > but with mixing this with another value type. I suspect that a templated > version would have 1G of compiler > errors right now.
PETSc's philosophy often involves moving the solver to the highest level of control (instead of rolling loops around the solver as an ad-hoc way to answer a question of interest). If you have matrices/vectors with different scalar type/precision, then you would naturally want entries of mixed type within single matrices and vectors (and usually mixed type within blocks associated with nodes/cells of your discretization). C++ templates are pretty much inadequate for this because you would want to flatten the recursive types (not to mention the error message and compilation time insanity). Jed
