[Trilinos-Users] Matrix-vector product
Heroux, Mike
MHeroux at csbsju.edu
Wed Aug 21 08:03:28 MDT 2013
If I understand your question, you should be able to accomplish this by passing in the map of the replicated x and b vectors to fillComplete. Then the apply operator will not do an import from off-processor (since it has all values of x) but it will do an export of b (assuming the matrix is distributed) so that the values of b are correct.
Generally speaking, these approaches tend to be suboptimal, but not always.
Mike
From: Fan YE <yefanhust at gmail.com<mailto:yefanhust at gmail.com>>
Date: Wednesday, August 21, 2013 5:27 AM
To: "trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>" <trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>>
Subject: [Trilinos-Users] Matrix-vector product
Hello,
I've a question about the product of a distributed object with a locally replicated object.
Here's the thing.
Given a Tpetra::CrsMatrix A distributed over processes, in general case one defines a Tpetra::Vector x and b in such manner:
Tpetra::Vector<....> x(A.getDomainMap);
Tpetra::Vector<....> b(A.getRangeMap);
to enable this operation:
A.apply(x. b);
However for some reason, I'd like the x and even b to be locally replicated. How should I do to accomplish the spmv of A*x so as to minimize the communication?
Thanks a lot for any possible comments.
Best regards,
Fan
More information about the Trilinos-Users
mailing list