Skip to content

Commit

Permalink
Merge Pull Request trilinos#5347 from trilinos/Trilinos/rstumin-6db49ac
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: structured region fix
PR Author: rstumin
  • Loading branch information
trilinos-autotester authored Jun 7, 2019
2 parents 8cf1a52 + 6db49ac commit ed24ab0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ void MakeQuasiregionMatrices(const RCP<Xpetra::CrsMatrixWrap<Scalar, LocalOrdina
}

if (commonRegions.size() > 1) {
vals[c] *= 0.5;
vals[c] *= (1.0/ ((double) commonRegions.size())) ;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ int main_(Teuchos::CommandLineProcessor &clp, Xpetra::UnderlyingLib& lib, int ar
B->scale(one/norms[0]);
galeriStream << "Galeri complete.\n========================================================" << std::endl;

#ifdef MATLAB_COMPARE
B->putScalar(zero);
Xpetra::IO<Scalar,LocalOrdinal,GlobalOrdinal,Node>::Write("rhs.mm",*B);
Xpetra::IO<Scalar,LocalOrdinal,GlobalOrdinal,Node>::Write("x.mm",*X);
#endif
out << galeriStream.str();

comm->barrier();
Expand Down Expand Up @@ -853,7 +858,7 @@ int main_(Teuchos::CommandLineProcessor &clp, Xpetra::UnderlyingLib& lib, int ar
for(LO i = 0; i < lNodesPerDim[0]; ++i) {
sendGIDs[countIDs] = i
+ startGID + (lNodesPerDim[2] - 1)*gNodesPerDim[1]*gNodesPerDim[0]
+ (lNodesPerDim[0] - 1)*gNodesPerDim[0];
+ (lNodesPerDim[1] - 1)*gNodesPerDim[0];
sendPIDs[countIDs] = myRank + procsPerDim[1]*procsPerDim[0] + procsPerDim[0];
++countIDs;
}
Expand Down Expand Up @@ -1313,7 +1318,11 @@ int main_(Teuchos::CommandLineProcessor &clp, Xpetra::UnderlyingLib& lib, int ar
// Output current residual norm to screen (on proc 0 only)
if (myRank == 0)
{
#ifdef MATLAB_COMPARE
printf("%d: %24.17e\n",cycle,normRes);
#else
std::cout << cycle << "\t" << normRes << std::endl;
#endif
(*log) << cycle << "\t" << normRes << "\n";
}

Expand Down

0 comments on commit ed24ab0

Please sign in to comment.