Merge branch 'master' of github.com:JamesEMcClure/LBPM-WIA
This commit is contained in:
commit
6cf8297ea4
|
@ -812,18 +812,22 @@ void ScaLBL_ColorModel::Run(){
|
|||
if (CURRENT_STEADY_TIMESTEPS > MAX_STEADY_TIMESTEPS)
|
||||
isSteady = true;
|
||||
if (RESCALE_FORCE == true && SET_CAPILLARY_NUMBER == true && CURRENT_STEADY_TIMESTEPS > RESCALE_FORCE_AFTER_TIMESTEP){
|
||||
RESCALE_FORCE = false;
|
||||
Fx *= capillary_number / Ca;
|
||||
Fy *= capillary_number / Ca;
|
||||
Fz *= capillary_number / Ca;
|
||||
if (force_mag > 1e-3){
|
||||
Fx *= 1e-3/force_mag; // impose ceiling for stability
|
||||
Fy *= 1e-3/force_mag;
|
||||
Fz *= 1e-3/force_mag;
|
||||
}
|
||||
if (rank == 0) printf(" -- adjust force by factor %f \n ",capillary_number / Ca);
|
||||
Averages->SetParams(rhoA,rhoB,tauA,tauB,Fx,Fy,Fz,alpha,beta);
|
||||
color_db->putVector<double>("F",{Fx,Fy,Fz});
|
||||
RESCALE_FORCE = false;
|
||||
double RESCALE_FORCE_FACTOR = capillary_number / Ca;
|
||||
if (RESCALE_FORCE_FACTOR > 2.0) RESCALE_FORCE_FACTOR = 2.0;
|
||||
if (RESCALE_FORCE_FACTOR < 0.5) RESCALE_FORCE_FACTOR = 0.5;
|
||||
Fx *= RESCALE_FORCE_FACTOR;
|
||||
Fy *= RESCALE_FORCE_FACTOR;
|
||||
Fz *= RESCALE_FORCE_FACTOR;
|
||||
force_mag = sqrt(Fx*Fx+Fy*Fy+Fz*Fz);
|
||||
if (force_mag > 1e-3){
|
||||
Fx *= 1e-3/force_mag; // impose ceiling for stability
|
||||
Fy *= 1e-3/force_mag;
|
||||
Fz *= 1e-3/force_mag;
|
||||
}
|
||||
if (rank == 0) printf(" -- adjust force by factor %f \n ",capillary_number / Ca);
|
||||
Averages->SetParams(rhoA,rhoB,tauA,tauB,Fx,Fy,Fz,alpha,beta);
|
||||
color_db->putVector<double>("F",{Fx,Fy,Fz});
|
||||
}
|
||||
if ( isSteady ){
|
||||
MORPH_ADAPT = true;
|
||||
|
|
|
@ -7,6 +7,7 @@ module load cuda
|
|||
|
||||
export HDF5_DIR=/ccs/proj/csc380/mcclurej/install/hdf5/1.8.12/
|
||||
export SILO_DIR=/ccs/proj/csc380/mcclurej/install/silo/4.10.2/
|
||||
export NETCDF_DIR=/ccs/proj/geo136/install/netcdf/4.6.1
|
||||
|
||||
# configure
|
||||
rm -rf CMake*
|
||||
|
@ -28,6 +29,8 @@ cmake \
|
|||
-D USE_SILO=1 \
|
||||
-D SILO_LIB="$SILO_DIR/lib/libsiloh5.a" \
|
||||
-D SILO_DIRECTORY="$SILO_DIR" \
|
||||
-D USE_NETCDF=1 \
|
||||
-D NETCDF_DIRECTORY="$NETCDF_DIR" \
|
||||
-D USE_DOXYGEN:BOOL=false \
|
||||
-D USE_TIMER=0 \
|
||||
~/LBPM-WIA
|
||||
|
|
|
@ -52,6 +52,7 @@ int main(int argc, char **argv)
|
|||
printf("Input data file: %s\n",filename.c_str());
|
||||
}
|
||||
|
||||
bool FILTER_CONNECTED_COMPONENTS = false;
|
||||
auto db = std::make_shared<Database>( filename );
|
||||
auto domain_db = db->getDatabase( "Domain" );
|
||||
auto uct_db = db->getDatabase( "uCT" );
|
||||
|
@ -82,10 +83,14 @@ int main(int argc, char **argv)
|
|||
auto center = uct_db->getVector<int>( "center" );
|
||||
auto CylRad = uct_db->getScalar<float>( "cylinder_radius" );
|
||||
auto maxLevels = uct_db->getScalar<int>( "max_levels" );
|
||||
|
||||
std::vector<int> offset( 3, 0 );
|
||||
if ( uct_db->keyExists( "offset" ) )
|
||||
offset = uct_db->getVector<int>( "offset" );
|
||||
|
||||
if ( uct_db->keyExists( "filter_connected_components" ) )
|
||||
FILTER_CONNECTED_COMPONENTS = uct_db->getScalar<bool>( "filter_connected_components" );
|
||||
|
||||
// Check that the number of processors >= the number of ranks
|
||||
if ( rank==0 ) {
|
||||
printf("Number of MPI ranks required: %i \n", nprocx*nprocy*nprocz);
|
||||
|
@ -326,11 +331,13 @@ int main(int argc, char **argv)
|
|||
|
||||
// Perform a final filter
|
||||
PROFILE_START("Filtering final domains");
|
||||
if (FILTER_CONNECTED_COMPONENTS){
|
||||
if (rank==0)
|
||||
printf("Filtering final domains\n");
|
||||
Array<float> filter_Mean, filter_Dist1, filter_Dist2;
|
||||
filter_final( ID[0], Dist[0], *fillFloat[0], *Dm[0], filter_Mean, filter_Dist1, filter_Dist2 );
|
||||
PROFILE_STOP("Filtering final domains");
|
||||
}
|
||||
//removeDisconnected( ID[0], *Dm[0] );
|
||||
|
||||
// Write the distance function to a netcdf file
|
||||
|
|
Loading…
Reference in New Issue
Block a user