morph open connected

This commit is contained in:
James E McClure
2019-05-03 19:23:54 -04:00
parent 5bb2bcb62a
commit 04bd5eda23

View File

@@ -869,7 +869,7 @@ double ScaLBL_ColorModel::MorphOpenConnected(double target_volume_change){
signed char water=2;
signed char notwater=1;
double SW=-(target_volume_change)/count_connected;
MorphOpen(distance, id_connected, Dm, SW, notwater, water);
MorphOpen(distance, id_connected, Dm, SW, water, notwater);
int count_morphopen=0.0;
for (int k=0; k<nz; k++){
@@ -887,7 +887,7 @@ double ScaLBL_ColorModel::MorphOpenConnected(double target_volume_change){
count_morphopen=sumReduce( Dm->Comm, count_morphopen);
volume_change = double(count_morphopen - count_connected);
if (rank==0) printf(" opening of connected oil %f \n",volume_change);
if (rank==0) printf(" opening of connected oil %f \n",volume_change/count_connected);
ScaLBL_CopyToDevice(Phi,phase.data(),N*sizeof(double));
ScaLBL_PhaseField_Init(dvcMap, Phi, Den, Aq, Bq, 0, ScaLBL_Comm->LastExterior(), Np);