44 #include <fei_trilinos_macros.hpp>
45 #include <fei_iostream.hpp>
47 #ifdef HAVE_FEI_AZTECOO
57 #define AZTEC_MPI AZTEC_MPI
66 #include <fei_Aztec_Map.hpp>
67 #include <fei_Aztec_BlockMap.hpp>
69 namespace fei_trilinos {
72 Aztec_BlockMap::Aztec_BlockMap(
int globalSz,
int N_update,
const int* update,
int localOffs,
74 int numGlobalBlocks,
int numLocalBlocks,
76 int localBlockOffset,
int* blockSizes)
78 : Aztec_Map(globalSz, N_update, update, localOffs, comm),
79 numGlobalBlocks_(numGlobalBlocks),
80 numLocalBlocks_(numLocalBlocks),
81 localBlockOffset_(localBlockOffset)
85 blockSizes_ =
new int[numLocalBlocks_];
86 blockUpdate_ =
new int[numLocalBlocks_];
88 for(
int i=0; i<numLocalBlocks_; i++) {
89 blockSizes_[i] = blockSizes[i];
90 blockUpdate_[i] = blkUpdate[i];
95 Aztec_BlockMap::Aztec_BlockMap(
const Aztec_BlockMap& map)
96 : Aztec_Map(map.globalSize(), map.localSize(), &map.update[0], map.localOffset(),
97 map.getCommunicator()),
98 numGlobalBlocks_(map.numGlobalBlocks_),
99 numLocalBlocks_(map.numLocalBlocks_),
100 localBlockOffset_(map.localBlockOffset_)
102 blockSizes_ =
new int[numLocalBlocks_];
103 blockUpdate_ =
new int[numLocalBlocks_];
105 for(
int i=0; i<numLocalBlocks_; i++) {
106 blockSizes_[i] = map.blockSizes_[i];
107 blockUpdate_[i] = map.blockUpdate_[i];
112 Aztec_BlockMap::~Aztec_BlockMap(
void) {
114 delete [] blockSizes_;
117 delete [] blockUpdate_;
120 numGlobalBlocks_ = 0;
122 localBlockOffset_ = 0;
126 void Aztec_BlockMap::checkInput() {
128 if (numGlobalBlocks_ <= 0) {
129 fei::console_out() <<
"Aztec_BlockMap: ERROR, numGlobalBlocks <= 0. Aborting."
134 if (localBlockOffset_ < 0) {
135 fei::console_out() <<
"Aztec_BlockMap: ERROR, negative localBlockOffset. Aborting."
std::ostream & console_out()