diff --git a/common/TwoPhase.cpp b/common/TwoPhase.cpp index 00cb03c9..8e25d008 100644 --- a/common/TwoPhase.cpp +++ b/common/TwoPhase.cpp @@ -151,7 +151,7 @@ TwoPhase::TwoPhase(Domain &dm): fprintf(TIMELOG,"Gnsxx Gnsyy Gnszz Gnsxy Gnsxz Gnsyz "); fprintf(TIMELOG,"trawn trJwn trRwn "); //trimmed curvature, fprintf(TIMELOG,"wwndnw wwnsdnwn Jwnwwndnw "); //kinematic quantities, - fprintf(TIMELOG,"Euler Kn Jn An\n"); //miknowski measures + fprintf(TIMELOG,"Euler Kn Jn An\n"); //miknowski measures, } NWPLOG = fopen("components.NWP.tcat","a+"); @@ -1223,41 +1223,6 @@ void TwoPhase::PrintAll(int timestep) } } -void TwoPhase::PrintGeometry(int timestep) -{ - if (Dm.rank==0){ - GEOMETRY = fopen("geometry.tcat","a+"); - - // If timelog is empty, write a short header to list the averages - //fprintf(GEOMETRY,"--------------------------------------------------------------------------------------\n"); - fprintf(GEOMETRY,"time sw awn ans aws Jwn Kwn lwns cwns KNwns KGwns "); // Scalar averages - fprintf(GEOMETRY,"Gwnxx Gwnyy Gwnzz Gwnxy Gwnxz Gwnyz "); // Orientation tensors - fprintf(GEOMETRY,"Gwsxx Gwsyy Gwszz Gwsxy Gwsxz Gwsyz "); - fprintf(GEOMETRY,"Gnsxx Gnsyy Gnszz Gnsxy Gnsxz Gnsyz "); - fprintf(GEOMETRY,"trawn trJwn trRwn "); //trimmed curvature, - fprintf(GEOMETRY,"wwndnw wwnsdnwn Jwnwwndnw "); //kinematic quantities, - fprintf(GEOMETRY,"Euler Kn Jn An\n"); //miknowski measures - - fprintf(GEOMETRY,"%i %.5g ",timestep, sat_w); // time and saturation - fprintf(GEOMETRY,"%.5g %.5g %.5g ",awn_global,ans_global,aws_global); // interfacial areas - fprintf(GEOMETRY,"%.5g %.5g ",Jwn_global, Kwn_global); // curvature of wn interface - fprintf(GEOMETRY,"%.5g ",lwns_global); // common curve length - fprintf(GEOMETRY,"%.5g ",efawns_global); // average contact angle - fprintf(GEOMETRY,"%.5g %.5g ",KNwns_global, KGwns_global); // curvature of wn interface - fprintf(GEOMETRY,"%.5g %.5g %.5g %.5g %.5g %.5g ", - Gwn_global(0),Gwn_global(1),Gwn_global(2),Gwn_global(3),Gwn_global(4),Gwn_global(5)); // orientation of wn interface - fprintf(GEOMETRY,"%.5g %.5g %.5g %.5g %.5g %.5g ", - Gns_global(0),Gns_global(1),Gns_global(2),Gns_global(3),Gns_global(4),Gns_global(5)); // orientation of ns interface - fprintf(GEOMETRY,"%.5g %.5g %.5g %.5g %.5g %.5g ", - Gws_global(0),Gws_global(1),Gws_global(2),Gws_global(3),Gws_global(4),Gws_global(5)); // orientation of ws interface - fprintf(GEOMETRY,"%.5g %.5g %.5g ",trawn_global, trJwn_global, trRwn_global); // Trimmed curvature - fprintf(GEOMETRY,"%.5g %.5g %.5g ",wwndnw_global, wwnsdnwn_global, Jwnwwndnw_global); // kinematic quantities - fprintf(GEOMETRY,"%.5g %.5g %.5g %.5g\n",euler_global, Kn_global, Jn_global, An_global); // minkowski measures - fflush(GEOMETRY); - } -} - - void TwoPhase::PrintComponents(int timestep) { if (Dm.rank==0){ diff --git a/common/TwoPhase.h b/common/TwoPhase.h index 3dbd7d84..3b2e373f 100644 --- a/common/TwoPhase.h +++ b/common/TwoPhase.h @@ -160,7 +160,6 @@ public: void WriteSurfaces(int logcount); void NonDimensionalize(double D, double viscosity, double IFT); void PrintAll(int timestep); - void PrintGeometry(int timestep); int GetCubeLabel(int i, int j, int k, IntArray &BlobLabel); void SortBlobs(); void PrintComponents(int timestep); diff --git a/tests/lbpm_segmented_pp.cpp b/tests/lbpm_segmented_pp.cpp index 248caf95..a76ba5fb 100644 --- a/tests/lbpm_segmented_pp.cpp +++ b/tests/lbpm_segmented_pp.cpp @@ -246,27 +246,21 @@ int main(int argc, char **argv) // fclose(PHASE); double beta = 0.95; - int timestep=5; if (rank==0) printf("initializing the system \n"); - Averages.Initialize(); Averages.UpdateSolid(); Averages.UpdateMeshValues(); Dm.CommunicateMeshHalo(Averages.Phase); Dm.CommunicateMeshHalo(Averages.SDn); Dm.CommunicateMeshHalo(Averages.SDs); - if (rank==0) printf("Computing the averages \n"); - Averages.ComputeLocal(); - Averages.Reduce(); + int timestep=5; + Averages.Initialize(); + if (rank==0) printf("computing phase components \n"); + Averages.ComponentAverages(); + if (rank==0) printf("sorting phase components \n"); + Averages.SortBlobs(); + Averages.PrintComponents(timestep); - if (rank==0) printf("Printing geometric averages \n"); - Averages.PrintGeometry(timestep); - - /* Averages.Initialize(); - Averages.ComponentAverages(); - Averages.SortBlobs(); - Averages.PrintComponents(timestep); - */ MPI_Barrier(comm); MPI_Finalize(); return 0;