i'm trying to compute inner dot of two computed vector which they are
exactly similar to solution vector obtained in step-8 in tutorial i.e.
each component of this vector have two index (in 2d) .for example if the
ith component of solution vector is :
solution(i) = (4.332 , 2.333) and i want to compute :

It's not quite clear what exactly you mean by that. Certainly the i'th entry of solution can only have one value...


(4.3 , 2.3).(4.3 , 2.3)=23.78
how could i do that or at least how i can access to information in every
index of every component of this vector .

But I think I know what you mean. If you want to compute the value at a particular vertex 'v' of cell 'cell', then this might work
  u_index = cell->vertex_dof_index(v,0);
  v_index = cell->vertex_dof_index(v,1);

  solution(u_index)*solution(u_index) +
      solution(v_index)*solution(v_index);

There are other ways to do that if you need it at other (or all) points. It would help if you told us what you are trying to do!

Best
 W.

------------------------------------------------------------------------
Wolfgang Bangerth               email:            [email protected]
                                www: http://www.math.tamu.edu/~bangerth/

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to