Zoltan2
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
14#ifndef _ZOLTAN2_MODEL_HPP_
15#define _ZOLTAN2_MODEL_HPP_
16
17#include <Zoltan2_Standards.hpp>
18#include <bitset>
19
20namespace Zoltan2 {
21
32
33
34
56
57typedef std::bitset<NUM_MODEL_FLAGS> modelFlag_t;
58
73template <typename Adapter>
74class Model
75{
76public:
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
109
110protected:
111
112private:
113
114};
115
116} // namespace Zoltan2
117
118#endif
Zoltan2::BasicUserTypes< zscalar_t, zlno_t, zgno_t > user_t
Definition Metric.cpp:39
Gathering definitions used in software development.
The base class for all model classes.
virtual size_t getLocalNumObjects() const =0
Return the local number of objects.
virtual global_size_t getGlobalNumObjects() const =0
Return the global number of objects.
map_t::local_ordinal_type lno_t
map_t::global_ordinal_type gno_t
Created by mbenlioglu on Aug 31, 2020.
Tpetra::global_size_t global_size_t
std::bitset< NUM_MODEL_FLAGS > modelFlag_t
ModelType
An identifier for the general type of model.
@ IdentifierModelType
@ MAX_NUM_MODEL_TYPES
@ HypergraphModelType
@ CoordinateModelType
ModelFlags
Flags are set by a Problem to tell a Model what transformations it may need to do on the user's input...
@ VERTICES_ARE_MATRIX_ROWS
use matrix rows as graph vertices
@ VERTICES_ARE_MESH_ELEMENTS
use mesh elements as vertices
@ BUILD_SUBSET_GRAPH
ignore invalid neighbors
@ GENERATE_CONSECUTIVE_IDS
algorithm requires consecutive ids
@ SYMMETRIZE_INPUT_TRANSPOSE
model must symmetrize input
@ SYMMETRIZE_INPUT_BIPARTITE
model must symmetrize input
@ REMOVE_SELF_EDGES
algorithm requires no self edges
@ VERTICES_ARE_MESH_NODES
use mesh nodes as vertices
@ VERTICES_ARE_MATRIX_COLUMNS
use columns as graph vertices
@ VERTICES_ARE_MATRIX_NONZEROS
use nonzeros as graph vertices
@ BUILD_LOCAL_GRAPH
model represents graph within only one rank