Revert "Untested changes to compute geometric information from segmented images -- must check build"

This reverts commit 6cc6743ee6.
This commit is contained in:
James E McClure 2016-02-28 17:56:57 -05:00
parent c6e3004101
commit a6e9bf3dd1
3 changed files with 8 additions and 50 deletions

View File

@ -151,7 +151,7 @@ TwoPhase::TwoPhase(Domain &dm):
fprintf(TIMELOG,"Gnsxx Gnsyy Gnszz Gnsxy Gnsxz Gnsyz "); fprintf(TIMELOG,"Gnsxx Gnsyy Gnszz Gnsxy Gnsxz Gnsyz ");
fprintf(TIMELOG,"trawn trJwn trRwn "); //trimmed curvature, fprintf(TIMELOG,"trawn trJwn trRwn "); //trimmed curvature,
fprintf(TIMELOG,"wwndnw wwnsdnwn Jwnwwndnw "); //kinematic quantities, 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+"); 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) void TwoPhase::PrintComponents(int timestep)
{ {
if (Dm.rank==0){ if (Dm.rank==0){

View File

@ -160,7 +160,6 @@ public:
void WriteSurfaces(int logcount); void WriteSurfaces(int logcount);
void NonDimensionalize(double D, double viscosity, double IFT); void NonDimensionalize(double D, double viscosity, double IFT);
void PrintAll(int timestep); void PrintAll(int timestep);
void PrintGeometry(int timestep);
int GetCubeLabel(int i, int j, int k, IntArray &BlobLabel); int GetCubeLabel(int i, int j, int k, IntArray &BlobLabel);
void SortBlobs(); void SortBlobs();
void PrintComponents(int timestep); void PrintComponents(int timestep);

View File

@ -246,27 +246,21 @@ int main(int argc, char **argv)
// fclose(PHASE); // fclose(PHASE);
double beta = 0.95; double beta = 0.95;
int timestep=5;
if (rank==0) printf("initializing the system \n"); if (rank==0) printf("initializing the system \n");
Averages.Initialize();
Averages.UpdateSolid(); Averages.UpdateSolid();
Averages.UpdateMeshValues(); Averages.UpdateMeshValues();
Dm.CommunicateMeshHalo(Averages.Phase); Dm.CommunicateMeshHalo(Averages.Phase);
Dm.CommunicateMeshHalo(Averages.SDn); Dm.CommunicateMeshHalo(Averages.SDn);
Dm.CommunicateMeshHalo(Averages.SDs); Dm.CommunicateMeshHalo(Averages.SDs);
if (rank==0) printf("Computing the averages \n"); int timestep=5;
Averages.ComputeLocal(); Averages.Initialize();
Averages.Reduce(); 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_Barrier(comm);
MPI_Finalize(); MPI_Finalize();
return 0; return 0;