[Trilinos-Users] Tpetra for objects

Baker, Christopher G. bakercg at ornl.gov
Sat Oct 2 13:09:58 MDT 2010


Hello Qiyang,

For most simple data classes (those containing values and no pointers), this is the case. It is done by specializing SerializationTraits from DirectSerializationTraits. An example of this is in the file
packages/tpetra/src/Tpetra_CrsMatrix_decl.hpp
where I add communication support for a custom type for CRS triplets.

What type of object are you considering templating on?

Chris


On 10/1/10 6:32 PM, "Qiyang Hu" <huqy2000 at gmail.com> wrote:

Hello,

I am trying to use Tpetra::MultiVector to serve as a distributed container for self-defined objects. According to the document, any data type can be used so long as it implements Teuchos::ScalarTraits and Teuchos::SerializationTraits. It seems obvious to me for ScalarTraits. But I failed to implement SerializationTraits. Is there any example code that I can get some hints on it? Thanks so much in advance!

BTW, I found the Didasko package has a couple of examples with template specialization of Teuchos::ScalarTraits and Tpetra::MpiTraits for objects. Is that MpiTraits outdated in Trilinos 10.4?

Best wishes,
Qiyang







More information about the Trilinos-Users mailing list