00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef IFPACK_EPETRA_CRSGRAPH_H
00044 #define IFPACK_EPETRA_CRSGRAPH_H
00045 #include "Ifpack_ConfigDefs.h"
00046 #include "Ifpack_Graph.h"
00047 #include "Epetra_CrsGraph.h"
00048 #include "Teuchos_RefCountPtr.hpp"
00049
00050 class Epetra_Comm;
00051 class Epetra_CrsGraph;
00052
00054
00062 class Ifpack_Graph_Epetra_CrsGraph : public Ifpack_Graph {
00063
00064 public:
00065
00067 Ifpack_Graph_Epetra_CrsGraph(const Teuchos::RefCountPtr<const Epetra_CrsGraph>& CrsGraph);
00068
00070 virtual ~Ifpack_Graph_Epetra_CrsGraph() {};
00071
00073 int NumMyRows() const
00074 {
00075 return(NumMyRows_);
00076 }
00077
00079 int NumMyCols() const
00080 {
00081 return(NumMyCols_);
00082 }
00083
00084 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00085
00086 int NumGlobalRows() const
00087 {
00088 if(CrsGraph_->RowMap().GlobalIndicesInt())
00089 return (int) (NumGlobalRows_);
00090 else
00091 throw "Ifpack_Graph_Epetra_CrsGraph::NumGlobalRows: GlobalIndices not int.";
00092 }
00093 #endif
00094 long long NumGlobalRows64() const
00095 {
00096 return(NumGlobalRows_);
00097 }
00098
00099 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00100
00101 int NumGlobalCols() const
00102 {
00103 if(CrsGraph_->ColMap().GlobalIndicesInt())
00104 return (int) (NumGlobalCols_);
00105 else
00106 throw "Ifpack_Graph_Epetra_CrsGraph::NumGlobalCols: GlobalIndices not int.";
00107 }
00108 #endif
00109 long long NumGlobalCols64() const
00110 {
00111 return(NumGlobalCols_);
00112 }
00113
00115 int MaxMyNumEntries() const
00116 {
00117 return(MaxNumIndices_);
00118 }
00119
00121 int NumMyNonzeros() const;
00122
00124 bool Filled() const;
00125
00126 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00127
00128 int GRID(int) const;
00129 #endif
00130 long long GRID64(int) const;
00131
00132 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00133
00134 int GCID(int) const;
00135 #endif
00136 long long GCID64(int) const;
00137
00138 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
00139
00140 int LRID(int) const;
00141
00143 int LCID(int) const;
00144 #endif
00145
00146 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
00147
00148 int LRID(long long) const;
00149
00151 int LCID(long long) const;
00152 #endif
00153
00155 int ExtractMyRowCopy(int GlobalRow, int LenOfIndices,
00156 int &NumIndices, int *Indices) const;
00157
00159 const Epetra_Comm& Comm() const;
00160
00162 virtual ostream& Print(std::ostream& os) const;
00163
00164 private:
00165
00167 int NumMyRows_;
00169 int NumMyCols_;
00171 long long NumGlobalRows_;
00173 long long NumGlobalCols_;
00175 int MaxNumIndices_;
00177 Teuchos::RefCountPtr<const Epetra_CrsGraph> CrsGraph_;
00178 };
00179
00180 #endif