Fixed but in common/TwoPhase.h

This commit is contained in:
James E McClure 2015-08-17 20:22:17 -04:00
parent 73aaf563a7
commit 298f1dd15a

View File

@ -795,7 +795,7 @@ void TwoPhase::ComponentAverages(){
printf("Component averages computed locally -- reducing result... \n");
}
// Globally reduce the non-wetting phase averages
RecvBuffer.resize(BLOB_AVG_COUNT*NumberComponents_NWP);
RecvBuffer.resize(BLOB_AVG_COUNT,NumberComponents_NWP);
/* for (int b=0; b<NumberComponents_NWP; b++){
MPI_Barrier(MPI_COMM_WORLD);
MPI_Allreduce(&ComponentAverages_NWP(0,b),&RecvBuffer(0),BLOB_AVG_COUNT,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
@ -803,11 +803,11 @@ void TwoPhase::ComponentAverages(){
}
*/
MPI_Barrier(MPI_COMM_WORLD);
MPI_Allreduce(&ComponentAverages_NWP(0,b),&RecvBuffer(0),BLOB_AVG_COUNT*NumberComponents_NWP,
MPI_Allreduce(&ComponentAverages_NWP(0,0),&RecvBuffer(0,0),BLOB_AVG_COUNT*NumberComponents_NWP,
MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
for (int b=0; b<NumberComponents_NWP; b++){
for (int idx=0; idx<BLOB_AVG_COUNT; idx++) ComponentAverages_NWP(idx,b)=RecvBuffer(idx);
for (int idx=0; idx<BLOB_AVG_COUNT; idx++) ComponentAverages_NWP(idx,b)=RecvBuffer(b,idx);
}
for (int b=0; b<NumberComponents_NWP; b++){
if (ComponentAverages_NWP(VOL,b) > 0.0){