NWP blob average is segfaulting?

This commit is contained in:
James E McClure 2015-08-17 21:29:22 -04:00
parent f806b3235f
commit f81df060de

View File

@ -1208,8 +1208,8 @@ void TwoPhase::PrintAll(int timestep){
void TwoPhase::PrintComponents(int timestep){ void TwoPhase::PrintComponents(int timestep){
if (Dm.rank==0){ if (Dm.rank==0){
printf("PRINT COMPONENT AVEREAGES: time = %i \n",timestep); printf("PRINT %i COMPONENT AVEREAGES: time = %i \n",ComponentAverages_NWP.size(1),timestep);
for (int b=0; b<NumberComponents_NWP; b++){ for (int b=0; b<ComponentAverages_NWP.size(1); b++){
if (ComponentAverages_NWP(TRIMVOL,b) > 0.0){ if (ComponentAverages_NWP(TRIMVOL,b) > 0.0){
fprintf(NWPLOG,"%i ",timestep-5); fprintf(NWPLOG,"%i ",timestep-5);
fprintf(NWPLOG,"%i ",b); fprintf(NWPLOG,"%i ",b);
@ -1242,11 +1242,12 @@ void TwoPhase::PrintComponents(int timestep){
fprintf(NWPLOG,"%.5g ",ComponentAverages_NWP(CMY,b)); fprintf(NWPLOG,"%.5g ",ComponentAverages_NWP(CMY,b));
fprintf(NWPLOG,"%.5g ",ComponentAverages_NWP(CMZ,b)); fprintf(NWPLOG,"%.5g ",ComponentAverages_NWP(CMZ,b));
fprintf(NWPLOG,"%.5g ",ComponentAverages_WP(TRAWN,b)); fprintf(NWPLOG,"%.5g ",ComponentAverages_WP(TRAWN,b));
fprintf(NWPLOG,"%.5g\n",ComponentAverages_WP(TRJWN,b)); } fprintf(NWPLOG,"%.5g\n",ComponentAverages_WP(TRJWN,b));
}
} }
fflush(NWPLOG); fflush(NWPLOG);
for (int b=0; b<NumberComponents_WP; b++){ /* for (int b=0; b<NumberComponents_WP; b++){
if (ComponentAverages_WP(TRIMVOL,b) > 0.0){ if (ComponentAverages_WP(TRIMVOL,b) > 0.0){
fprintf(WPLOG,"%i ",timestep-5); fprintf(WPLOG,"%i ",timestep-5);
fprintf(WPLOG,"%i ",b); fprintf(WPLOG,"%i ",b);
@ -1284,7 +1285,7 @@ void TwoPhase::PrintComponents(int timestep){
} }
} }
fflush(WPLOG); fflush(WPLOG);
*/
} }
} }