47 #ifdef HAVE_FEI_AZTECOO
62 #define fei_file "fei_Aztec_LinSysCore.cpp"
69 #define AZTEC_MPI AZTEC_MPI
87 namespace fei_trilinos {
89 static int azlsc_solveCounter_ = 0;
90 static int azlsc_debugFileCounter_ = 0;
92 static std::map<std::string, unsigned> fei_aztec_named_solve_counter;
109 explicitDirichletBCs_(false),
110 BCenforcement_no_column_mod_(false),
112 matrixAllocated_(false),
113 vectorsAllocated_(false),
114 blkMatrixAllocated_(false),
115 matrixLoaded_(false),
117 needNewPreconditioner_(false),
118 tooLateToChooseBlock_(false),
126 precondCreated_(false),
128 scalingCreated_(false),
129 aztec_options_(NULL),
133 tmp_x_touched_(false),
136 tmp_b_allocated_(false),
145 numGlobalEqnBlks_(0),
148 localBlockSizes_(NULL),
154 debugFileCounter_(0),
156 debugFileName_(NULL),
158 named_solve_counter_(fei_aztec_named_solve_counter)
164 MPI_Comm_size(
comm_, &numProcs_);
165 MPI_Comm_rank(
comm_, &thisProc_);
168 aztec_options_ =
new int[AZ_OPTIONS_SIZE];
169 aztec_params_ =
new double[AZ_PARAMS_SIZE];
171 AZ_defaults(aztec_options_, aztec_params_);
173 aztec_status_ =
new double[AZ_STATUS_SIZE];
174 for(
int i=0; i<AZ_STATUS_SIZE; i++) aztec_status_[i] = 0.0;
177 rhsIDs_ =
new int[numRHSs_];
180 std::map<std::string,unsigned>::iterator
181 iter = named_solve_counter_.find(name_);
182 if (iter == named_solve_counter_.end()) {
183 named_solve_counter_.insert(std::make_pair(name_, 0));
187 struct free_any_remaining_az_memory {
188 free_any_remaining_az_memory(){}
189 ~free_any_remaining_az_memory()
191 AZ_manage_memory(0, AZ_CLEAR_ALL, 0, NULL, NULL);
197 static free_any_remaining_az_memory when_program_exits;
211 AZ_precond_destroy(&
azP_);
216 AZ_scaling_destroy(&
azS_);
272 if (numParams == 0 || params == NULL) {
277 const char* param = NULL;
313 bool dbgOutputParam =
false;
314 char* dbgFileName = NULL;
315 char* dbgPath = NULL;
317 bool output_level_on =
false;
320 std::string str(param);
321 if (str ==
"ALL" || str ==
"MATRIX_FILES" || str ==
"FULL_LOGS") {
322 output_level_on =
true;
327 if (param != NULL || output_level_on){
328 dbgOutputParam =
true;
329 dbgFileName =
new char[128];
330 dbgPath = param==NULL ?
new char[3] :
new char[strlen(param)+1];
331 if (param == NULL) sprintf(dbgPath,
"./");
332 else strcpy(dbgPath, param);
334 sprintf(dbgFileName,
"AZLSC.%d.%d.%d",
342 std::map<std::string,unsigned>::iterator
348 if (dbgOutputParam) {
349 if (dbgFileName != NULL)
delete [] dbgFileName;
350 dbgFileName =
new char[256];
351 sprintf(dbgFileName,
"AZLSC_%s.%d.%d.%d",
name_.c_str(),
356 if (dbgOutputParam) {
357 if (azlsc_debugFileCounter_ == azlsc_solveCounter_) {
359 ++azlsc_debugFileCounter_;
361 delete [] dbgFileName;
366 fprintf(
debugFile_,
"--- numParams %d\n",numParams);
367 for(
int i=0; i<numParams; i++){
368 fprintf(
debugFile_,
"------ paramStrings[%d]: %s\n",i,
387 int* eqnOffsets,
int* blkEqnOffsets)
398 if (err)
return(err);
401 fprintf(
debugFile_,
"setGlobalNodeOffsets, len: %d\n", len);
402 for(
int i=0; i<len; i++) {
403 fprintf(
debugFile_,
" nodeOffsets[%d]: %d, eqnOffsets[%d]: %d, blkEqnOffsets[%d], %d\n", i, nodeOffsets[i], i, eqnOffsets[i], i, blkEqnOffsets[i]);
415 const int*
const* connNodes)
419 (void) numNodesPerElem;
428 if (!strcmp(name,
"AZ_VBR_MATRIX")) {
434 fei::console_out() <<
"Aztec_LinSysCore::setMatrixType: WARNING: Too late to choose"
435 <<
" the DVBR matrix; make this choice before calling "
436 <<
"setMatrixStructure. DMSR will be used." <<
FEI_ENDL;
439 else if (!strcmp(name,
"AZ_MSR_MATRIX")) {
444 FEI_COUT <<
"Aztec_LinSysCore: Warning: requested matrix-type <"<<name <<
"> not recognized." <<
FEI_ENDL;
445 FEI_COUT <<
"Aztec_LinSysCore: valid matrix-types are: 'AZ_MSR_MATRIX', 'AZ_VBR_MATRIX'" <<
FEI_ENDL;
456 int* ptRowsPerBlkRow)
461 int blkEqn = localBlkOffset_+i;
462 fprintf(
debugFile_,
" blkRow %d, ptRowsPerBlkRow %d\n",
463 blkEqn, ptRowsPerBlkRow[i]);
468 int err =
allocateMatrix(ptColIndices, ptRowLengths, blkColIndices,
469 blkRowLengths, ptRowsPerBlkRow);
482 "createMiscStuff: numRHSs_: %d\n", numRHSs_);
487 messageAbort(
"createMiscStuff: numLocalEqns > numGlobalEqns");
489 if (0 > localOffset_)
490 messageAbort(
"createMiscStuff: localOffset_ out of range");
500 azS_ = AZ_scaling_create();
503 fei::console_out() <<
"Aztec_LinSysCore::createMiscStuff ERROR: failed to create scaling"
509 messageAbort(
"numRHSs_==0. Out of scope or destructor already called?");
512 if (numLocalEqns_ > 0 &&
tmp_x_ == NULL)
return(-1);
515 if (numLocalEqns_ > 0 &&
tmp_bc_ == NULL)
return(-1);
544 int* ptRowsPerBlkRow)
556 A_ =
new AztecDMSR_Matrix(
map_);
568 int* row_lengths = numLocalEqns_ > 0 ?
new int[
numLocalEqns_] : NULL;
572 ptColIndices[i], ptRowLengths[i]) >= 0) {
573 row_lengths[i] = ptRowLengths[i] - 1;
576 row_lengths[i] = ptRowLengths[i];
582 A_ptr_->allocate(row_lengths, ptColIndices);
584 delete [] row_lengths;
593 int* ptRowsPerBlkRow)
607 localBlkOffset_, ptRowsPerBlkRow));
630 for(
int j=0; j<blkRowLengths[i]; j++) {
631 blk_col_inds[offset++] = blkColIndices[i][j];
638 delete [] blk_col_inds;
727 double* cur_b =
tmp_b_[j];
737 int numPtCols,
const int* ptCols,
738 const double*
const* values)
742 return(
sumIntoPointRow(numPtRows, ptRows, numPtCols, ptCols, values,
false));
747 int numPtCols,
const int* ptCols,
748 int numBlkRows,
const int* blkRows,
749 int numBlkCols,
const int* blkCols,
750 const double*
const* values)
759 values, numPtCols,
false));
769 int numPtCols,
const int* ptCols,
770 const double*
const* values)
774 return(
sumIntoPointRow(numPtRows, ptRows, numPtCols, ptCols, values,
true));
781 if (row >= localOffset_ && row < (localOffset_+numLocalEqns_)) {
782 length =
A_ptr_->rowLength(row);
789 if (blkRow < 0)
return(-1);
799 int len,
int& rowLength)
802 if (err != 0)
return(-1);
804 int* tmpIndices = indices;
805 double* tmpCoefs = coefs;
807 if (len < rowLength) {
808 tmpIndices =
new int[rowLength];
809 tmpCoefs =
new double[rowLength];
813 A_ptr_->getRow(row, rowLength, tmpCoefs, tmpIndices);
820 if (len < rowLength) {
821 for(
int i=0; i<len; i++) {
822 indices[i] = tmpIndices[i];
823 coefs[i] = tmpCoefs[i];
825 delete [] tmpIndices;
834 int numBlkCols,
const int* blkCols,
835 const double*
const* values,
837 bool overwriteInsteadOfAccumulate)
844 for(i=0; i<numBlkRows; i++) {
847 if (maxBlkSize < thisSize) maxBlkSize = thisSize;
852 double* coefs =
new double[numPtCols*maxBlkSize];
855 for(i=0; i<numBlkRows; i++) {
857 copyBlockRow(i, blkRows, numBlkCols, blkCols, &(values[rowOffset]), coefs);
860 if (overwriteInsteadOfAccumulate) {
862 (
int*)blkCols, numBlkCols);
870 (
int*)blkCols, numBlkCols);
886 int numBlkCols,
const int* blkCols,
887 const double*
const* values,
890 int rowSize = 0, colSize = 0;
895 for(
int b=0; b<numBlkCols; b++) {
904 for(
int j=colOffset; j<colOffset+colSize; j++) {
905 for(
int r=0; r<rowSize; r++) {
906 coefs[coefOffset++] = values[r][j];
909 colOffset += colSize;
918 if (localBlkRow >= 0 && localBlkRow < numLocalEqnBlks_) {
935 return(remoteSizes[index]);
941 int numPtCols,
const int* ptColIndices,
942 const double*
const* values,
943 bool overwriteInsteadOfAccumulate)
947 fprintf(
debugFile_,
"sumIntoPointRow, %d rows\n", numPtRows);
948 for(i=0; i<numPtRows; ++i) {
949 for(j=0; j<numPtCols; ++j) {
950 fprintf(
debugFile_,
" sipr row %d, col %d, value: %e\n", ptRows[i],
951 ptColIndices[j], values[i][j]);
958 if (overwriteInsteadOfAccumulate) {
959 for(i=0; i<numPtRows; ++i) {
960 CHK_ERR(
A_ptr_->putRow(ptRows[i], numPtCols, values[i], ptColIndices) );
964 int err =
A_ptr_->sumIntoRow(numPtRows, ptRows, numPtCols, ptColIndices,
968 osstr <<
"Aztec_LinSysCore::sumIntoPointRow ERROR calling A_ptr->sumIntoRow";
969 throw std::runtime_error(osstr.str());
977 messageAbort(
"sumIntoPointRow: need lookup object, don't have it.");
980 int* blkIntData =
new int[numPtRows*2 + numPtCols*2];
981 int* blkRows = blkIntData;
982 int* blkRowOffsets = blkIntData+numPtRows;
983 int* blkCols = blkIntData+2*numPtRows;
984 int* blkColOffsets = blkIntData+2*numPtRows+numPtCols;;
988 for(i=0; i<numPtRows; i++) {
993 for(i=0; i<numPtCols; i++) {
995 if (blkCols[i] < 0) {
1004 for(i=0; i<numPtRows; i++) {
1005 for(j=0; j<numPtCols; j++) {
1007 blkCols[j], blkColOffsets[j], values[i][j]);
1011 delete [] blkIntData;
1017 int blkCol,
int colOffset,
1023 int len = rowSize*colSize;
1025 fei::console_out() <<
thisProc_ <<
", ALSC::spibr: blkRow: " << blkRow <<
", blkCol: " << blkCol <<
", rowSize: " << rowSize <<
", colSize: " << colSize <<
FEI_ENDL;
1029 double* val =
new double[rowSize*colSize];
1031 for(
int i=0; i<len; i++) val[i] = 0.0;
1033 val[colOffset*rowSize + rowOffset] = value;
1047 const double* values,
1062 for(
int i=0; i<num; ++i) {
1063 fprintf(
debugFile_,
"sumIntoRHS %d, %e\n", indices[i], values[i]);
1068 for(
int i=0; i<num; i++){
1070 if (localRow < 0 || localRow > numLocalEqns_)
continue;
1072 cur_b[localRow] += values[i];
1091 for(
int i=0; i<num; i++){
1093 if (localRow < 0 || localRow > numLocalEqns_)
continue;
1096 fprintf(
debugFile_,
"putIntoRHS %d, %e\n", indices[i], values[i]);
1121 for(
int i=0; i<num; i++){
1123 if (localRow < 0 || localRow > numLocalEqns_)
continue;
1141 int* data_org = NULL;
1155 if (!
A_ptr_->isFilled()) {
1166 else data_org =
A_ptr_->getAZ_MATRIX_PTR()->data_org;
1168 Aztec_LSVector* tmp = NULL;
1174 tmp =
new Aztec_LSVector(*
x_);
1179 if (
x_ == NULL)
x_ =
new Aztec_LSVector(tmpMap, data_org);
1180 if (
bc_ == NULL)
bc_ =
new Aztec_LSVector(tmpMap, data_org);
1220 b_[j] =
new Aztec_LSVector(tmpMap, data_org);
1221 if (
b_[j] == NULL)
return(-1);
1238 fprintf(
debugFile_,
"leaving matrixLoadComplete\n");
1246 int* blkOffsets,
int numEqns)
1250 for(
int i=0; i<numEqns; i++) {
1252 if (blkEqns[i] < 0) {
1255 messageAbort(
"getBlkEqnsAndOffsets: blk-eqn lookup failed.");
1259 if (blkOffsets[i] < 0) {
1260 messageAbort(
"getBlkEqnsAndOffsets: blk-offset lookup failed.");
1269 double* gamma,
int len)
1286 if (len == 0)
return(0);
1288 std::vector<int> bcEqns; bcEqns.reserve(len);
1289 std::vector<int> indirect; indirect.reserve(len);
1290 for(
int i=0; i<len; ++i) {
1291 bcEqns.push_back(globalEqn[i]);
1292 indirect.push_back(i);
1295 fei::insertion_sort_with_companions<int>(len, &bcEqns[0], &indirect[0]);
1299 for(
int ii=0; ii<len; ++ii) {
1300 fprintf(
debugFile_,
" EssBC eqn %d, alpha %e gamma %e\n",
1301 bcEqns[ii], alpha[indirect[ii]], gamma[indirect[ii]]);
1308 int localEnd = localOffset_ + numLocalEqns_ - 1;
1311 fprintf(
debugFile_,
"localOffset_: %d, localEnd: %d\n", localOffset_, localEnd);
1320 for(ii=0; ii<len; ii++) {
1321 if ((localOffset_ <= globalEqn[ii]) && (globalEqn[ii] <= localEnd)){
1322 newBCindices[numEssBCs_+offset++] = globalEqn[ii];
1329 numEssBCs_ += offset;
1332 delete [] newBCindices;
1337 int* blkIntData =
new int[len*2];
1338 int* blkEqns = blkIntData;
1339 int* blkOffsets = blkIntData+len;
1345 delete [] blkIntData;
1350 for(
int i=0; i<len; i++) {
1352 int globalEqn_i = bcEqns[i];
1357 if ((localOffset_ > globalEqn_i) || (globalEqn_i > localEnd))
continue;
1360 A_ptr_->setDiagEntry(globalEqn_i, 1.0);
1361 int* offDiagIndices = NULL;
1362 double* offDiagCoefs = NULL;
1363 int offDiagLength = 0;
1364 A_ptr_->getOffDiagRowPointers(globalEqn_i, offDiagIndices,
1365 offDiagCoefs, offDiagLength);
1367 for(
int jjj=0; jjj<offDiagLength; jjj++) offDiagCoefs[jjj] = 0.0;
1370 double bc_term = gamma[indirect[i]]/alpha[indirect[i]];
1371 double rhs_term = bc_term;
1375 (*b_ptr_)[globalEqn_i] = rhs_term;
1376 (*bc_)[globalEqn_i] = bc_term;
1388 for(
int row=localOffset_; row<=localEnd; row++) {
1390 int insertPoint = -1;
1392 if (index >= 0)
continue;
1394 int* offDiagIndices2 = NULL;
1395 double* offDiagCoefs2 = NULL;
1396 int offDiagLength2 = 0;
1397 A_ptr_->getOffDiagRowPointers(row, offDiagIndices2,
1398 offDiagCoefs2, offDiagLength2);
1403 for(
int j=0; j<offDiagLength2; j++) {
1405 int col_index =
A_ptr_->getAztec_Map()->getTransformedEqn(offDiagIndices2[j]);
1408 if (idx < 0)
continue;
1410 double bc_term = gamma[indirect[idx]]/alpha[indirect[idx]];
1412 double value = offDiagCoefs2[j]*bc_term;
1415 (*b_ptr_)[row] -= value;
1422 fprintf(
debugFile_,
"BC mod, rhs %d -= %e\n", row, value);
1423 fprintf(
debugFile_,
"BC, set A(%d,%d)==%e, to 0.0\n",
1424 row, bcEqns[idx], offDiagCoefs2[j]);
1427 offDiagCoefs2[j] = 0.0;
1464 int colInd_length = 0;
1465 int* blkCols = NULL;
1466 int rowNNZs = 0, numCols = 0, err = 0;
1468 double* val2 = NULL;
1469 int val2Len = val_length;
1471 int cols2Len = colInd_length;
1473 int localEnd = localBlkOffset_ + numLocalEqnBlks_ - 1;
1475 for(
int i=0; i<len; i++) {
1480 if ((localBlkOffset_ > blkEqn[i]) || (blkEqn[i] > localEnd)){
1484 err =
getBlockRow(blkEqn[i], val, val_length, blkCols, colInd_length,
1493 err =
blkRowEssBCMod(blkEqn[i], blkOffset[i], val, blkCols, numCols,
1494 rowNNZs, alpha[i], gamma[i]);
1508 for(
int j=0; j<numCols; j++) {
1510 int col_row = blkCols[j];
1513 if ((localOffset_ > col_row) || (col_row > localEnd))
continue;
1516 if (col_row == blkEqn[i])
continue;
1519 int thisNumBlks = 0;
1520 err =
getBlockRow(col_row, val2, val2Len, cols2, cols2Len,
1521 thisNumBlks, thisNNZ);
1523 err =
blkColEssBCMod(col_row, blkEqn[i], blkOffset[i], val2, cols2,
1524 thisNumBlks, thisNNZ, alpha[i], gamma[i]);
1540 int* blkCols,
int numCols,
int numPtNNZ,
1541 double alpha,
double gamma)
1554 for(
int j=0; j<numCols; j++) {
1556 int err, ptRows = 0, ptCols = 0;
1564 if (blkCols[j] == blkEqn) {
1568 double bc_term = gamma/alpha;
1569 double rhs_term = bc_term;
1572 int thisOffset = offset;
1574 for(
int jj=0; jj<ptCols; jj++) {
1575 if (jj==blkOffset) {
1581 for(
int row=0; row<ptRows; row++) {
1582 if (row==blkOffset) {
1584 (*b_ptr_)[pointRow+row] = rhs_term;
1585 (*bc_)[pointRow+row] = bc_term;
1591 val[thisOffset+row] = 1.0;
1595 (*b_ptr_)[pointRow+row] -= val[thisOffset+row]
1601 val[thisOffset+row] = 0.0;
1606 val[thisOffset+blkOffset] = 0.0;
1609 thisOffset += ptRows;
1615 int thisOffset = offset + blkOffset;
1616 for(
int ii=0; ii<ptCols; ii++) {
1617 val[thisOffset] = 0.0;
1618 thisOffset += ptRows;
1622 offset += ptRows*ptCols;
1630 double* val,
int* blkCols,
int numCols,
1631 int numPtNNZ,
double alpha,
double gamma)
1641 int thisRowSize = 0, thisColSize = 0;
1645 int err, offset = 0;
1646 for(
int j=0; j<numCols; j++) {
1648 thisRowSize, thisColSize);
1655 if (blkCols[j] == blkEqn) {
1656 double bc_term = gamma/alpha;
1658 int thisOffset = offset + blkOffset*thisRowSize;
1660 for(
int row=0; row<thisRowSize; row++) {
1662 (*b_ptr_)[thisPtRow+row] -= val[thisOffset+row] * bc_term;
1666 val[thisOffset+row]*bc_term;
1668 val[thisOffset+row] = 0.0;
1674 offset += thisRowSize*thisColSize;
1688 if (localBlkRow < 0 || localBlkRow > numLocalEqnBlks_)
return(-1);
1691 for(
int i=0; i<localBlkRow; i++) {
1701 int*& blkColInds,
int& blkColIndLen,
1702 int& numNzBlks,
int& numNNZ) {
1724 if (numNNZ > valLen) {
1725 double* newVals =
new double[numNNZ];
1731 if (numNzBlks > blkColIndLen) {
1732 int* newCols =
new int[numNzBlks];
1733 delete [] blkColInds;
1734 blkColInds = newCols;
1735 blkColIndLen = numNzBlks;
1745 int** colIndices,
int* colIndLen,
1753 for(
int i=0; i<numEqns; ++i) {
1754 fprintf(
debugFile_,
"remBC row %d, (cols,coefs): ", globalEqns[i]);
1755 for(
int j=0; j<colIndLen[i]; ++j) {
1756 fprintf(
debugFile_,
"(%d,%e) ",colIndices[i][j], coefs[i][j]);
1764 int* blkEqns =
new int[numEqns];
1765 int* blkOffsets =
new int[numEqns];
1769 int** blkCols =
new int*[numEqns];
1770 int** blkColOffsets =
new int*[numEqns];
1772 for(
int i=0; i<numEqns; i++) {
1773 blkCols[i] =
new int[colIndLen[i]];
1774 blkColOffsets[i] =
new int[colIndLen[i]];
1784 delete [] blkOffsets;
1786 for(
int j=0; j<numEqns; j++) {
1787 delete [] blkCols[j];
1788 delete [] blkColOffsets[j];
1791 delete [] blkColOffsets;
1796 int localEnd = localOffset_ + numLocalEqns_ - 1;
1798 for(
int i=0; i<numEqns; i++) {
1799 int globalEqn_i = globalEqns[i];
1801 if ((localOffset_ > globalEqn_i) || (globalEqn_i > localEnd)){
1806 int* AcolInds = NULL;
1807 double* Acoefs = NULL;
1809 A_ptr_->getOffDiagRowPointers(globalEqn_i, AcolInds, Acoefs, rowLen);
1811 for(
int j=0; j<colIndLen[i]; j++) {
1812 for(
int k=0; k<rowLen; k++) {
1813 if (
A_ptr_->getAztec_Map()->getTransformedEqn(AcolInds[k]) == colIndices[i][j]) {
1814 double value = Acoefs[k]*coefs[i][j];
1816 double old_rhs_val = 0.0;
1818 old_rhs_val = (*b_ptr_)[globalEqn_i];
1819 (*b_ptr_)[globalEqn_i] -= value;
1827 fprintf(
debugFile_,
"remBC mod, rhs %d (%e) -= %e\n",
1828 globalEqn_i, old_rhs_val, value);
1829 fprintf(
debugFile_,
"remBC, set A(%d,%d)==%e, to 0.0\n",
1830 globalEqn_i, AcolInds[k], Acoefs[k]);
1845 int** blkColInds,
int** blkColOffsets,
1846 int* blkColLens,
double** remEssBCCoefs) {
1849 int colInd_length = 0;
1850 int* blkCols = NULL;
1851 int rowNNZs = 0, numCols = 0, err = 0;
1853 int localEnd = localBlkOffset_ + numLocalEqnBlks_ - 1;
1855 for(
int i=0; i<numEqns; i++) {
1856 if ((localBlkOffset_ > blkEqns[i]) || (blkEqns[i] > localEnd)){
1860 err =
getBlockRow(blkEqns[i], val, val_length, blkCols, colInd_length,
1874 for(
int j=0; j<numCols; j++) {
1875 int ptRows = 0, ptCols = 0;
1879 fei::console_out() <<
"Aztec_LSC::enforceBlkRemoteEssBCs: error in getBlockSize"
1884 for(
int k=0; k<blkColLens[i]; k++) {
1885 if (blkColInds[i][k] == blkCols[j]) {
1886 int thisOffset = offset + blkColOffsets[i][k] * ptRows;
1887 double rhsTerm = remEssBCCoefs[i][k];
1891 for(
int row=0; row<ptRows; row++) {
1892 double& coef = val[thisOffset+row];
1893 bvec[row] -= coef*rhsTerm;
1894 bcvec[row] -= coef*rhsTerm;
1903 offset += ptRows*ptCols;
1935 if (strcmp(
"AztecDVBR_Matrix", data.
getTypeName()))
1936 messageAbort(
"copyInMatrix: data type string not 'AztecDVBR_Matrix'.");
1938 AztecDVBR_Matrix* source = (AztecDVBR_Matrix*)data.
getDataPtr();
1941 blkA_ =
new AztecDVBR_Matrix(*source);
1949 if (strcmp(
"AztecDMSR_Matrix", data.
getTypeName()))
1950 messageAbort(
"copyInMatrix: data type string not 'AztecDMSR_Matrix'.");
1952 AztecDMSR_Matrix* source = (AztecDMSR_Matrix*)data.
getDataPtr();
1953 A_ptr_->copyStructure(*source);
1973 AztecDVBR_Matrix* outmat =
new AztecDVBR_Matrix(*
blkA_ptr_);
1984 AztecDMSR_Matrix* outmat =
new AztecDMSR_Matrix(*
A_ptr_);
1986 outmat->scale(scalar);
2000 if (strcmp(
"AztecDVBR_Matrix", data.
getTypeName())) {
2001 fei::console_out() <<
"Aztec_LinSysCore::sumInMatrix ERROR, incoming type-string: "
2005 AztecDVBR_Matrix* source = (AztecDVBR_Matrix*)data.
getDataPtr();
2010 if (strcmp(
"AztecDMSR_Matrix", data.
getTypeName()))
2011 messageAbort(
"sumInMatrix: data type string not 'AztecDMSR_Matrix'.");
2013 AztecDMSR_Matrix* source = (AztecDMSR_Matrix*)data.
getDataPtr();
2038 messageAbort(
"copyInRHSVector: data's type string not 'Aztec_LSVector'.");
2040 Aztec_LSVector* sourcevec = (Aztec_LSVector*)data.
getDataPtr();
2053 Aztec_LSVector* outvec =
new Aztec_LSVector(*
b_ptr_);
2057 outvec->addVec(scalar, *
b_ptr_);
2070 messageAbort(
"sumInRHSVector: data's type string not 'Aztec_LSVector'.");
2072 Aztec_LSVector* source = (Aztec_LSVector*)data.
getDataPtr();
2082 if (strcmp(
"AztecDVBR_Matrix", data.
getTypeName()))
2083 messageAbort(
"destroyMatrixData: data doesn't contain a AztecDVBR_Matrix.");
2085 AztecDVBR_Matrix* mat = (AztecDVBR_Matrix*)data.
getDataPtr();
2089 if (strcmp(
"AztecDMSR_Matrix", data.
getTypeName()))
2090 messageAbort(
"destroyMatrixData: data doesn't contain a AztecDMSR_Matrix.");
2092 AztecDMSR_Matrix* mat = (AztecDMSR_Matrix*)data.
getDataPtr();
2102 messageAbort(
"destroyVectorData: data doesn't contain a Aztec_LSVector.");
2104 Aztec_LSVector* vec = (Aztec_LSVector*)data.
getDataPtr();
2115 if (numRHSs == 0)
return(0);
2142 const double* values,
2152 int localEnd = localOffset_ + numLocalEqns_ -1;
2154 for(
int i=0; i<len; i++){
2155 if ((localOffset_ > eqnNumbers[i]) || (eqnNumbers[i] > localEnd))
2158 (*x_)[eqnNumbers[i]] = values[i];
2163 for(
int i=0; i<len; i++){
2164 if ((localOffset_ > eqnNumbers[i]) || (eqnNumbers[i] > localEnd))
2179 if (len != numLocalEqns_)
2183 answers[i] = (*x_)[localOffset_ + i];
2194 int localEnd = localOffset_ + numLocalEqns_ -1;
2195 if ((localOffset_ > eqnNumber) || (eqnNumber > localEnd))
2198 answer = (*x_)[eqnNumber];
2205 if (len != numLocalEqns_) {
2217 int* update_index = NULL;
2222 update_index =
A_ptr_->getAztec_Map()->update_index;
2229 update_index,
azA_->rpntr);
2231 Aztec_LSVector* r =
new Aztec_LSVector(*
x_);
2236 r->addVec(-1.0, *
b_ptr_);
2242 Aztec_LSVector* rtmp =
new Aztec_LSVector(*
x_);
2244 AZ_invorder_vec((
double*)(r->startPointer()),
azA_->data_org, update_index,
2245 azA_->rpntr, (
double*)rtmp->startPointer());
2249 const double* rptr = r->startPointer();
2252 values[i] = rptr[i];
2257 azA_->rpntr, (
double*)rtmp->startPointer());
2262 update_index,
azA_->rpntr, (
double*)rtmp->startPointer());
2279 if (!strcmp(name,
"AZ_gmres")) {
2281 sprintf(msg,
"AZ_gmres solver.");
2283 else if (!strcmp(name,
"AZ_cg")) {
2285 sprintf(msg,
"AZ_cg solver.");
2287 else if (!strcmp(name,
"AZ_bicgstab")) {
2289 sprintf(msg,
"AZ_bicgstab solver.");
2291 else if (!strcmp(name,
"AZ_cgs")) {
2293 sprintf(msg,
"AZ_cgs solver.");
2295 else if (!strcmp(name,
"AZ_tfqmr")) {
2297 sprintf(msg,
"AZ_tfqmr solver.");
2299 else if (!strcmp(name,
"AZ_lu")) {
2301 sprintf(msg,
"AZ_lu solver.");
2305 sprintf(msg,
"AZ_gmres default solver.");
2307 FEI_COUT <<
"Aztec_LinSysCore: Warning: requested solver <" << name <<
"> not recognized, defaulting to AZ_gmres." <<
FEI_ENDL;
2320 sprintf(msg,
"selectPreconditioner(%s)", name);
2323 if (!strcmp(name,
"AZ_none")) {
2325 sprintf(msg,
" -- selected: AZ_none.");
2327 else if (!strcmp(name,
"AZ_Jacobi")) {
2329 sprintf(msg,
" -- selected: AZ_Jacobi.");
2331 else if (!strcmp(name,
"AZ_Neumann")) {
2333 sprintf(msg,
" -- selected: AZ_Neumann.");
2335 else if (!strcmp(name,
"AZ_ls")) {
2337 sprintf(msg,
" -- selected: AZ_ls.");
2339 else if (!strcmp(name,
"AZ_sym_GS")) {
2341 sprintf(msg,
" -- selected: AZ_sym_GS.");
2343 else if (!strcmp(name,
"AZ_dom_decomp")) {
2345 sprintf(msg,
" -- selected: AZ_dom_decomp.");
2349 else if (!strcmp(name,
"ML_Vanek")) {
2352 sprintf(msg,
" -- selected: AZ_user_precond.");
2357 sprintf(msg,
" -- selected: Default, AZ_none.\n");
2359 FEI_COUT <<
"Aztec_LinSysCore: Warning: requested preconditioner <" << name <<
"> not recognized, defaulting to AZ_none." <<
FEI_ENDL;
2372 sprintf(msg,
"setSubdomainSolve(%s)", name);
2375 if (!strcmp(name,
"AZ_lu")) {
2377 sprintf(msg,
" -- selected AZ_lu");
2379 else if (!strcmp(name,
"AZ_ilu")) {
2381 sprintf(msg,
" -- selected AZ_ilu");
2383 else if (!strcmp(name,
"AZ_ilut")) {
2385 sprintf(msg,
" -- selected AZ_ilut");
2387 else if (!strcmp(name,
"AZ_rilu")) {
2389 sprintf(msg,
" -- selected AZ_rilu");
2391 else if (!strcmp(name,
"AZ_bilu")) {
2393 sprintf(msg,
" -- selected AZ_bilu");
2395 else if (!strcmp(name,
"AZ_icc")) {
2397 sprintf(msg,
" -- selected AZ_icc");
2401 FEI_COUT <<
"Aztec_LinSysCore: Warning: requested subdomain-solve <" << name <<
"> not recognized." <<
FEI_ENDL;
2412 sprintf(msg,
"setTypeOverlap(%s)", name);
2415 if (!strcmp(name,
"AZ_standard")) {
2417 sprintf(msg,
" -- selected AZ_standard");
2419 else if (!strcmp(name,
"AZ_ilu")) {
2421 sprintf(msg,
" -- selected AZ_symmetric");
2425 FEI_COUT <<
"Aztec_LinSysCore: Warning: requested type-overlap <" << name <<
"> not recognized." <<
FEI_ENDL;
2464 const char* param = NULL;
2558 osstr <<
"/A_" << name <<
".mtx";
2562 std::string str = osstr.str();
2563 const char* matname = str.c_str();
2569 A_ptr_->writeToFile(matname);
2578 if (name == NULL || v == NULL) {
2589 osstr <<
"/" << name <<
".vec";
2591 std::string str = osstr.str();
2593 const char* vecname = str.c_str();
2595 v->writeToFile(vecname);
2606 (*b_ptr_)[index] = 0.0;
2625 (*b_ptr_)[index] = (*bc_)[index];
2626 (*x_)[index] = (*bc_)[index];
2646 unsigned counter = 0;
2647 std::map<std::string,unsigned>::iterator
2650 fei::console_out() <<
"fei: Aztec_LinSysCore::LaunchSolver: internal error."
2654 counter = iter->second++;
2660 std::string str = osstr.str();
2665 x0_osstr <<
"x0_" << str;
2666 std::string x0_str = x0_osstr.str();
2671 b_osstr <<
"b_" << str;
2672 std::string b_str = b_osstr.str();
2679 AZ_precond_destroy(&
azP_);
2687 int numFineSweeps = 2;
2688 int numCoarseSweeps = 2;
2689 double omega = 0.67;
2692 numFineSweeps, numCoarseSweeps, omega,
2693 map_->getProcConfig(), &ml);
2697 azA_->data_org[AZ_name] = 0;
2698 azP_ = AZ_precond_create(
azA_, AZ_precondition, NULL);
2701 azA_->data_org[AZ_name] = 0;
2702 azP_ = AZ_precond_create(
azA_, AZ_precondition, NULL);
2720 int* proc_config = NULL;
2721 int* update_index = NULL;
2723 proc_config =
blkMap_->getProcConfig();
2727 proc_config =
map_->getProcConfig();
2728 update_index =
A_ptr_->getAztec_Map()->update_index;
2731 AZ_reorder_vec((
double*)(x_->startPointer()),
azA_->data_org, update_index,
2734 AZ_reorder_vec((
double*)(b_ptr_->startPointer()),
azA_->data_org,
2735 update_index,
azA_->rpntr);
2737 AZ_iterate((
double*)(x_->startPointer()),
2738 (
double*)(b_ptr_->startPointer()),
2746 azlsc_solveCounter_++;
2748 Aztec_LSVector* xtmp =
new Aztec_LSVector(*x_);
2753 AZ_invorder_vec((
double*)(x_->startPointer()),
azA_->data_org, update_index,
2754 azA_->rpntr, (
double*)xtmp->startPointer());
2759 AZ_invorder_vec((
double*)(b_ptr_->startPointer()),
azA_->data_org,
2760 update_index,
azA_->rpntr, (
double*)xtmp->startPointer());
2773 std::string str = osstr.str();
2776 x_osstr <<
"x_" << str;
2777 std::string x_str = x_osstr.str();
2784 (*bc_)[index] = 0.0;
2800 char* msg =
new char[128];
2801 for(
int i=0; i<128; i++) msg[i] =
'\0';
2803 if (!strcmp(param,
"AZ_none")) {
2805 sprintf(msg,
"No scaling");
2807 else if (!strcmp(param,
"AZ_Jacobi")) {
2809 sprintf(msg,
"AZ_Jacobi scaling");
2811 else if (!strcmp(param,
"AZ_BJacobi")) {
2813 sprintf(msg,
"AZ_BJacobi scaling");
2815 else if (!strcmp(param,
"AZ_row_sum")) {
2817 sprintf(msg,
"AZ_row_sum scaling");
2819 else if (!strcmp(param,
"AZ_sym_diag")) {
2821 sprintf(msg,
"AZ_sym_diag scaling");
2823 else if (!strcmp(param,
"AZ_sym_row_sum")) {
2825 sprintf(msg,
"AZ_sym_row_sum scaling");
2829 FEI_COUT <<
"Aztec_LinSysCore: Warning: requested scaling <" << param <<
"> not recognized." <<
FEI_ENDL;
2845 if (!strcmp(param,
"AZ_r0")) {
2847 sprintf(msg,
"AZ_conv AZ_r0");
2849 else if (!strcmp(param,
"AZ_rhs")) {
2851 sprintf(msg,
"AZ_conv AZ_rhs");
2853 else if (!strcmp(param,
"AZ_Anorm")) {
2855 sprintf(msg,
"AZ_conv AZ_Anorm");
2857 else if (!strcmp(param,
"AZ_sol")) {
2859 sprintf(msg,
"AZ_conv AZ_sol");
2861 else if (!strcmp(param,
"AZ_weighted")) {
2863 sprintf(msg,
"AZ_conv AZ_weighted");
2865 else if (!strcmp(param,
"AZ_noscaled")) {
2867 sprintf(msg,
"AZ_conv AZ_noscaled");
2871 FEI_COUT <<
"Aztec_LinSysCore: Warning: requested convergence test <" << param <<
"> not recognized." <<
FEI_ENDL;
2885 if (!strcmp(param,
"AZ_calc")) {
2887 sprintf(msg,
"AZ_pre_calc AZ_calc");
2889 else if (!strcmp(param,
"AZ_recalc")) {
2891 sprintf(msg,
"AZ_pre_calc AZ_recalc");
2893 else if (!strcmp(param,
"AZ_reuse")) {
2895 sprintf(msg,
"AZ_pre_calc AZ_reuse");
2899 FEI_COUT <<
"Aztec_LinSysCore: Warning: requested pre_calc <" << param <<
"> not recognized." <<
FEI_ENDL;
2913 if (!strcmp(param,
"AZ_none")) {
2915 sprintf(msg,
"AZ_overlap AZ_none");
2917 else if (!strcmp(param,
"AZ_diag")) {
2919 sprintf(msg,
"AZ_overlap AZ_diag");
2921 else if (!strcmp(param,
"AZ_full")) {
2923 sprintf(msg,
"AZ_overlap AZ_full");
2940 if (!strcmp(param,
"AZ_classic")) {
2942 sprintf(msg,
"AZ_orthog AZ_classic");
2944 else if (!strcmp(param,
"AZ_modified")) {
2946 sprintf(msg,
"AZ_orthog AZ_modified");
2950 FEI_COUT <<
"Aztec_LinSysCore: Warning: requested orthog. <" << param <<
"> not recognized." <<
FEI_ENDL;
2964 if (!strcmp(param,
"AZ_resid")) {
2966 sprintf(msg,
"AZ_aux_vec AZ_resid");
2968 else if (!strcmp(param,
"AZ_rand")) {
2970 sprintf(msg,
"AZ_aux_vec AZ_rand");
2974 FEI_COUT <<
"Aztec_LinSysCore: Warning: requested aux_vec <" << param <<
"> not recognized." <<
FEI_ENDL;
2988 int num = sscanf(param,
"%d", &out);
2989 if (num == 1 && out > -1) {
2990 sprintf(msg,
"AZ_output %d", out);
2993 else if (!strcmp(param,
"AZ_all")) {
2995 sprintf(msg,
"AZ_output AZ_all");
2997 else if (!strcmp(param,
"AZ_none")) {
2999 sprintf(msg,
"AZ_output AZ_none");
3001 else if (!strcmp(param,
"AZ_warnings")) {
3003 sprintf(msg,
"AZ_output AZ_warnings");
3005 else if (!strcmp(param,
"AZ_last")) {
3007 sprintf(msg,
"AZ_output AZ_last");
3011 FEI_COUT <<
"Aztec_LinSysCore: Warning: requested AZ_output <" << param <<
"> not recognized." <<
FEI_ENDL;
3022 int numParams,
char** paramStrings,
3024 const char* parameter =
3026 if (parameter != NULL) {
3027 sscanf(parameter,
"%le", ¶m);
3033 int numParams,
char** paramStrings,
3035 const char* parameter =
3037 if (parameter != NULL) {
3038 sscanf(parameter,
"%d", ¶m);
3048 fprintf(
debugFile_,
"setDebugOutput closing this file.");
3054 int pathLength = strlen(path);
3061 int nameLength = strlen(name);
3068 char* dbFileName =
new char[pathLength + nameLength + 3];
3070 sprintf(dbFileName,
"%s/%s", path, name);
3084 delete [] dbFileName;
3090 AztecDVBR_Matrix* source)
3097 if (nnz == NULL || nblk == NULL || src_nnz==NULL || src_nblk==NULL) {
3098 messageAbort(
"VBRMatPlusScaledMat: allocation failed");
3101 A->getNumNonzerosPerRow(nnz);
3102 A->getNumBlocksPerRow(nblk);
3103 source->getNumNonzerosPerRow(src_nnz);
3104 source->getNumBlocksPerRow(src_nblk);
3106 int i, max_nnz = 0, max_nblk = 0;
3108 if (nnz[i] != src_nnz[i] || nblk[i] != src_nblk[i]) {
3109 messageAbort(
"VBRmatPlusScaledMat: matrix sizes don't match.");
3111 if (max_nnz < nnz[i]) max_nnz = nnz[i];
3112 if (max_nblk < nblk[i]) max_nblk = nblk[i];
3120 double* val =
new double[max_nnz];
3121 int* colInds =
new int[max_nblk];
3122 if (val==NULL || colInds==NULL) {
3123 messageAbort(
"VBRmatPlusScaledMat: allocation failed");
3128 int row = localBlkOffset_+i;
3129 int err = source->getNumBlocksPerRow(row, nnzBlks);
3130 err += source->getNumNonzerosPerRow(row, len);
3131 err += source->getBlockRow(row, val, colInds, nnzBlks);
3133 if (err)
messageAbort(
"VBRmatPlusScaledMat: error getting src row");
3135 for(
int j=0; j<len; j++) val[j] *= scalar;
3137 err = A->sumIntoBlockRow(row, val, colInds, nnzBlks);
3138 if (err)
messageAbort(
"VBRmatPlusScaledMat: error summing in row");
3149 AztecDMSR_Matrix* source)
3151 return(A->addScaledMatrix(scalar, *source));
int putInitialGuess(const int *eqnNumbers, const double *values, int len)
void setAZ_output(const char *param)
int sumInMatrix(double scalar, const Data &data)
virtual int ptEqnToBlkEqn(int ptEqn)=0
int copyInRHSVector(double scalar, const Data &data)
int enforceEssentialBC(int *globalEqn, double *alpha, double *gamma, int len)
bool BCenforcement_no_column_mod_
int blkRowEssBCMod(int blkEqn, int blkOffset, double *val, int *blkCols, int numCols, int numPtNNZ, double alpha, double gamma)
int getMatrixRow(int row, double *coefs, int *indices, int len, int &rowLength)
fei::SharedPtr< Aztec_BlockMap > blkMap_
int setConnectivities(GlobalID elemBlock, int numElements, int numNodesPerElem, const GlobalID *elemIDs, const int *const *connNodes)
int getNumBlocksPerRow(int blkRow, int &nnzBlksPerRow) const
void setPreCalc(const char *param)
int putIntoSystemMatrix(int numPtRows, const int *ptRows, int numPtCols, const int *ptCols, const double *const *values)
void matvec(const Aztec_LSVector &x, Aztec_LSVector &y) const
int setNumRHSVectors(int numRHSs, const int *rhsIDs)
int VBRmatPlusScaledMat(AztecDVBR_Matrix *A, double scalar, AztecDVBR_Matrix *source)
int getNumNonzerosPerRow(int blkRow, int &nnzPerRow) const
void setTypeName(const char *name)
AZ_MATRIX * getAZ_MATRIX_Ptr() const
int setLookup(Lookup &lookup)
int getRHSVectorPtr(Data &data)
LinearSystemCore * clone()
void setScalingOption(const char *param)
AztecDMSR_Matrix * A_ptr_
int getBlkEqnsAndOffsets(int *ptEqns, int *blkEqns, int *blkOffsets, int numEqns)
int resetRHSVector(double s)
int writeA(const char *name)
virtual int getBlkEqnSize(int blkEqn)=0
int blkColEssBCMod(int blkRow, int blkEqn, int blkOffset, double *val, int *blkCols, int numCols, int numPtNNZ, double alpha, double gamma)
int enforceBlkRemoteEssBCs(int numEqns, int *blkEqns, int **blkColInds, int **blkColOffsets, int *blkColLens, double **remEssBCCoefs)
int sumIntoRHSVector(int num, const double *values, const int *indices)
int writeVec(Aztec_LSVector *v, const char *name)
int sumInRHSVector(double scalar, const Data &data)
std::map< std::string, unsigned > & named_solve_counter_
AztecDVBR_Matrix * blkA_ptr_
virtual ~Aztec_LinSysCore()
virtual int getOffsetIntoBlkEqn(int blkEqn, int ptEqn)=0
int mergeStringLists(char **&strings, int &numStrings, const char *const *stringsToMerge, int numStringsToMerge)
void debugOutput(const char *msg) const
void addVec(double s, const Aztec_LSVector &c)
void checkForParam(const char *paramName, int numParams_, char **paramStrings, double ¶m)
int sumPointIntoBlockRow(int blkRow, int rowOffset, int blkCol, int colOffset, double value)
void setConvTest(const char *param)
int sumIntoBlockRow(int numBlkRows, const int *blkRows, int numBlkCols, const int *blkCols, const double *const *values, int numPtCols, bool overwriteInsteadOfAccumulate)
int launchSolver(int &solveStatus, int &iterations)
bool writeToFile(const char *fileName) const
void setAuxVec(const char *param)
int binarySearch(const T &item, const T *list, int len)
fei::SharedPtr< Aztec_Map > map_
int resetMatrixAndVector(double s)
int putIntoRHSVector(int num, const double *values, const int *indices)
int parameters(int numParams, const char *const *params)
int destroyMatrixData(Data &data)
bool needNewPreconditioner_
void setOrthog(const char *param)
int getSolnEntry(int eqnNumber, double &answer)
int destroyVectorData(Data &data)
void checkForOption(const char *paramName, int numParams_, char **paramStrings, int ¶m)
int * getRemoteBlockIndices()
int getBlockSize(int blkInd)
int enforceBlkEssentialBC(int *blkEqn, int *blkOffset, double *alpha, double *gamma, int len)
bool explicitDirichletBCs_
int setGlobalOffsets(int len, int *nodeOffsets, int *eqnOffsets, int *blkEqnOffsets)
int selectSolver(const char *name)
int setMatrixStructure(int **ptColIndices, int *ptRowLengths, int **blkColIndices, int *blkRowLengths, int *ptRowsPerBlkRow)
const char * getParam(const char *key, int numParams, const char *const *paramStrings)
const double * startPointer() const
int getMatrixPtr(Data &data)
int explicitlySetDirichletBCs()
int * getRemoteBlockSizes()
int getBlockRow(int blk_row, double *vals, int *blk_col_inds, int num_nz_blocks) const
void setSubdomainSolve(const char *name)
void * getDataPtr() const
std::ostream & console_out()
int getMatrixRowLength(int row, int &length)
void setDataPtr(void *ptr)
int blockRowToPointRow(int blkRow)
int sumIntoBlockRow(int blk_row, double *vals, int *blk_col_inds, int num_nz_blocks) const
const char * getTypeName() const
int sumIntoPointRow(int numPtRows, const int *ptRows, int numPtCols, const int *ptColIndices, const double *const *values, bool overwriteInsteadOfAccumulate)
int allocateMatrix(int **ptColIndices, int *ptRowLengths, int **blkColIndices, int *blkRowLengths, int *ptRowsPerBlkRow)
int sumIntoSystemMatrix(int numPtRows, const int *ptRows, int numPtCols, const int *ptCols, int numBlkRows, const int *blkRows, int numBlkCols, const int *blkCols, const double *const *values)
void setDebugOutput(const char *path, const char *name)
int getFromRHSVector(int num, double *values, const int *indices)
int copyOutMatrix(double scalar, Data &data)
int createBlockMatrix(int **blkColIndices, int *blkRowLengths, int *ptRowsPerBlkRow)
int copyOutRHSVector(double scalar, Data &data)
int MSRmatPlusScaledMat(AztecDMSR_Matrix *A, double scalar, AztecDMSR_Matrix *source)
int formResidual(double *values, int len)
int copyInMatrix(double scalar, const Data &data)
int writeSystem(const char *name)
int getSolution(double *answers, int len)
void allocate(int *num_nz_blocks, int *blk_col_inds)
bool tooLateToChooseBlock_
int resetMatrix(double s)
int selectPreconditioner(const char *name)
void setTypeOverlap(const char *param)
#define FEI_OSTRINGSTREAM
const char * getParamValue(const char *key, int numParams, const char *const *paramStrings, char separator=' ')
Aztec_LinSysCore(MPI_Comm comm)
int getBlockSize(int blkRow, int blkCol, int &ptRows, int &ptCols)
int searchList(const T &item, const T *list, int len)
int messageAbort(const char *msg) const
int getBlockRow(int blkRow, double *&val, int &valLen, int *&blkColInds, int &blkColIndLen, int &numNzBlks, int &numNNZ)
int copyBlockRow(int i, const int *blkRows, int numBlkCols, const int *blkCols, const double *const *values, double *coefs)
int enforceRemoteEssBCs(int numEqns, int *globalEqns, int **colIndices, int *colIndLen, double **coefs)
int putBlockRow(int blk_row, double *vals, int *blk_col_inds, int num_nz_blocks) const
int setMatrixType(const char *name)
void setOverlap(const char *param)