Tpetra parallel linear algebra
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
core
src
Tpetra_Exceptions_decl.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_EXCEPTIONS_DECL_HPP
11
#define TPETRA_EXCEPTIONS_DECL_HPP
12
13
#include <Tpetra_ConfigDefs.hpp>
14
#include <stdexcept>
15
16
namespace
Tpetra
{
17
35
40
namespace
Details
{
41
47
template
<
class
GlobalOrdinal>
48
class
InvalidGlobalIndex
:
public
std::domain_error {
49
public
:
54
InvalidGlobalIndex
(
const
std::string& msg,
const
GlobalOrdinal globalIndex)
55
: std::domain_error(msg)
56
, glInd_(globalIndex) {}
57
59
GlobalOrdinal
offendingIndex
()
const
{
return
glInd_; }
60
61
private
:
63
const
GlobalOrdinal glInd_;
64
};
65
71
template
<
class
GlobalOrdinal>
72
class
InvalidGlobalRowIndex
:
public
InvalidGlobalIndex
<GlobalOrdinal> {
73
public
:
78
InvalidGlobalRowIndex
(
const
std::string& msg,
const
GlobalOrdinal globalIndex)
79
:
InvalidGlobalIndex
<GlobalOrdinal>(msg, globalIndex) {}
80
};
81
82
}
// namespace Details
83
}
// namespace Tpetra
84
85
#endif
// TPETRA_EXCEPTIONS_DECL_HPP
Tpetra::Details::InvalidGlobalIndex::InvalidGlobalIndex
InvalidGlobalIndex(const std::string &msg, const GlobalOrdinal globalIndex)
Constructor.
Definition
Tpetra_Exceptions_decl.hpp:54
Tpetra::Details::InvalidGlobalIndex::offendingIndex
GlobalOrdinal offendingIndex() const
The offending global index.
Definition
Tpetra_Exceptions_decl.hpp:59
Tpetra::Details::InvalidGlobalRowIndex::InvalidGlobalRowIndex
InvalidGlobalRowIndex(const std::string &msg, const GlobalOrdinal globalIndex)
Constructor.
Definition
Tpetra_Exceptions_decl.hpp:78
Details
Implementation details of Tpetra.
Tpetra
Namespace Tpetra contains the class and methods constituting the Tpetra library.
Generated by
1.17.0