Tpetra Matrix/Vector Services Version of the Day
Tpetra_RowGraph.hpp
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: 
00053       typedef LocalOrdinal  local_ordinal_type;
00054       typedef GlobalOrdinal global_ordinal_type;
00055       typedef Node          node_type;
00056 
00058 
00059 
00061       virtual ~RowGraph();
00062 
00064 
00066 
00067 
00069       virtual const Teuchos::RCP<const Teuchos::Comm<int> > & getComm() const = 0;
00070 
00072       virtual Teuchos::RCP<Node> getNode() const = 0;
00073 
00075       virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getRowMap() const = 0;
00076 
00078       virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getColMap() const = 0;
00079 
00081       virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getDomainMap() const = 0;
00082 
00084       virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getRangeMap() const = 0;
00085 
00087       virtual Teuchos::RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > getImporter() const = 0;
00088 
00090       virtual Teuchos::RCP<const Export<LocalOrdinal,GlobalOrdinal,Node> > getExporter() const = 0;
00091 
00093       virtual global_size_t getGlobalNumRows() const = 0;
00094 
00096       virtual global_size_t getGlobalNumCols() const = 0;
00097 
00099       virtual size_t getNodeNumRows() const = 0;
00100 
00102       virtual size_t getNodeNumCols() const = 0;
00103 
00105       virtual GlobalOrdinal getIndexBase() const = 0;
00106 
00108       virtual global_size_t getGlobalNumEntries() const = 0;
00109 
00111       virtual size_t getNodeNumEntries() const = 0;
00112 
00114 
00115       virtual size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const = 0;
00116 
00118 
00119       virtual size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const = 0;
00120 
00122       virtual global_size_t getGlobalNumDiags() const = 0;
00123 
00125       virtual size_t getNodeNumDiags() const = 0;
00126 
00128       virtual size_t getGlobalMaxNumRowEntries() const = 0;
00129 
00131       virtual size_t getNodeMaxNumRowEntries() const = 0;
00132 
00134       virtual bool hasColMap() const = 0;
00135 
00137       virtual bool isLowerTriangular() const = 0;
00138 
00140       virtual bool isUpperTriangular() const = 0;
00141 
00143       virtual bool isLocallyIndexed() const = 0;
00144 
00146       virtual bool isGloballyIndexed() const = 0;
00147 
00149       virtual bool isFillComplete() const = 0;
00150 
00152 
00154 
00155           
00157 
00166       virtual void getGlobalRowCopy(GlobalOrdinal GlobalRow,
00167                                     const Teuchos::ArrayView<GlobalOrdinal> &Indices,
00168                                     size_t &NumIndices) const = 0;
00169 
00171 
00180       virtual void getLocalRowCopy(LocalOrdinal LocalRow, 
00181                                    const Teuchos::ArrayView<LocalOrdinal> &Indices,
00182                                    size_t &NumIndices) const = 0;
00183 
00185 
00192       TPETRA_DEPRECATED virtual Teuchos::ArrayRCP<const GlobalOrdinal> getGlobalRowView(GlobalOrdinal GlobalRow) const = 0;
00193 
00195 
00202       TPETRA_DEPRECATED virtual Teuchos::ArrayRCP<const LocalOrdinal> getLocalRowView(LocalOrdinal LocalRow) const = 0;
00203 
00205 
00206   }; // class RowGraph
00207 
00208   template <class LocalOrdinal, class GlobalOrdinal, class Node>
00209   RowGraph<LocalOrdinal,GlobalOrdinal,Node>::~RowGraph() {
00210   }
00211 
00212 
00213 } // namespace Tpetra
00214 
00215 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines