FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fei_Aztec_BlockMap.hpp
Go to the documentation of this file.
1 /*
2 // @HEADER
3 // ************************************************************************
4 // FEI: Finite Element Interface to Linear Solvers
5 // Copyright (2005) Sandia Corporation.
6 //
7 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the
8 // U.S. Government retains certain rights in this software.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Alan Williams (william@sandia.gov)
38 //
39 // ************************************************************************
40 // @HEADER
41 */
42 
43 #ifndef _fei_Aztec_BlockMap_h_
44 #define _fei_Aztec_BlockMap_h_
45 
46 
47 //
48 // This Aztec_BlockMap class is a wrapper that encapsulates the general
49 // information needed to describe the layout of an Aztec DVBR matrix.
50 // It is a companion/support class that goes with the data class wrappers
51 // Aztec_LSVector and AztecDVBR_Matrix. Aztec_BlockMap inherits from
52 // Aztec_Map.
53 //
54 // Aztec_Map allows the storage and retrieval of information such as
55 // local and global sizes, the MPI communicator, and the proc_config array.
56 // Aztec_BlockMap describes the partitioning and layout of a block matrix.
57 //
58 
59 namespace fei_trilinos {
60 
61 class Aztec_BlockMap : public Aztec_Map {
62 
63  public:
64  Aztec_BlockMap(int globalSize, int N_update, const int* update, int localOffset,
65  MPI_Comm comm,
66  int numGlobalBlocks, int numLocalBlocks, const int* blkUpdate,
67  int localBlockOffset, int* blockSizes);
68 
69  Aztec_BlockMap(const Aztec_BlockMap& map); // copy constructor
70  virtual ~Aztec_BlockMap(void);
71 
72  const int& getNumGlobalBlocks() const {return(numGlobalBlocks_);}
73  const int& getNumLocalBlocks() const {return(numLocalBlocks_);}
74  const int& getLocalBlockOffset() const {return(localBlockOffset_);}
75 
76  const int* getBlockSizes() const {return(blockSizes_);}
77  int* getBlockUpdate() {return(blockUpdate_);}
78 
79  private:
80 
81  void checkInput();
82 
88 };
89 
90 }// namespace fei_trilinos
91 
92 #endif
93 
#define MPI_Comm
Definition: fei_mpi.h:56
const int & getNumLocalBlocks() const
std::vector< int > update
const int & getLocalBlockOffset() const
Aztec_BlockMap(int globalSize, int N_update, const int *update, int localOffset, MPI_Comm comm, int numGlobalBlocks, int numLocalBlocks, const int *blkUpdate, int localBlockOffset, int *blockSizes)
const int & getNumGlobalBlocks() const
const int * getBlockSizes() const
virtual const int & globalSize() const
virtual const int & localOffset() const