ARudik / feelpp

Automatically exported from code.google.com/p/feelpp
0 stars 0 forks source link

use multVector directly with element_type #57

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently if we have u, A and res defined as :

element_ptrtype u = Xh->elementPtr( Xh );
vector_ptrtype res ( backend->newVector( Xh ) ); 
sparse_matrix_ptrtype A ( backend->newMatrix( Xh , Xh ) );

If we want to call multVector correctly we need to use the vector TMP like this 
:
vector_ptrtype TMP ( backend->newVector( Xh ) );
*TMP=*u;
A->multVector( TMP, res );

If we use directly A->multVector( u , res ) then the assertion ( V != 0 ) from 
function addVector ( in vectorpetsc.hpp ) is not verified.

Would it not be more user-friendly to write A->multVector( u , res ) ? Instead 
of using TMP ...

Original issue reported on code.google.com by stephane...@gmail.com on 7 Dec 2012 at 5:18

GoogleCodeExporter commented 9 years ago

Original comment by christop...@feelpp.org on 7 Dec 2012 at 8:21