[Trilinos-Users] Tpetra::Vector: elementwise operations
Nico Schlömer
nico.schloemer at ua.ac.be
Sun Jan 24 06:51:49 MST 2010
Hi,
thinking about Tpetra vectors, I was asking myself if there's any better
way to do elementwise operations (e.g., sqrt(), conj(),...) than what I do
at the moment:
===================== *snip* =====================
Teuchos::ArrayRCP<const double> inVectorView = inVector.get1dView();
for (int k=0; k<NumLocalElements; k++ ) {
int globalIndex = Map->getGlobalElement(k);
outVector->replaceLocalValue( k, 0, inVectorView[globalIndex] );
}
===================== *snap* =====================
As far as I can see, there's no such method as getLocalValue{s}(). Am I
right?
Cheers,
Nico
More information about the Trilinos-Users
mailing list