Zoltan2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Zoltan2::BasicUserTypes< scalar, 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 = default_scalar_t, typename lno = default_lno_t, typename gno = default_gno_t>
class Zoltan2::BasicUserTypes< scalar, 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::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:
typedef BasicUserTypes<float, long, int, unsigned long> myTypes;
Zoltan2::BasicVectorAdapter<myTypes> myInput({constructor arguments})

In particular, the BasicUserTypes template parameters are:

Examples:
block.cpp, kokkosBlock.cpp, and rcb_C.cpp.

Definition at line 139 of file Zoltan2_InputTraits.hpp.


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