[Trilinos-Users] Trilinos 10.0: Tpetra issues
nico.schloemer at ua.ac.be
Tue Oct 6 14:42:58 MDT 2009
two (short?) questions on Tpetra on Trilinos 10.0 here:
I'm just modifying the code from using 10.0 rather than the June alpha release, and it seems that for Tpetra::MultiVector's the handy  operators have disappeared; same thing for Tpetra::Vector's.
How can I access elements now? I understand that getVector(k) returns the kth vector, but then I'm stuck.
What I try to do is merely print the contents of one vector in its full glory to std::cout, would there possibly be a smarter way to do so than to loop over the the vector's components?
Second, I can't seem to get going with Tpetra::Vector easily. Something that fails to compile is
Tpetra::Vector<double,int> w = Tpetra::Vector<double,int>( myMap );
w.replaceGlobalValue( 0, 0.333 );
======================= *snip* =======================
/usr/local/trilinos/10.0/include/Tpetra_Vector.hpp: In member function 'void Tpetra::Vector<S, LO, GO, N>::replaceGlobalValue(GlobalOrdinal, const Scalar&) [with Scalar = double, LocalOrdinal = int, GlobalOrdinal = int, Node = Kokkos::SerialNode]':
tpetraTest.cpp:25: instantiated from here
/usr/local/trilinos/10.0/include/Tpetra_Vector.hpp:67: error: no matching function for call to 'Tpetra::Vector<double, int, int, Kokkos::SerialNode>::replaceGlobalValue(int&, int, const double&)'
/usr/local/trilinos/10.0/include/Tpetra_Vector.hpp:66: note: candidates are: void Tpetra::Vector<S, LO, GO, N>::replaceGlobalValue(GlobalOrdinal, const Scalar&) [with Scalar = double, LocalOrdinal = int, GlobalOrdinal = int, Node = Kokkos::SerialNode]
make: *** [tpetraTest.o] Error 1
======================= *snap* =======================
(where myMap is of course previously defined), and I totally don't understand why. Replacing the Tpetra::Vector's by regular Tpetra::MultiVector's (with one component) can be used as a work-around for that, though.
Any help appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Trilinos-Users