← Back to team overview

dolfin team mailing list archive

Save the solutions in a matrix

 

Hello,

I am trying to solve a problem with different parameters; I am having a
loop and each time I am getting a solution vector (say Function u1) and
I need to save each vector as a column of an arbitrary matrix in dolfin
(say Matrix S). I would appreciate if you let me know how it is
possible. I tried the following scheme:

Loop over i:

Matrix S;
d=u1.vector();

for(j)
{  
  S(i,j)=d(j);
{

But it is not going to work! any help on this matter is appreciated.


Hatef:)



Follow ups