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 <Teuchos_ArrayView.hpp>
00034 #include <Teuchos_ArrayRCP.hpp>
00035 #include <Kokkos_DefaultNode.hpp>
00036 
00037 #include "Tpetra_ConfigDefs.hpp"
00038 #include "Tpetra_Map.hpp"
00039 #include "Tpetra_Import.hpp"
00040 #include "Tpetra_Export.hpp"
00041 
00042 namespace Tpetra 
00043 {
00044   
00046 
00052   template <class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
00053   class RowGraph : public Teuchos::Describable {
00054     public: 
00056 
00057 
00059       virtual ~RowGraph();
00060 
00062 
00064 
00065 
00067       virtual const Teuchos::RCP<const Teuchos::Comm<int> > & getComm() const = 0;
00068 
00070       virtual Teuchos::RCP<Node> getNode() const = 0;
00071 
00073       virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getRowMap() const = 0;
00074 
00076       virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getColMap() const = 0;
00077 
00079       virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getDomainMap() const = 0;
00080 
00082       virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > & getRangeMap() const = 0;
00083 
00085       virtual Teuchos::RCP<const Import<LocalOrdinal,GlobalOrdinal,Node> > getImporter() const = 0;
00086 
00088       virtual Teuchos::RCP<const Export<LocalOrdinal,GlobalOrdinal,Node> > getExporter() const = 0;
00089 
00091       virtual global_size_t getGlobalNumRows() const = 0;
00092 
00094       virtual global_size_t getGlobalNumCols() const = 0;
00095 
00097       virtual size_t getNodeNumRows() const = 0;
00098 
00100       virtual size_t getNodeNumCols() const = 0;
00101 
00103       virtual GlobalOrdinal getIndexBase() const = 0;
00104 
00106       virtual global_size_t getGlobalNumEntries() const = 0;
00107 
00109       virtual size_t getNodeNumEntries() const = 0;
00110 
00112 
00113       virtual size_t getNumEntriesInGlobalRow(GlobalOrdinal globalRow) const = 0;
00114 
00116 
00117       virtual size_t getNumEntriesInLocalRow(LocalOrdinal localRow) const = 0;
00118 
00120       virtual global_size_t getGlobalNumDiags() const = 0;
00121 
00123       virtual size_t getNodeNumDiags() const = 0;
00124 
00126       virtual size_t getGlobalMaxNumRowEntries() const = 0;
00127 
00129       virtual size_t getNodeMaxNumRowEntries() const = 0;
00130 
00132       virtual bool hasColMap() const = 0;
00133 
00135       virtual bool isLowerTriangular() const = 0;
00136 
00138       virtual bool isUpperTriangular() const = 0;
00139 
00141       virtual bool isLocallyIndexed() const = 0;
00142 
00144       virtual bool isGloballyIndexed() const = 0;
00145 
00147       virtual bool isFillComplete() const = 0;
00148 
00150 
00152 
00153           
00155 
00164       virtual void getGlobalRowCopy(GlobalOrdinal GlobalRow,
00165                                     const Teuchos::ArrayView<GlobalOrdinal> &Indices,
00166                                     size_t &NumIndices) const = 0;
00167 
00169 
00178       virtual void getLocalRowCopy(LocalOrdinal LocalRow, 
00179                                    const Teuchos::ArrayView<LocalOrdinal> &Indices,
00180                                    size_t &NumIndices) const = 0;
00181 
00183 
00190       virtual Teuchos::ArrayRCP<const GlobalOrdinal> getGlobalRowView(GlobalOrdinal GlobalRow) const = 0;
00191 
00193 
00200       virtual Teuchos::ArrayRCP<const LocalOrdinal> getLocalRowView(LocalOrdinal LocalRow) const = 0;
00201 
00203 
00204   }; // class RowGraph
00205 
00206   template <class LocalOrdinal, class GlobalOrdinal, class Node>
00207   RowGraph<LocalOrdinal,GlobalOrdinal,Node>::~RowGraph() {
00208   }
00209 
00210 
00211 } // namespace Tpetra
00212 
00213 #endif

Generated on Tue Jul 13 09:39:07 2010 for Tpetra Matrix/Vector Services by  doxygen 1.4.7