Zoltan2
Toggle main menu visibility
Loading...
Searching...
No Matches
Zoltan2_Model.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Zoltan2: A package of combinatorial algorithms for scientific computing
4
//
5
// Copyright 2012 NTESS and the Zoltan2 contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
13
14
#ifndef _ZOLTAN2_MODEL_HPP_
15
#define _ZOLTAN2_MODEL_HPP_
16
17
#include <
Zoltan2_Standards.hpp
>
18
#include <bitset>
19
20
namespace
Zoltan2
{
21
24
enum
ModelType
25
{
26
HypergraphModelType
,
27
GraphModelType
,
28
CoordinateModelType
,
29
IdentifierModelType
,
30
MAX_NUM_MODEL_TYPES
31
};
32
33
34
38
enum
ModelFlags
{
39
// General flags
40
GENERATE_CONSECUTIVE_IDS
,
41
42
// Graph model flags
43
BUILD_LOCAL_GRAPH
,
44
SYMMETRIZE_INPUT_TRANSPOSE
,
45
SYMMETRIZE_INPUT_BIPARTITE
,
46
VERTICES_ARE_MATRIX_ROWS
,
47
VERTICES_ARE_MATRIX_COLUMNS
,
48
VERTICES_ARE_MATRIX_NONZEROS
,
49
VERTICES_ARE_MESH_NODES
,
50
VERTICES_ARE_MESH_ELEMENTS
,
51
REMOVE_SELF_EDGES
,
52
BUILD_SUBSET_GRAPH
,
53
54
NUM_MODEL_FLAGS
55
};
56
57
typedef
std::bitset<NUM_MODEL_FLAGS>
modelFlag_t
;
58
72
73
template
<
typename
Adapter>
74
class
Model
75
{
76
public
:
77
78
#ifndef DOXYGEN_SHOULD_SKIP_THIS
79
typedef
typename
Adapter::lno_t
lno_t
;
80
typedef
typename
Adapter::gno_t
gno_t
;
81
typedef
typename
Adapter::scalar_t
scalar_t
;
82
typedef
typename
Adapter::user_t
user_t
;
83
typedef
typename
Adapter::userCoord_t userCoord_t;
84
#endif
85
88
virtual
~Model
() {};
89
92
Model
() {}
93
100
virtual
size_t
getLocalNumObjects
()
const
= 0;
101
108
virtual
global_size_t
getGlobalNumObjects
()
const
= 0;
109
110
protected
:
111
112
private
:
113
114
};
115
116
}
// namespace Zoltan2
117
118
#endif
user_t
Zoltan2::BasicUserTypes< zscalar_t, zlno_t, zgno_t > user_t
Definition
Metric.cpp:39
Zoltan2_Standards.hpp
Gathering definitions used in software development.
Zoltan2::Model::~Model
virtual ~Model()
Definition
Zoltan2_Model.hpp:88
Zoltan2::Model::getLocalNumObjects
virtual size_t getLocalNumObjects() const =0
Return the local number of objects.
Zoltan2::Model::Model
Model()
Definition
Zoltan2_Model.hpp:92
Zoltan2::Model::getGlobalNumObjects
virtual global_size_t getGlobalNumObjects() const =0
Return the global number of objects.
Zoltan2
Created by mbenlioglu on Aug 31, 2020.
Definition
Zoltan2_AlgHybrid2GL.hpp:47
Zoltan2::global_size_t
Tpetra::global_size_t global_size_t
Definition
Zoltan2_Standards.hpp:83
Zoltan2::modelFlag_t
std::bitset< NUM_MODEL_FLAGS > modelFlag_t
Definition
Zoltan2_Model.hpp:57
Zoltan2::ModelType
ModelType
An identifier for the general type of model.
Definition
Zoltan2_Model.hpp:25
Zoltan2::IdentifierModelType
@ IdentifierModelType
Definition
Zoltan2_Model.hpp:29
Zoltan2::MAX_NUM_MODEL_TYPES
@ MAX_NUM_MODEL_TYPES
Definition
Zoltan2_Model.hpp:30
Zoltan2::HypergraphModelType
@ HypergraphModelType
Definition
Zoltan2_Model.hpp:26
Zoltan2::GraphModelType
@ GraphModelType
Definition
Zoltan2_Model.hpp:27
Zoltan2::CoordinateModelType
@ CoordinateModelType
Definition
Zoltan2_Model.hpp:28
Zoltan2::ModelFlags
ModelFlags
Flags are set by a Problem to tell a Model what transformations it may need to do on the user's input...
Definition
Zoltan2_Model.hpp:38
Zoltan2::VERTICES_ARE_MATRIX_ROWS
@ VERTICES_ARE_MATRIX_ROWS
use matrix rows as graph vertices
Definition
Zoltan2_Model.hpp:46
Zoltan2::VERTICES_ARE_MESH_ELEMENTS
@ VERTICES_ARE_MESH_ELEMENTS
use mesh elements as vertices
Definition
Zoltan2_Model.hpp:50
Zoltan2::BUILD_SUBSET_GRAPH
@ BUILD_SUBSET_GRAPH
ignore invalid neighbors
Definition
Zoltan2_Model.hpp:52
Zoltan2::GENERATE_CONSECUTIVE_IDS
@ GENERATE_CONSECUTIVE_IDS
algorithm requires consecutive ids
Definition
Zoltan2_Model.hpp:40
Zoltan2::SYMMETRIZE_INPUT_TRANSPOSE
@ SYMMETRIZE_INPUT_TRANSPOSE
model must symmetrize input
Definition
Zoltan2_Model.hpp:44
Zoltan2::SYMMETRIZE_INPUT_BIPARTITE
@ SYMMETRIZE_INPUT_BIPARTITE
model must symmetrize input
Definition
Zoltan2_Model.hpp:45
Zoltan2::NUM_MODEL_FLAGS
@ NUM_MODEL_FLAGS
Definition
Zoltan2_Model.hpp:54
Zoltan2::REMOVE_SELF_EDGES
@ REMOVE_SELF_EDGES
algorithm requires no self edges
Definition
Zoltan2_Model.hpp:51
Zoltan2::VERTICES_ARE_MESH_NODES
@ VERTICES_ARE_MESH_NODES
use mesh nodes as vertices
Definition
Zoltan2_Model.hpp:49
Zoltan2::VERTICES_ARE_MATRIX_COLUMNS
@ VERTICES_ARE_MATRIX_COLUMNS
use columns as graph vertices
Definition
Zoltan2_Model.hpp:47
Zoltan2::VERTICES_ARE_MATRIX_NONZEROS
@ VERTICES_ARE_MATRIX_NONZEROS
use nonzeros as graph vertices
Definition
Zoltan2_Model.hpp:48
Zoltan2::BUILD_LOCAL_GRAPH
@ BUILD_LOCAL_GRAPH
model represents graph within only one rank
Definition
Zoltan2_Model.hpp:43
Zoltan2::lno_t
core
src
models
Zoltan2_Model.hpp
Generated by
1.17.0