Hi again: I'm trying to update my codes to the new GenericVector/Function interface. So what is the simplest way to relate Vector and GenericVector? (Probably just my ignorance relating with pointers and C++ coding) In the old days one could do things like: ----------------------------------------------- MyBilinearForm a; MyLilinearForm L; Matrix A; assemble(A,a,mesh); Vector x,b; assemble(b,L,mesh); Function u(mesh,x,a); solver.solve(A,x,b); b=x; ----------------------------------------------
Now one should have
-----------------------------------------------
MyBilinearForm a;
MyLilinearForm L;
Matrix A;
assemble(A,a,mesh);
Vector b;
assemble(b,L,mesh);
Function u(mesh,a);
GenericVector& x=u.vector();
solver.solve(A,x,b);
b=x; //does it work???????
----------------------------------------------
does the last line work?
What is the simplest way to assign the values of a funtion/genericvector to a
vector?
Is this part of the ongoing function interface redesign?
thanks
--
Nuno David Lopes
e-mail:[EMAIL PROTECTED] (FCUL/CMAF)
[EMAIL PROTECTED] (ISEL)
http://ptmat.ptmat.fc.ul.pt/%7Endl/
Thu Oct 9 11:33:47 WEST 2008
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
