FEI Version of the Day
fei_Aztec_BlockMap.hpp
00001 #ifndef _fei_Aztec_BlockMap_h_
00002 #define _fei_Aztec_BlockMap_h_
00003 
00004 /*--------------------------------------------------------------------*/
00005 /*    Copyright 2005 Sandia Corporation.                              */
00006 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00007 /*    non-exclusive license for use of this work by or on behalf      */
00008 /*    of the U.S. Government.  Export of this program may require     */
00009 /*    a license from the United States Government.                    */
00010 /*--------------------------------------------------------------------*/
00011 
00012 //
00013 // This Aztec_BlockMap class is a wrapper that encapsulates the general
00014 // information needed to describe the layout of an Aztec DVBR matrix.
00015 // It is a companion/support class that goes with the data class wrappers
00016 // Aztec_LSVector and AztecDVBR_Matrix. Aztec_BlockMap inherits from
00017 // Aztec_Map.
00018 //
00019 // Aztec_Map allows the storage and retrieval of information such as
00020 // local and global sizes, the MPI communicator, and the proc_config array.
00021 // Aztec_BlockMap describes the partitioning and layout of a block matrix.
00022 //
00023 
00024 namespace fei_trilinos {
00025 
00026 class Aztec_BlockMap : public Aztec_Map {
00027     
00028   public:
00029     Aztec_BlockMap(int globalSize, int N_update, const int* update, int localOffset,
00030                    MPI_Comm comm,
00031                    int numGlobalBlocks, int numLocalBlocks, const int* blkUpdate,
00032                    int localBlockOffset, int* blockSizes);
00033 
00034     Aztec_BlockMap(const Aztec_BlockMap& map);       // copy constructor
00035     virtual ~Aztec_BlockMap(void);
00036 
00037     const int& getNumGlobalBlocks() const {return(numGlobalBlocks_);}
00038     const int& getNumLocalBlocks() const {return(numLocalBlocks_);}
00039     const int& getLocalBlockOffset() const {return(localBlockOffset_);}
00040 
00041     const int* getBlockSizes() const {return(blockSizes_);}
00042     int* getBlockUpdate() {return(blockUpdate_);}
00043 
00044   private:
00045 
00046     void checkInput();
00047 
00048     int numGlobalBlocks_;
00049     int numLocalBlocks_;
00050     int localBlockOffset_;
00051     int* blockSizes_;
00052     int* blockUpdate_;
00053 };
00054 
00055 }// namespace fei_trilinos
00056 
00057 #endif
00058 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends