Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
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
16namespace Tpetra {
17
35
40namespace Details {
41
47template <class GlobalOrdinal>
48class InvalidGlobalIndex : public std::domain_error {
49 public:
55 : std::domain_error(msg)
56 , glInd_(globalIndex) {}
57
59 GlobalOrdinal offendingIndex() const { return glInd_; }
60
61 private:
63 const GlobalOrdinal glInd_;
64};
65
71template <class GlobalOrdinal>
72class InvalidGlobalRowIndex : public InvalidGlobalIndex<GlobalOrdinal> {
73 public:
80};
81
82} // namespace Details
83} // namespace Tpetra
84
85#endif // TPETRA_EXCEPTIONS_DECL_HPP
Struct that holds views of the contents of a CrsMatrix.
Exception thrown by CrsMatrix on invalid global index.
InvalidGlobalIndex(const std::string &msg, const GlobalOrdinal globalIndex)
Constructor.
GlobalOrdinal offendingIndex() const
The offending global index.
Exception thrown by CrsMatrix on invalid global row index.
InvalidGlobalRowIndex(const std::string &msg, const GlobalOrdinal globalIndex)
Constructor.
Implementation details of Tpetra.
Namespace Tpetra contains the class and methods constituting the Tpetra library.