00001 #include "Ifpack_ConfigDefs.h" 00002 #include "Ifpack_Graph.h" 00003 #include "Ifpack_Graph_Epetra_CrsGraph.h" 00004 #include "Epetra_Comm.h" 00005 #include "Epetra_CrsGraph.h" 00006 00007 //============================================================================== 00008 Ifpack_Graph_Epetra_CrsGraph:: 00009 Ifpack_Graph_Epetra_CrsGraph(const Epetra_CrsGraph* CrsGraph) : 00010 CrsGraph_(CrsGraph) 00011 { 00012 NumMyRows_ = CrsGraph_->NumMyRows(); 00013 NumMyCols_ = CrsGraph_->NumMyCols(); 00014 NumGlobalRows_ = CrsGraph_->NumGlobalRows(); 00015 NumGlobalCols_ = CrsGraph_->NumGlobalCols(); 00016 MaxNumIndices_ = CrsGraph_->MaxNumIndices(); 00017 } 00018 00019 //============================================================================== 00020 Ifpack_Graph_Epetra_CrsGraph::~Ifpack_Graph_Epetra_CrsGraph() 00021 { 00022 } 00023 00024 //============================================================================== 00025 const Epetra_Comm& Ifpack_Graph_Epetra_CrsGraph::Comm() const 00026 { 00027 return(CrsGraph_->Comm()); 00028 } 00029 00030 //============================================================================== 00031 bool Ifpack_Graph_Epetra_CrsGraph::Filled() const 00032 { 00033 return(CrsGraph_->Filled()); 00034 } 00035 00036 //============================================================================== 00037 int Ifpack_Graph_Epetra_CrsGraph::GRID(int LRID) const 00038 { 00039 return(CrsGraph_->GRID(LRID)); 00040 } 00041 00042 //============================================================================== 00043 int Ifpack_Graph_Epetra_CrsGraph::GCID(int LCID) const 00044 { 00045 return(CrsGraph_->GCID(LCID)); 00046 } 00047 00048 //============================================================================== 00049 int Ifpack_Graph_Epetra_CrsGraph::LRID(int GRID) const 00050 { 00051 return(CrsGraph_->LRID(GRID)); 00052 } 00053 00054 //============================================================================== 00055 int Ifpack_Graph_Epetra_CrsGraph::LCID(int GCID) const 00056 { 00057 return(CrsGraph_->LCID(GCID)); 00058 } 00059 00060 //============================================================================== 00061 int Ifpack_Graph_Epetra_CrsGraph:: 00062 ExtractMyRowCopy(int MyRow, int LenOfIndices, 00063 int &NumIndices, int *Indices) const 00064 { 00065 return(CrsGraph_->ExtractMyRowCopy(MyRow, LenOfIndices, 00066 NumIndices, Indices)); 00067 } 00068 00069 //============================================================================== 00070 int Ifpack_Graph_Epetra_CrsGraph::NumMyNonzeros() const 00071 { 00072 return(CrsGraph_->NumMyEntries()); 00073 } 00074 00075 // ====================================================================== 00076 ostream& Ifpack_Graph_Epetra_CrsGraph::Print(std::ostream& os) const 00077 { 00078 00079 if (Comm().MyPID()) 00080 return(os); 00081 00082 os << "================================================================================" << endl; 00083 os << "Ifpack_Graph_Epetra_CrsGraph" << endl; 00084 os << "Number of local rows = " << NumMyRows_ << endl; 00085 os << "Number of global rows = " << NumGlobalRows_ << endl; 00086 os << "================================================================================" << endl; 00087 00088 return(os); 00089 00090 }
1.3.9.1