diff --git a/packages/muelu/research/mmayr/composite_to_regions/src/SetupRegionMatrix_def.hpp b/packages/muelu/research/mmayr/composite_to_regions/src/SetupRegionMatrix_def.hpp index d422b8a019bc..b8d17585fea0 100644 --- a/packages/muelu/research/mmayr/composite_to_regions/src/SetupRegionMatrix_def.hpp +++ b/packages/muelu/research/mmayr/composite_to_regions/src/SetupRegionMatrix_def.hpp @@ -523,7 +523,7 @@ void MakeQuasiregionMatrices(const RCP 1) { - vals[c] *= 0.5; + vals[c] *= (1.0/ ((double) commonRegions.size())) ; } } diff --git a/packages/muelu/research/regionMG/examples/structured/Driver_Structured_Regions.cpp b/packages/muelu/research/regionMG/examples/structured/Driver_Structured_Regions.cpp index d3439b9b44c6..a0471733cb59 100644 --- a/packages/muelu/research/regionMG/examples/structured/Driver_Structured_Regions.cpp +++ b/packages/muelu/research/regionMG/examples/structured/Driver_Structured_Regions.cpp @@ -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::Write("rhs.mm",*B); + Xpetra::IO::Write("x.mm",*X); +#endif out << galeriStream.str(); comm->barrier(); @@ -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; } @@ -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"; }