dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #10050
GenericVector vs Vector.
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:ndl@xxxxxxxxxxxxxx (FCUL/CMAF)
nlopes@xxxxxxxxxxxxxxx (ISEL)
http://ptmat.ptmat.fc.ul.pt/%7Endl/
Thu Oct 9 11:33:47 WEST 2008
Attachment:
signature.asc
Description: This is a digitally signed message part.
Follow ups