Updated tests/TestContactAngle.cpp

This commit is contained in:
James McClure 2014-12-29 18:23:49 -05:00
parent 59ce27b3a6
commit 9747aff13e

View File

@ -37,7 +37,6 @@ int main (int argc, char *argv[])
DoubleArray MeanCurvature(Nx,Ny,Nz); DoubleArray MeanCurvature(Nx,Ny,Nz);
double fluid_isovalue = 0.0; double fluid_isovalue = 0.0;
double solid_isovalue = 0.0; double solid_isovalue = 0.0;
/* **************************************************************** /* ****************************************************************
VARIABLES FOR THE PMMC ALGORITHM VARIABLES FOR THE PMMC ALGORITHM
@ -89,8 +88,7 @@ int main (int argc, char *argv[])
DoubleArray values(20); DoubleArray values(20);
DTMutableList<Point> local_nws_pts(20); DTMutableList<Point> local_nws_pts(20);
int n_local_nws_pts; int n_local_nws_pts;
int c; int c;
//........................................................................... //...........................................................................
int ncubes = (Nx-2)*(Ny-2)*(Nz-2); // Exclude the "upper" halo int ncubes = (Nx-2)*(Ny-2)*(Nz-2); // Exclude the "upper" halo
@ -100,9 +98,9 @@ int main (int argc, char *argv[])
double Cx,Cy,Cz; double Cx,Cy,Cz;
double dist1,dist2; double dist1,dist2;
Cx = Cy = Cz = N*0.51; Cx = Cy = Cz = N*0.51;
for (k=0; k<N; k++){ for (k=0; k<Nz; k++){
for (j=0; j<N; j++){ for (j=0; j<Ny; j++){
for (i=0; i<N; i++){ for (i=0; i<Nx; i++){
dist1 = sqrt((i-Cx)*(i-Cx)+(j-Cy)*(j-Cy)) - RADIUS; dist1 = sqrt((i-Cx)*(i-Cx)+(j-Cy)*(j-Cy)) - RADIUS;
dist2 = sqrt((i-Cx)*(i-Cx)+(j-Cy)*(j-Cy)+(k-Cz)*(k-Cz)) - CAPRAD; dist2 = sqrt((i-Cx)*(i-Cx)+(j-Cy)*(j-Cy)+(k-Cz)*(k-Cz)) - CAPRAD;
@ -166,6 +164,8 @@ int main (int argc, char *argv[])
aws += pmmc_CubeSurfaceArea(ws_pts,ws_tris,n_ws_tris); aws += pmmc_CubeSurfaceArea(ws_pts,ws_tris,n_ws_tris);
As += pmmc_CubeSurfaceArea(local_sol_pts,local_sol_tris,n_local_sol_tris); As += pmmc_CubeSurfaceArea(local_sol_pts,local_sol_tris,n_local_sol_tris);
lwns += pmmc_CubeCurveLength(local_nws_pts,n_local_nws_pts); lwns += pmmc_CubeCurveLength(local_nws_pts,n_local_nws_pts);
printf("%i, %i, %i \n",i,j,k);
} }
KGwns /= lwns; KGwns /= lwns;
KNwns /= lwns; KNwns /= lwns;