Zoltan2
Loading...
Searching...
No Matches
Zoltan2_Typedefs.hpp
Go to the documentation of this file.
1// @HEADER
2//
3// ***********************************************************************
4//
5// Zoltan2: A package of combinatorial algorithms for scientific computing
6// Copyright 2012 Sandia Corporation
7//
8// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9// the U.S. Government retains certain rights in this software.
10//
11// Redistribution and use in source and binary forms, with or without
12// modification, are permitted provided that the following conditions are
13// met:
14//
15// 1. Redistributions of source code must retain the above copyright
16// notice, this list of conditions and the following disclaimer.
17//
18// 2. Redistributions in binary form must reproduce the above copyright
19// notice, this list of conditions and the following disclaimer in the
20// documentation and/or other materials provided with the distribution.
21//
22// 3. Neither the name of the Corporation nor the names of the
23// contributors may be used to endorse or promote products derived from
24// this software without specific prior written permission.
25//
26// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37//
38// Questions? Contact Karen Devine (kddevin@sandia.gov)
39// Erik Boman (egboman@sandia.gov)
40// Siva Rajamanickam (srajama@sandia.gov)
41//
42// ***********************************************************************
43//
44// @HEADER
45
49
50#ifndef ZOLTAN2_TYPEDEFS
51#define ZOLTAN2_TYPEDEFS
52
54#include <Tpetra_MultiVector.hpp>
55#include <Tpetra_Vector.hpp>
56#include <Tpetra_CrsMatrix.hpp>
58//#include <Tpetra_Map.hpp>
59//#include <Xpetra_Vector_decl.hpp>
60//#include <Xpetra_CrsMatrix_decl.hpp>
61//#include <Xpetra_CrsGraph_decl.hpp>
62//
67//
69//#include "GeometricGenerator.hpp"
70
71// Forward declaration for classes in the Tpetra namespace
72// namespace Tpetra {
73//
74// template<typename T1, typename T2, typename T3, typename T4, const bool T5>
75// class CrsMatrix;
76//
77// template<typename T1, typename T2, typename T3, const bool T4>
78// class CrsGraph;
79//
80// template<typename T1, typename T2, typename T3, typename T4, const bool T5>
81// class Vector;
82//
83// template<typename T1, typename T2, typename T3, typename T4, const bool T5>
84// class MultiVector;
85// }
86//
87// // Forward declaration for classes in the Xpetra namespace
88// namespace Xpetra {
89//
90// template<typename T1, typename T2, typename T3, typename T4>
91// class CrsMatrix;
92//
93// template<typename T1, typename T2, typename T3>
94// class CrsGraph;
95//
96// template<typename T1, typename T2, typename T3, typename T4>
97// class Vector;
98//
99// template<typename T1, typename T2, typename T3, typename T4>
100// class MultiVector;
101// }
102
103 // Forward declaration for classes in the GeometricGen namespace
104 namespace GeometricGen {
105 template<typename T1, typename T2, typename T3, typename T4>
106 class GeometricGenerator;
107 }
108
109// Forward declaration of classes in the Zoltan2 namespace
110 namespace Zoltan2 {
111 template<typename T1, typename T2, typename T3, typename T4>
112 class BasicUserTypes;
113
114 template<typename T1>
115 class BaseAdapter;
116
117 template<typename T1>
119
120 template<typename T1>
122
123 template<typename T1, typename T2>
125
126 template<typename T1, typename T2>
128
129 template<typename T1>
130 class BasicVectorAdapter;
131
132 #ifdef HAVE_ZOLTAN2_PAMGEN
133 template<typename T1>
134 class PamgenMeshAdapter;
135 #endif
136
137 template<typename T1>
138 class Problem;
139
140 template<typename T1>
142
143 template<typename T1>
144 class OrderingProblem;
145
146 template<typename T1>
147 class ColoringProblem;
148 }
149
150namespace Zoltan2_TestingFramework {
151
152 // Data types
153 typedef Tpetra::CrsMatrix<zscalar_t, zlno_t, zgno_t, znode_t> tcrsMatrix_t;
154 typedef Tpetra::CrsGraph<zlno_t, zgno_t, znode_t> tcrsGraph_t;
155 typedef Tpetra::Vector<zscalar_t, zlno_t, zgno_t, znode_t> tVector_t;
156 typedef Tpetra::MultiVector<zscalar_t, zlno_t, zgno_t, znode_t> tMVector_t;
157
158 typedef Xpetra::CrsMatrix<zscalar_t, zlno_t, zgno_t, znode_t> xcrsMatrix_t;
159 typedef Xpetra::CrsGraph<zlno_t, zgno_t, znode_t> xcrsGraph_t;
160 typedef Xpetra::Vector<zscalar_t, zlno_t, zgno_t, znode_t> xVector_t;
161 typedef Xpetra::MultiVector<zscalar_t, zlno_t, zgno_t, znode_t> xMVector_t;
162
165
166 // Adapter types
170
174
178
179#ifdef HAVE_EPETRA_DATA_TYPES
183#else // temp compiler issues - dummy place holders
187#endif
188
190
191#ifdef HAVE_ZOLTAN2_PAMGEN
193#else
194 // This typedef exists only to satisfy the compiler.
195 // PamgenMeshAdapter cannot be used when Trilinos is not built with Pamgen
197#endif
198
199// when test objects are created they set an enum to define the adapter type
200// then when used they can be cast to that type safely using Z2_TEST_UPCAST
215
216#define Z2_TEST_UPCAST(adptr, TEMPLATE_ACTION) \
217switch(adptr) { \
218 case AT_basic_id_t: {TEMPLATE_ACTION(basic_id_t)} break; \
219 case AT_xMV_tMV_t: {TEMPLATE_ACTION(xMV_tMV_t)} break; \
220 case AT_xMV_xMV_t: {TEMPLATE_ACTION(xMV_xMV_t)} break; \
221 case AT_xMV_eMV_t: {TEMPLATE_ACTION(xMV_eMV_t)} break; \
222 case AT_xCG_tCG_t: {TEMPLATE_ACTION(xCG_tCG_t)} break; \
223 case AT_xCG_xCG_t: {TEMPLATE_ACTION(xCG_xCG_t)} break; \
224 case AT_xCG_eCG_t: {TEMPLATE_ACTION(xCG_eCG_t)} break; \
225 case AT_xCM_tCM_t: {TEMPLATE_ACTION(xCM_tCM_t)} break; \
226 case AT_xCM_xCM_t: {TEMPLATE_ACTION(xCM_xCM_t)} break; \
227 case AT_xCM_eCM_t: {TEMPLATE_ACTION(xCM_eCM_t)} break; \
228 case AT_basic_vector_adapter: {TEMPLATE_ACTION(basic_vector_adapter)} break; \
229 case AT_pamgen_adapter_t: {TEMPLATE_ACTION(pamgen_adapter_t)} break; \
230 default: throw std::logic_error( "Bad Z2_TEST_UPCAST" ); \
231};
232
233#define Z2_TEST_UPCAST_COORDS(adptr, TEMPLATE_ACTION) \
234switch(adptr) { \
235 case AT_xMV_tMV_t: {TEMPLATE_ACTION(xMV_tMV_t)} break; \
236 default: throw std::logic_error( "Bad Z2_TEST_UPCAST_COORDINATES" ); \
237};
238
239} // namespace Zoltan2_TestingFramework
240
241#endif // ZOLTAN2_TYPEDEFS
Base class for the EvaluatePartition and EvaluateOrdering classes.
common code used by tests
This class represents a collection of global Identifiers and their associated weights,...
A simple class that can be the User template argument for an InputAdapter.
BasicVectorAdapter represents a vector (plus optional weights) supplied by the user as pointers to st...
ColoringProblem sets up coloring problems for the user.
OrderingProblem sets up ordering problems for the user.
This class represents a mesh.
PartitioningProblem sets up partitioning problems for the user.
Problem base class from which other classes (PartitioningProblem, ColoringProblem,...
Provides access for Zoltan2 to Xpetra::CrsGraph data.
Provides access for Zoltan2 to Xpetra::CrsMatrix data.
Zoltan2::BasicVectorAdapter< tMVector_t > xCG_eCG_t
Zoltan2::XpetraCrsMatrixAdapter< tcrsMatrix_t, tMVector_t > xCM_tCM_t
Zoltan2::XpetraMultiVectorAdapter< tMVector_t > xMV_tMV_t
Zoltan2::XpetraCrsMatrixAdapter< xcrsMatrix_t, tMVector_t > xCM_xCM_t
Zoltan2::BasicVectorAdapter< userTypes_t > pamgen_adapter_t
Xpetra::CrsMatrix< zscalar_t, zlno_t, zgno_t, znode_t > xcrsMatrix_t
Zoltan2::XpetraMultiVectorAdapter< xMVector_t > xMV_xMV_t
Xpetra::CrsGraph< zlno_t, zgno_t, znode_t > xcrsGraph_t
GeometricGen::GeometricGenerator< zscalar_t, zlno_t, zgno_t, znode_t > geometricgen_t
Zoltan2::XpetraCrsGraphAdapter< tcrsGraph_t, tMVector_t > xCG_tCG_t
Tpetra::CrsMatrix< zscalar_t, zlno_t, zgno_t, znode_t > tcrsMatrix_t
Zoltan2::BasicVectorAdapter< tMVector_t > xMV_eMV_t
Zoltan2::BasicUserTypes< zscalar_t, zlno_t, zgno_t > userTypes_t
Tpetra::MultiVector< zscalar_t, zlno_t, zgno_t, znode_t > tMVector_t
Zoltan2::BaseAdapter< userTypes_t > base_adapter_t
Tpetra::CrsGraph< zlno_t, zgno_t, znode_t > tcrsGraph_t
Zoltan2::BasicVectorAdapter< tMVector_t > basic_vector_adapter
Xpetra::Vector< zscalar_t, zlno_t, zgno_t, znode_t > xVector_t
Xpetra::MultiVector< zscalar_t, zlno_t, zgno_t, znode_t > xMVector_t
Tpetra::Vector< zscalar_t, zlno_t, zgno_t, znode_t > tVector_t
Zoltan2::XpetraCrsGraphAdapter< xcrsGraph_t, tMVector_t > xCG_xCG_t
Zoltan2::BasicIdentifierAdapter< userTypes_t > basic_id_t
Zoltan2::BasicVectorAdapter< tMVector_t > xCM_eCM_t
Created by mbenlioglu on Aug 31, 2020.