ComponentLabel compiles making it run

This commit is contained in:
James E McClure 2015-07-11 22:58:57 -04:00
parent 6e47fde840
commit 30befa961c
2 changed files with 11 additions and 8 deletions

View File

@ -328,9 +328,9 @@ int ComputeLocalPhaseComponent(IntArray &PhaseID, int VALUE, IntArray &Component
for (size_t i=0; i<Nx; i++) {
if ( PhaseID(i,j,k) == VALUE) {
// Solid phase
ComponentLabel(i,j,k) = -2;
} else{
ComponentLabel(i,j,k) = -1;
} else{
ComponentLabel(i,j,k) = -2;
}
}
}

View File

@ -391,20 +391,20 @@ int main(int argc, char **argv)
if (SignDist(i,j,k) < 0.0){
// Solid phase
PhaseLabel(i,j,k) = 0;
WP(i,j,k) = -2;
NWP(i,j,k) = -2;
//WP(i,j,k) = -2;
//NWP(i,j,k) = -2;
}
else if (Phase(i,j,k) < 0){
// non-wetting phase
PhaseLabel(i,j,k) = 1;
WP(i,j,k) = -2;
NWP(i,j,k) = -1;
//WP(i,j,k) = -2;
//NWP(i,j,k) = -1;
}
else {
// wetting phase
PhaseLabel(i,j,k) = 2;
WP(i,j,k) = -1;
NWP(i,j,k) = -2;
//WP(i,j,k) = -1;
//NWP(i,j,k) = -2;
}
}
}
@ -493,6 +493,9 @@ int main(int argc, char **argv)
int number_NWP_components = ComputeLocalPhaseComponent(PhaseLabel,1,NWP,false);
int number_WP_components = ComputeLocalPhaseComponent(PhaseLabel,2,WP,false);
printf("Number of WP components = %i \n",number_WP_components);
printf("Number of NWP components = %i \n",number_NWP_components);
DoubleArray BlobAverages(NUM_AVERAGES,number_NWP_components);
// Map the signed distance for the analysis