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 #include "Ifpack_ConfigDefs.h"
00031 #include "Ifpack_Graph.h"
00032 #include "Ifpack_Graph_Epetra_CrsGraph.h"
00033 #include "Epetra_Comm.h"
00034 #include "Epetra_CrsGraph.h"
00035
00036
00037 Ifpack_Graph_Epetra_CrsGraph::
00038 Ifpack_Graph_Epetra_CrsGraph(const Teuchos::RefCountPtr<const Epetra_CrsGraph>& CrsGraph) :
00039 CrsGraph_(CrsGraph)
00040 {
00041 NumMyRows_ = CrsGraph_->NumMyRows();
00042 NumMyCols_ = CrsGraph_->NumMyCols();
00043 NumGlobalRows_ = CrsGraph_->NumGlobalRows();
00044 NumGlobalCols_ = CrsGraph_->NumGlobalCols();
00045 MaxNumIndices_ = CrsGraph_->MaxNumIndices();
00046 }
00047
00048
00049 const Epetra_Comm& Ifpack_Graph_Epetra_CrsGraph::Comm() const
00050 {
00051 return(CrsGraph_->Comm());
00052 }
00053
00054
00055 bool Ifpack_Graph_Epetra_CrsGraph::Filled() const
00056 {
00057 return(CrsGraph_->Filled());
00058 }
00059
00060
00061 int Ifpack_Graph_Epetra_CrsGraph::GRID(int LRID_in) const
00062 {
00063 return(CrsGraph_->GRID(LRID_in));
00064 }
00065
00066
00067 int Ifpack_Graph_Epetra_CrsGraph::GCID(int LCID_in) const
00068 {
00069 return(CrsGraph_->GCID(LCID_in));
00070 }
00071
00072
00073 int Ifpack_Graph_Epetra_CrsGraph::LRID(int GRID_in) const
00074 {
00075 return(CrsGraph_->LRID(GRID_in));
00076 }
00077
00078
00079 int Ifpack_Graph_Epetra_CrsGraph::LCID(int GCID_in) const
00080 {
00081 return(CrsGraph_->LCID(GCID_in));
00082 }
00083
00084
00085 int Ifpack_Graph_Epetra_CrsGraph::
00086 ExtractMyRowCopy(int MyRow, int LenOfIndices,
00087 int &NumIndices, int *Indices) const
00088 {
00089 return(CrsGraph_->ExtractMyRowCopy(MyRow, LenOfIndices,
00090 NumIndices, Indices));
00091 }
00092
00093
00094 int Ifpack_Graph_Epetra_CrsGraph::NumMyNonzeros() const
00095 {
00096 return(CrsGraph_->NumMyEntries());
00097 }
00098
00099
00100 ostream& Ifpack_Graph_Epetra_CrsGraph::Print(std::ostream& os) const
00101 {
00102
00103 if (Comm().MyPID())
00104 return(os);
00105
00106 os << "================================================================================" << endl;
00107 os << "Ifpack_Graph_Epetra_CrsGraph" << endl;
00108 os << "Number of local rows = " << NumMyRows_ << endl;
00109 os << "Number of global rows = " << NumGlobalRows_ << endl;
00110 os << "================================================================================" << endl;
00111
00112 return(os);
00113
00114 }