Tpetra parallel linear algebra
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
core
src
Tpetra_TieBreak.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Tpetra: Templated Linear Algebra Services Package
4
//
5
// Copyright 2008 NTESS and the Tpetra contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef TPETRA_DETAILS_TIEBREAK_HPP
11
#define TPETRA_DETAILS_TIEBREAK_HPP
12
15
16
#include "
Tpetra_TieBreak_fwd.hpp
"
17
#include "Teuchos_RCP.hpp"
18
#include <utility>
19
#include <vector>
20
21
namespace
Tpetra
{
22
namespace
Details
{
23
37
template
<
typename
LocalOrdinal,
typename
GlobalOrdinal>
38
class
TieBreak
{
39
public
:
53
struct
Triplet
{
54
LocalOrdinal LID;
55
GlobalOrdinal GID;
56
int
PID;
57
};
58
68
virtual
bool
mayHaveSideEffects
()
const
{
69
return
true
;
70
}
71
73
virtual
~TieBreak
() =
default
;
74
95
virtual
std::size_t
96
selectedIndex
(GlobalOrdinal GID,
97
const
std::vector<std::pair<int, LocalOrdinal> >& pid_and_lid)
const
= 0;
98
};
99
100
}
// namespace Details
101
}
// namespace Tpetra
102
103
#endif
// TPETRA_DETAILS_TIEBREAK_HPP
Tpetra_TieBreak_fwd.hpp
Forward declaration for Tpetra::TieBreak.
Tpetra::Details::TieBreak
Interface for breaking ties in ownership.
Definition
Tpetra_TieBreak.hpp:38
Tpetra::Details::TieBreak::~TieBreak
virtual ~TieBreak()=default
Virtual destructor (for memory safety of derived classes).
Tpetra::Details::TieBreak::mayHaveSideEffects
virtual bool mayHaveSideEffects() const
Whether selectedIndex() may have side effects.
Definition
Tpetra_TieBreak.hpp:68
Tpetra::Details::TieBreak::selectedIndex
virtual std::size_t selectedIndex(GlobalOrdinal GID, const std::vector< std::pair< int, LocalOrdinal > > &pid_and_lid) const =0
Break any ties in ownership of the given global index GID.
Tpetra::Details
Nonmember function that computes a residual Computes R = B - A * X.
Definition
Tpetra_KokkosRefactor_Details_MultiVectorLocalDeepCopy.hpp:17
Tpetra
Namespace Tpetra contains the class and methods constituting the Tpetra library.
Tpetra::Details::TieBreak::Triplet
Representation of a global index on a process.
Definition
Tpetra_TieBreak.hpp:53
Generated by
1.17.0