[Trilinos-Users] matrix/vector recipes?

Nico Schlömer nico.schloemer at ua.ac.be
Thu Jan 21 09:26:39 MST 2010


Hi,

I recently implemented a function that takes a Tpetra::RowMatrix A, two
vectors b,c and a scalar d as input, and spits out the padded matrix ~A

    A b
    c  d

Despite the fact that this might actually be something that "you don't
want to do", it's also something that seems trivial if you come from
Python, MATLAB and the like, but due to Trilinos' sophisticated memory
management is principally requires quite a number of lines of code to be
written (potentially containing bugs).

During everyday programming, I sometimes stumble upon things that are
trivial to describe but not quickly realizable with Trilinos. Take for
example the addition of two Tpetra::Vectors.

Now, is there any place where recipes for simple matrix/vector
operations and other useful snippets are exchanged?

For the particular example above, what I'm doing right now is that I
*copy* over the values of A, b, and c to ~A, which I'd like to avoid.
Any hints here?

Cheers,
Nico



More information about the Trilinos-Users mailing list