Zoltan2
|
A simple class that can be the User template argument for an InputAdapter. More...
#include <Zoltan2_InputTraits.hpp>
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::BasicVectorAdapter object and you use \c float for vector values in your application, \c long for global identifiers, and \c 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 \c unsigned \c long for its global Identifiers. Then you would do the following:
In particular, the BasicUserTypes template parameters are:
scalar
is the data type for element values, weights and coordinates. lno
(local number) is the integral data type used by the application and by Zoltan2 for local indices and local counts. gno
(global number) is the integral data type used by the application and Zoltan2 to represent global identifiers and global counts. Definition at line 104 of file Zoltan2_InputTraits.hpp.