generalize morphopen

This commit is contained in:
James E McClure 2019-04-26 17:36:22 -04:00
parent d5d0b18d72
commit c14f70b584

View File

@ -62,7 +62,14 @@ int main(int argc, char **argv)
auto ReadValues = domain_db->getVector<int>( "ReadValues" );
auto WriteValues = domain_db->getVector<int>( "WriteValues" );
SW = domain_db->getScalar<double>("Sw");
signed char ErodeLabel=2;
signed char OpenLabel=1;
if (domain_db->keyExists( "OpenLabel" )){
OpenLabel = domain_db->getScalar<signed char >("OpenLabel");
}
if (domain_db->keyExists( "ErodeLabel" )){
ErodeLabel = domain_db->getScalar<signed char >("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" )){