Epetra_OffsetIndex.h

Go to the documentation of this file.
00001 //@HEADER
00002 /*
00003 ************************************************************************
00004 
00005               Epetra: Linear Algebra Services Package 
00006                 Copyright (2001) Sandia Corporation
00007 
00008 Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00009 license for use of this work by or on behalf of the U.S. Government.
00010 
00011 This library is free software; you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as
00013 published by the Free Software Foundation; either version 2.1 of the
00014 License, or (at your option) any later version.
00015  
00016 This library is distributed in the hope that it will be useful, but
00017 WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 Lesser General Public License for more details.
00020  
00021 You should have received a copy of the GNU Lesser General Public
00022 License along with this library; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024 USA
00025 Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00026 
00027 ************************************************************************
00028 */
00029 //@HEADER
00030 
00031 #ifndef EPETRA_OFFSETINDEX_H
00032 #define EPETRA_OFFSETINDEX_H
00033 
00034 #include "Epetra_Object.h"
00035 
00036 class Epetra_Import;
00037 class Epetra_Export;
00038 class Epetra_CrsGraph;
00039 class Epetra_Distributor;
00040 
00042 
00047 class Epetra_OffsetIndex: public Epetra_Object {
00048     
00049  public:
00050 
00052   Epetra_OffsetIndex( const Epetra_CrsGraph & SourceGraph,
00053                       const Epetra_CrsGraph & TargetGraph,
00054                       Epetra_Import & Importer );
00055   
00057   Epetra_OffsetIndex( const Epetra_CrsGraph & SourceGraph,
00058                       const Epetra_CrsGraph & TargetGraph,
00059                       Epetra_Export & Exporter );
00060 
00062   Epetra_OffsetIndex(const Epetra_OffsetIndex & Indexor);
00063   
00065   virtual ~Epetra_OffsetIndex(void);
00066 
00068 
00069   virtual void Print(ostream & os) const;
00071 
00073   int ** SameOffsets() const { return SameOffsets_; }
00074  
00076   int ** PermuteOffsets() const { return PermuteOffsets_; }
00077  
00079   int ** RemoteOffsets() const { return RemoteOffsets_; }
00080  
00081  private:
00082 
00083   void GenerateLocalOffsets_( const Epetra_CrsGraph & SourceGraph,
00084                               const Epetra_CrsGraph & TargetGraph,
00085                               const int * PermuteLIDs );
00086 
00087   void GenerateRemoteOffsets_( const Epetra_CrsGraph & SourceGraph,
00088                                const Epetra_CrsGraph & TargetGraph,
00089                                const int * ExportLIDs,
00090                                const int * RemoteLIDs,
00091                                Epetra_Distributor & Distor );
00092 
00094   Epetra_OffsetIndex & operator=(const Epetra_OffsetIndex & Indexor);
00095  public:
00096 
00097   int NumSame_;
00098   int ** SameOffsets_;
00099   int NumPermute_;
00100   int ** PermuteOffsets_;
00101   int NumExport_;
00102   int NumRemote_;
00103   int ** RemoteOffsets_;
00104 
00105   bool DataOwned_;
00106 };
00107 
00108 #endif /* EPETRA_OFFSETINDEX_H */

Generated on Thu Sep 18 12:37:58 2008 for Epetra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1