Including two Euler characteristic computations
This commit is contained in:
parent
9b0e862501
commit
016bc1e0ed
@ -12,7 +12,7 @@
|
||||
#include "IO/Reader.h"
|
||||
#include "IO/Writer.h"
|
||||
|
||||
#define BLOB_AVG_COUNT 34
|
||||
#define BLOB_AVG_COUNT 35
|
||||
|
||||
// Array access for averages defined by the following
|
||||
#define VOL 0
|
||||
@ -49,7 +49,7 @@
|
||||
#define CMY 31
|
||||
#define CMZ 32
|
||||
#define EULER 33
|
||||
|
||||
#define INTCURV 34
|
||||
|
||||
#define PI 3.14159265359
|
||||
|
||||
@ -147,14 +147,14 @@ TwoPhase::TwoPhase(Domain &dm):
|
||||
fprintf(TIMELOG,"Gwnxx Gwnyy Gwnzz Gwnxy Gwnxz Gwnyz "); // Orientation tensors
|
||||
fprintf(TIMELOG,"Gwsxx Gwsyy Gwszz Gwsxy Gwsxz Gwsyz ");
|
||||
fprintf(TIMELOG,"Gnsxx Gnsyy Gnszz Gnsxy Gnsxz Gnsyz ");
|
||||
fprintf(TIMELOG,"trawn trJwn trRwn Euler Jn An\n"); // trimmed curvature & minkowski measures
|
||||
fprintf(TIMELOG,"trawn trJwn trRwn Euler Kn Jn An\n"); // trimmed curvature & minkowski measures
|
||||
//fprintf(TIMELOG,"--------------------------------------------------------------------------------------\n");
|
||||
}
|
||||
|
||||
NWPLOG = fopen("components.NWP.tcat","a+");
|
||||
fprintf(NWPLOG,"time label vol pn awn ans Jwn Kwn lwns cwns ");
|
||||
fprintf(NWPLOG,"vx vy vz vwnx vwny vwnz vwnsx vwnsy vwnsz vsq ");
|
||||
fprintf(NWPLOG,"Gwnxx Gwnyy Gwnzz Gwnxy Gwnxz Gwnyz Cx Cy Cz trawn trJwn Euler\n");
|
||||
fprintf(NWPLOG,"Gwnxx Gwnyy Gwnzz Gwnxy Gwnxz Gwnyz Cx Cy Cz trawn trJwn Kn Euler\n");
|
||||
|
||||
WPLOG = fopen("components.WP.tcat","a+");
|
||||
fprintf(WPLOG,"time label vol pw awn ans Jwn Kwn lwns cwns ");
|
||||
@ -254,7 +254,7 @@ void TwoPhase::Initialize()
|
||||
KGwns = KNwns = 0.0;
|
||||
Jwn = Kwn = efawns = 0.0;
|
||||
trJwn = trawn = trRwn = 0.0;
|
||||
euler = Jn = An = 0.0;
|
||||
euler = Jn = An = Kn = 0.0;
|
||||
}
|
||||
|
||||
|
||||
@ -471,9 +471,10 @@ void TwoPhase::ComputeLocal()
|
||||
Jn += pmmc_CubeSurfaceInterpValue(CubeValues,MeanCurvature,nw_pts,nw_tris,Values,
|
||||
i,j,k,n_nw_pts,n_nw_tris);
|
||||
// Compute Euler characteristic from integral of gaussian curvature
|
||||
euler += pmmc_CubeSurfaceInterpValue(CubeValues,GaussCurvature,nw_pts,nw_tris,Values,
|
||||
Kn += pmmc_CubeSurfaceInterpValue(CubeValues,GaussCurvature,nw_pts,nw_tris,Values,
|
||||
i,j,k,n_nw_pts,n_nw_tris);
|
||||
|
||||
euler += geomavg_EulerCharacteristic(nw_pts,nw_tris,n_nw_pts,n_nw_tris,i,j,k);
|
||||
|
||||
}
|
||||
}
|
||||
@ -735,9 +736,12 @@ void TwoPhase::ComponentAverages()
|
||||
// Compute Euler characteristic from integral of gaussian curvature
|
||||
euler = pmmc_CubeSurfaceInterpValue(CubeValues,GaussCurvature,nw_pts,nw_tris,Values,
|
||||
i,j,k,n_nw_pts,n_nw_tris);
|
||||
//euler = geomavg_EulerCharacteristic(nw_pts,nw_tris,n_nw_pts,n_nw_tris,i,j,k);
|
||||
ComponentAverages_NWP(INTCURV,LabelNWP) += euler;
|
||||
|
||||
// Compute the Euler characteristic from vertices - faces + edges
|
||||
euler = geomavg_EulerCharacteristic(nw_pts,nw_tris,n_nw_pts,n_nw_tris,i,j,k);
|
||||
ComponentAverages_NWP(EULER,LabelNWP) += euler;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1102,6 +1106,7 @@ void TwoPhase::Reduce()
|
||||
MPI_Allreduce(&euler,&euler_global,1,MPI_DOUBLE,MPI_SUM,Dm.Comm);
|
||||
MPI_Allreduce(&An,&An_global,1,MPI_DOUBLE,MPI_SUM,Dm.Comm);
|
||||
MPI_Allreduce(&Jn,&Jn_global,1,MPI_DOUBLE,MPI_SUM,Dm.Comm);
|
||||
MPI_Allreduce(&Kn,&Kn_global,1,MPI_DOUBLE,MPI_SUM,Dm.Comm);
|
||||
|
||||
MPI_Barrier(Dm.Comm);
|
||||
|
||||
@ -1188,7 +1193,7 @@ void TwoPhase::PrintAll(int timestep)
|
||||
fprintf(TIMELOG,"%.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(TIMELOG,"%.5g %.5g %.5g ",trawn_global, trJwn_global, trRwn_global); // Trimmed curvature
|
||||
fprintf(TIMELOG,"%.5g %.5g %.5g\n",euler_global, Jn_global, An_global); // minkowski measures
|
||||
fprintf(TIMELOG,"%.5g %.5g %.5g\n",euler_global, Kn_global, Jn_global, An_global); // minkowski measures
|
||||
fflush(TIMELOG);
|
||||
}
|
||||
}
|
||||
@ -1237,6 +1242,7 @@ void TwoPhase::PrintComponents(int timestep)
|
||||
fprintf(NWPLOG,"%.5g ",ComponentAverages_NWP(CMZ,b));
|
||||
fprintf(NWPLOG,"%.5g ",ComponentAverages_NWP(TRAWN,b));
|
||||
fprintf(NWPLOG,"%.5g ",ComponentAverages_NWP(TRJWN,b));
|
||||
fprintf(NWPLOG,"%.5g ",ComponentAverages_NWP(INTCURV,b));
|
||||
fprintf(NWPLOG,"%.5g\n",ComponentAverages_NWP(EULER,b));
|
||||
// fprintf(NWPLOG,"%.5g ",ComponentAverages_NWP(NVERT,b));
|
||||
// fprintf(NWPLOG,"%.5g ",ComponentAverages_NWP(NSIDE,b));
|
||||
|
@ -82,8 +82,8 @@ public:
|
||||
double awn_global,ans_global,aws_global;
|
||||
double lwns_global;
|
||||
double efawns,efawns_global; // averaged contact angle
|
||||
double euler,Jn,An;
|
||||
double euler_global,Jn_global,An_global;
|
||||
double euler,Kn,Jn,An;
|
||||
double euler_global,Kn_global,Jn_global,An_global;
|
||||
|
||||
double Jwn,Jwn_global; // average mean curavture - wn interface
|
||||
double Kwn,Kwn_global; // average Gaussian curavture - wn interface
|
||||
|
Loading…
Reference in New Issue
Block a user