dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #06933
Re: Function.vector() and solve()
2008/3/30, Anders Logg <logg@xxxxxxxxx>:
> On Sun, Mar 30, 2008 at 10:25:06PM +0200, Martin Sandve Alnæs wrote:
> > Then solve should be fixed to expect a GenericVector, what's the problem?
>
>
> Yes, but that needs some thinking. The solve() function needs to check
> what kind of arguments it gets and redirect to the correct backend.
> For example, if (A, x, b) are PETSc objects, then it needs to call a
> PETSc solver (which does not work through the GenericFoo interface).
>
> I guess you can work your magic try { dynamic_cast<...> } here?
Sure, that should be easy. I'll look at it tomorrow.
--
Martin
References