Merge branch 'master' into slipping_vel_debug
This commit is contained in:
commit
ea90e9f875
@ -611,7 +611,7 @@ double MorphOpen(DoubleArray &SignDist, signed char *id,
|
|||||||
|
|
||||||
//***************************************************************************************
|
//***************************************************************************************
|
||||||
double MorphDrain(DoubleArray &SignDist, signed char *id,
|
double MorphDrain(DoubleArray &SignDist, signed char *id,
|
||||||
std::shared_ptr<Domain> Dm, double VoidFraction) {
|
std::shared_ptr<Domain> Dm, double VoidFraction, double InitialRadius) {
|
||||||
// SignDist is the distance to the object that you want to constaing the morphological opening
|
// SignDist is the distance to the object that you want to constaing the morphological opening
|
||||||
// VoidFraction is the the empty space where the object inst
|
// VoidFraction is the the empty space where the object inst
|
||||||
// id is a labeled map
|
// id is a labeled map
|
||||||
@ -688,6 +688,11 @@ double MorphDrain(DoubleArray &SignDist, signed char *id,
|
|||||||
double deltaR = 0.05; // amount to change the radius in voxel units
|
double deltaR = 0.05; // amount to change the radius in voxel units
|
||||||
double Rcrit_old = maxdistGlobal;
|
double Rcrit_old = maxdistGlobal;
|
||||||
double Rcrit_new = maxdistGlobal;
|
double Rcrit_new = maxdistGlobal;
|
||||||
|
|
||||||
|
if (InitialRadius < maxdistGlobal){
|
||||||
|
Rcrit_old = InitialRadius;
|
||||||
|
Rcrit_new = InitialRadius;
|
||||||
|
}
|
||||||
//if (argc>2){
|
//if (argc>2){
|
||||||
// Rcrit_new = strtod(argv[2],NULL);
|
// Rcrit_new = strtod(argv[2],NULL);
|
||||||
// if (rank==0) printf("Max. distance =%f, Initial critical radius = %f \n",maxdistGlobal,Rcrit_new);
|
// if (rank==0) printf("Max. distance =%f, Initial critical radius = %f \n",maxdistGlobal,Rcrit_new);
|
||||||
|
@ -7,7 +7,7 @@ double MorphOpen(DoubleArray &SignDist, signed char *id,
|
|||||||
std::shared_ptr<Domain> Dm, double VoidFraction,
|
std::shared_ptr<Domain> Dm, double VoidFraction,
|
||||||
signed char ErodeLabel, signed char ReplaceLabel);
|
signed char ErodeLabel, signed char ReplaceLabel);
|
||||||
double MorphDrain(DoubleArray &SignDist, signed char *id,
|
double MorphDrain(DoubleArray &SignDist, signed char *id,
|
||||||
std::shared_ptr<Domain> Dm, double VoidFraction);
|
std::shared_ptr<Domain> Dm, double VoidFraction, double InitialRadius);
|
||||||
double MorphGrow(DoubleArray &BoundaryDist, DoubleArray &Dist, Array<char> &id,
|
double MorphGrow(DoubleArray &BoundaryDist, DoubleArray &Dist, Array<char> &id,
|
||||||
std::shared_ptr<Domain> Dm, double TargetVol,
|
std::shared_ptr<Domain> Dm, double TargetVol,
|
||||||
double WallFactor);
|
double WallFactor);
|
||||||
|
@ -15,6 +15,6 @@ cmake -D CMAKE_C_COMPILER:PATH=/opt/arden/openmpi/3.1.2/bin/mpicc \
|
|||||||
-D HDF5_DIRECTORY="/opt/arden/hdf5/1.8.12" \
|
-D HDF5_DIRECTORY="/opt/arden/hdf5/1.8.12" \
|
||||||
-D USE_CUDA=0 \
|
-D USE_CUDA=0 \
|
||||||
-D USE_TIMER=0 \
|
-D USE_TIMER=0 \
|
||||||
~/Programs/LBPM
|
~/Programs/LBPM-WIA
|
||||||
|
|
||||||
# -D HDF5_LIB="/opt/arden/hdf5/1.8.12/lib/libhdf5.a"\
|
# -D HDF5_LIB="/opt/arden/hdf5/1.8.12/lib/libhdf5.a"\
|
||||||
|
@ -53,6 +53,7 @@ int main(int argc, char **argv)
|
|||||||
auto WriteValues = domain_db->getVector<int>( "WriteValues" );
|
auto WriteValues = domain_db->getVector<int>( "WriteValues" );
|
||||||
SW = domain_db->getScalar<double>("Sw");
|
SW = domain_db->getScalar<double>("Sw");
|
||||||
auto READFILE = domain_db->getScalar<std::string>( "Filename" );
|
auto READFILE = domain_db->getScalar<std::string>( "Filename" );
|
||||||
|
auto MORPH_RADIUS = domain_db->getWithDefault<double>( "MorphRadius", 100000.0);
|
||||||
|
|
||||||
// Generate the NWP configuration
|
// Generate the NWP configuration
|
||||||
//if (rank==0) printf("Initializing morphological distribution with critical radius %f \n", Rcrit);
|
//if (rank==0) printf("Initializing morphological distribution with critical radius %f \n", Rcrit);
|
||||||
@ -122,7 +123,7 @@ int main(int argc, char **argv)
|
|||||||
comm.barrier();
|
comm.barrier();
|
||||||
|
|
||||||
// Run the morphological opening
|
// Run the morphological opening
|
||||||
MorphDrain(SignDist, id, Dm, SW);
|
MorphDrain(SignDist, id, Dm, SW, MORPH_RADIUS);
|
||||||
|
|
||||||
// calculate distance to non-wetting fluid
|
// calculate distance to non-wetting fluid
|
||||||
if (domain_db->keyExists( "HistoryLabels" )){
|
if (domain_db->keyExists( "HistoryLabels" )){
|
||||||
|
Loading…
Reference in New Issue
Block a user