[Trilinos-Users] Bug on Epetra_Vector NumVectors
Sunghwan Choi
sunghwanchoi91 at gmail.com
Tue Aug 19 19:12:56 MDT 2014
Dear All,
I found a bug on calculating NumVectors.
this->comp_charge is declared as Teuchos::RCP<Epetra_MultiVector> . This
function is set to get comp_charge but not just get comp_charge but get
summation via the rows of Epetra_MultiVector.
for tests, I just set the NumVectors of this->comp_charge as 1. The problem
is that when I calculate the
int Filter::get_comp_charge(Teuchos::RCP<Epetra_Vector>& comp_charge){
comp_charge->PutScalar(0.0);
cout << comp_charge->NumVectors() <<endl; // print 1
cout << this->comp_charge->operator()(0)->NumVectors() <<endl;
//print 0 why? I think this should be 1 because Epetra_Vecotr->NumVectors
should always be 1
cout << this->comp_charge->NumVectors() <<endl; //print 1
cout << *this->comp_charge <<endl; // print all values on the
multivector
return 0;
}
The question is on the bolded line. Operator() return Epetra_Vector* . and I
think the NumVectors of Epetra_Vector should be 1 but it gives 0
How can I deal this problem?
Best
Sunghwan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20140820/576777ab/attachment.html>
More information about the Trilinos-Users
mailing list