[Trilinos-Users] Epetra_SerialDenseSolver, Solve method.

Bertagna, Luca lbertag at emory.edu
Mon Nov 25 17:46:00 MST 2013


Dear all,

I have a question about Epetra_SerialDenseSolver, in particular about its Solve method.

I am calling Solve after setting as solution vector an Epetra_SerialDenseVector X which is the view of an array Y. However, when the Solve method is performed and the matrix is not inverted, the following piece of code is executed:


    if (B_!=X_) {

       *LHS_ = *RHS_; // Copy B to X if needed

       X_ = LHS_->A(); LDX_ = LHS_->LDA();

    }


This copies the rhs B into the solution vector X, which causes the loss of the view property of the vector X.

I'm having a hard time understanding what's the reason of this implementation choice. After all, if the matrix is already inverted, this copy X => B is not performed (there's even a comment specifying that B and X must be different in that case). And, even more, X and B might even have different dimensions, as far as I understand (otherwise the variable MinMN_ would have no meaning).

Thanks


Luca Bertagna
Math&CS, Emory University, Atlanta
www.mathcs.emory.edu/~lbertag
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20131126/b35d121b/attachment.html 


More information about the Trilinos-Users mailing list