From c14f70b58417c71d0008ac139a7112293e8b49ad Mon Sep 17 00:00:00 2001 From: James E McClure Date: Fri, 26 Apr 2019 17:36:22 -0400 Subject: [PATCH] generalize morphopen --- tests/lbpm_morphopen_pp.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/lbpm_morphopen_pp.cpp b/tests/lbpm_morphopen_pp.cpp index 0cdd9c77..d6ec41a9 100644 --- a/tests/lbpm_morphopen_pp.cpp +++ b/tests/lbpm_morphopen_pp.cpp @@ -62,7 +62,14 @@ int main(int argc, char **argv) auto ReadValues = domain_db->getVector( "ReadValues" ); auto WriteValues = domain_db->getVector( "WriteValues" ); SW = domain_db->getScalar("Sw"); - + signed char ErodeLabel=2; + signed char OpenLabel=1; + if (domain_db->keyExists( "OpenLabel" )){ + OpenLabel = domain_db->getScalar("OpenLabel"); + } + if (domain_db->keyExists( "ErodeLabel" )){ + ErodeLabel = domain_db->getScalar("ErodeLabel"); + } // Generate the NWP configuration //if (rank==0) printf("Initializing morphological distribution with critical radius %f \n", Rcrit); if (rank==0) printf("Performing morphological opening with target saturation %f \n", SW); @@ -126,7 +133,7 @@ int main(int argc, char **argv) MPI_Barrier(comm); // Run the morphological opening - MorphOpen(SignDist, id, Dm, SW); + MorphOpen(SignDist, id, Dm, SW, ErodeLabel, OpenLabel); // calculate distance to non-wetting fluid if (domain_db->keyExists( "HistoryLabels" )){