Epetra_RowMatrixTransposer.h

Go to the documentation of this file.
00001 
00002 //@HEADER
00003 /*
00004 ************************************************************************
00005 
00006               Epetra: Linear Algebra Services Package 
00007                 Copyright (2001) Sandia Corporation
00008 
00009 Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00010 license for use of this work by or on behalf of the U.S. Government.
00011 
00012 This library is free software; you can redistribute it and/or modify
00013 it under the terms of the GNU Lesser General Public License as
00014 published by the Free Software Foundation; either version 2.1 of the
00015 License, or (at your option) any later version.
00016  
00017 This library is distributed in the hope that it will be useful, but
00018 WITHOUT ANY WARRANTY; without even the implied warranty of
00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020 Lesser General Public License for more details.
00021  
00022 You should have received a copy of the GNU Lesser General Public
00023 License along with this library; if not, write to the Free Software
00024 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00025 USA
00026 Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00027 
00028 ************************************************************************
00029 */
00030 //@HEADER
00031 
00032 #ifndef EPETRA_CRSMATRIXTRANSPOSER_H
00033 #define EPETRA_CRSMATRIXTRANSPOSER_H
00034 #include <Epetra_Object.h>
00035 class Epetra_RowMatrix;
00036 class Epetra_CrsMatrix;
00037 class Epetra_Map;
00038 class Epetra_Export;
00039 
00041 
00046 class Epetra_RowMatrixTransposer {
00047     
00048   public:
00049 
00051 
00052 
00053 
00060   Epetra_RowMatrixTransposer(Epetra_RowMatrix * OrigMatrix);
00061 
00063   
00064   Epetra_RowMatrixTransposer(const Epetra_RowMatrixTransposer& Source);
00065   
00067   
00068   virtual ~Epetra_RowMatrixTransposer();
00070   
00072 
00073   
00075 
00088   int CreateTranspose(const bool MakeDataContiguous,
00089                       Epetra_CrsMatrix *& TransposeMatrix,
00090                       Epetra_Map * TransposeRowMap = 0);
00091 
00092   
00094 
00105   int UpdateTransposeValues(Epetra_RowMatrix * MatrixWithNewValues);
00107   
00109 
00110 
00111    int UpdateOriginalMatrixValues();
00113   
00115 
00116 
00118 
00122   const Epetra_Map & TransposeRowMap() const {return(*TransposeRowMap_);};
00124 
00128   const Epetra_Export & TransposeExporter() const{return(*TransposeExporter_);};
00130   
00131  private: 
00132   void DeleteData();
00133   Epetra_RowMatrixTransposer& operator=(const Epetra_RowMatrixTransposer& src);
00134 
00135   Epetra_RowMatrix * OrigMatrix_;
00136   Epetra_CrsMatrix * TransposeMatrix_;
00137   Epetra_Export * TransposeExporter_;
00138   Epetra_Map * TransposeRowMap_;
00139   bool TransposeCreated_;
00140   bool MakeDataContiguous_;
00141   int NumMyRows_;
00142   int NumMyCols_;
00143   int MaxNumEntries_;
00144   int * Indices_;
00145   double * Values_;
00146   int * TransNumNz_;
00147   int ** TransIndices_;
00148   double ** TransValues_;
00149   int * TransMyGlobalEquations_;
00150   bool OrigMatrixIsCrsMatrix_;
00151 
00152 };
00153 
00154 #endif /* EPETRA_CRSMATRIXTRANSPOSER_H */

Generated on Wed May 12 21:41:05 2010 for Epetra Package Browser (Single Doxygen Collection) by  doxygen 1.4.7