dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #06434
Re: loading petsc vectors
On Fri, Mar 07, 2008 at 03:46:21PM -0500, Gideon Simpson wrote:
> If I have separately solved a boundary value problem and now want to
> load the petsc vector containing the solution into dolfin, how would I
> insert it into a dolfin vector?
>
> -gideon
The following should work:
Vec v;
// then do PETSc stuff with v
PETScVector x(v);
or
PETScVector x;
Vec v = x.vec();
// then do PETSc stuff with v
--
Anders
References