|
Tpetra Matrix/Vector Services Version of the Day
|
00001 //@HEADER 00002 // ************************************************************************ 00003 // 00004 // Tpetra: Templated Linear Algebra Services Package 00005 // Copyright (2008) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 // USA 00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00025 // 00026 // ************************************************************************ 00027 //@HEADER 00028 00029 #ifndef TPETRA_ROWGRAPH_HPP 00030 #define TPETRA_ROWGRAPH_HPP 00031 00032 #include <Teuchos_Describable.hpp> 00033 #include <Kokkos_DefaultNode.hpp> 00034 00035 #include "Tpetra_ConfigDefs.hpp" 00036 #include "Tpetra_Map.hpp" 00037 #include "Tpetra_Import.hpp" 00038 #include "Tpetra_Export.hpp" 00039 00040 namespace Tpetra 00041 { 00042 00044 00050 template <class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType> 00051 class RowGraph : virtual public Teuchos::Describable { 00052 public: 00054 00055 00057 virtual ~RowGraph(); 00058 00060 00062 00063 00065 virtual const Teuchos::RCP<const Teuchos::Comm<int> > & getComm() const = 0; 00066 00068 virtual Teuchos::RCP<Node> getNode() const = 0; 00069 00071 virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getRowMap() const = 0; 00072 00074 virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getColMap() const = 0; 00075 00077 virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getDomainMap() const = 0; 00078 00080 virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getRangeMap() const = 0; 00081 00083 virtual Teuchos::RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > getImporter() const = 0; 00084 00086 virtual Teuchos::RCP<const Export<LocalOrdinal,GlobalOrdinal,Node> > getExporter() const = 0; 00087 00089 virtual global_size_t getGlobalNumRows() const = 0; 00090 00092 virtual global_size_t getGlobalNumCols() const = 0; 00093 00095 virtual size_t getNodeNumRows() const = 0; 00096 00098 virtual size_t getNodeNumCols() const = 0; 00099 00101 virtual GlobalOrdinal getIndexBase() const = 0; 00102 00104 virtual global_size_t getGlobalNumEntries() const = 0; 00105 00107 virtual size_t getNodeNumEntries() const = 0; 00108 00110 00111 virtual size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const = 0; 00112 00114 00115 virtual size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const = 0; 00116 00118 virtual global_size_t getGlobalNumDiags() const = 0; 00119 00121 virtual size_t getNodeNumDiags() const = 0; 00122 00124 virtual size_t getGlobalMaxNumRowEntries() const = 0; 00125 00127 virtual size_t getNodeMaxNumRowEntries() const = 0; 00128 00130 virtual bool hasColMap() const = 0; 00131 00133 virtual bool isLowerTriangular() const = 0; 00134 00136 virtual bool isUpperTriangular() const = 0; 00137 00139 virtual bool isLocallyIndexed() const = 0; 00140 00142 virtual bool isGloballyIndexed() const = 0; 00143 00145 virtual bool isFillComplete() const = 0; 00146 00148 00150 00151 00153 00162 virtual void getGlobalRowCopy(GlobalOrdinal GlobalRow, 00163 const Teuchos::ArrayView<GlobalOrdinal> &Indices, 00164 size_t &NumIndices) const = 0; 00165 00167 00176 virtual void getLocalRowCopy(LocalOrdinal LocalRow, 00177 const Teuchos::ArrayView<LocalOrdinal> &Indices, 00178 size_t &NumIndices) const = 0; 00179 00181 00188 TPETRA_DEPRECATED virtual Teuchos::ArrayRCP<const GlobalOrdinal> getGlobalRowView(GlobalOrdinal GlobalRow) const = 0; 00189 00191 00198 TPETRA_DEPRECATED virtual Teuchos::ArrayRCP<const LocalOrdinal> getLocalRowView(LocalOrdinal LocalRow) const = 0; 00199 00201 00202 }; // class RowGraph 00203 00204 template <class LocalOrdinal, class GlobalOrdinal, class Node> 00205 RowGraph<LocalOrdinal,GlobalOrdinal,Node>::~RowGraph() { 00206 } 00207 00208 00209 } // namespace Tpetra 00210 00211 #endif
1.7.4