Zoltan 2 Version 0.5
Zoltan2::BasicUserTypes< scalar, gid, lno, gno > Class Template Reference

A simple class that can be the User template argument for an InputAdapter. More...

#include <Zoltan2_InputTraits.hpp>

Detailed Description

template<typename scalar, typename gid, typename lno, typename gno>
class Zoltan2::BasicUserTypes< scalar, gid, lno, gno >

A simple class that can be the User template argument for an InputAdapter.

BasicUserTypes is a convenience class that provides a simple way to supply the template argument when constructing an InputAdapter.

Typically, a C++ user will have a templated or non-templated class that represents his or her input data. He or she will create an InputTraits specialization for this class, and then supply that as the template argument of the InputAdapter class. (Commonly used Trilinos classes that represent vectors, graphs and matrices already have InputTraits specializations.)

This makes sense if you are a C++ programmer who uses templates, but is a great deal of trouble if you are not. In this case you can construct your InputAdapter as follows.

Suppose you want to construct a Zoltan2::BasicVectorInput object and you use float for vector values in your application, long for global identifiers, and int for local indices.

You need to determine an integral data type that Zoltan2 can use internally for global identifiers. Often this is the same data type that you use for this purpose, but if you have non-integral global identifiers (such as pair<int, int>) then Zoltan2 needs you to supply an integral data type that is large enough to globally enumerate your objects. In this example let's say that you want Zoltan2 to use unsigned long for its global Identifiers. Then you would do the following:

   typedef BasicUserTypes<float, long, int, unsigned long> myTypes;
   Zoltan2::BasicVectorInput<myTypes> myInput({constructor arguments})

In particular, the BasicUserTypes template parameters are:


block.cpp, and rcb_C.cpp.

Definition at line 132 of file Zoltan2_InputTraits.hpp.

The documentation for this class was generated from the following file: