diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 88517426..8d370f5b 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -1,5 +1,5 @@ # Copy the examples to the install folder -INSTALL_EXAMPLE (NonNewtonianChannelFlow ) +#INSTALL_EXAMPLE (NonNewtonianChannelFlow ) INSTALL_EXAMPLE( Bubble ) INSTALL_EXAMPLE( ConstrainedBubble ) INSTALL_EXAMPLE( Piston ) @@ -10,7 +10,7 @@ INSTALL_EXAMPLE( Sph1896 ) INSTALL_EXAMPLE( drainage ) INSTALL_EXAMPLE( imbibition ) INSTALL_EXAMPLE( relperm ) -INSTALL_EXAMPLE( Poiseuille ) +#INSTALL_EXAMPLE( Poiseuille ) INSTALL_EXAMPLE( Juanes ) INSTALL_EXAMPLE( MicroModel ) INSTALL_EXAMPLE( CornerFlow ) diff --git a/models/DFHModel.cpp b/models/DFHModel.cpp index 379423c7..7c7898de 100644 --- a/models/DFHModel.cpp +++ b/models/DFHModel.cpp @@ -67,7 +67,7 @@ void ScaLBL_DFHModel::ReadParams(string filename){ rhoB = color_db->getWithDefault( "rhoB", 1.0 ); alpha = color_db->getWithDefault( "alpha", 0.001 ); beta = color_db->getWithDefault( "beta", 0.95 ); - Restart = color_db->getScalar( "Restart", true ); + Restart = color_db->getWithDefault( "Restart", true ); din = color_db->getWithDefault( "din", 1.0 ); dout = color_db->getWithDefault( "dout", 1.0 ); flux = color_db->getWithDefault( "flux", 0.0 ); diff --git a/tests/TestBubbleDFH.cpp b/tests/TestBubbleDFH.cpp index a9701a97..8ea6e8d1 100644 --- a/tests/TestBubbleDFH.cpp +++ b/tests/TestBubbleDFH.cpp @@ -86,18 +86,18 @@ int main(int argc, char **argv) // Color Model parameters int timestepMax = color_db->getScalar( "timestepMax" ); - double tauA = color_db->getScalar( "tauA" ); - double tauB = color_db->getScalar( "tauB" ); - double rhoA = color_db->getScalar( "rhoA" ); - double rhoB = color_db->getScalar( "rhoB" ); + double tauA = color_db->getWithDefault( "tauA", 1.0 ); + double tauB = color_db->getWithDefault( "tauB", 1.0 ); + double rhoA = color_db->getWithDefault( "rhoA", 1.0 ); + double rhoB = color_db->getWithDefault( "rhoB", 1.0 ); double Fx = color_db->getVector( "F" )[0]; double Fy = color_db->getVector( "F" )[1]; double Fz = color_db->getVector( "F" )[2]; - double alpha = color_db->getScalar( "alpha" ); - double beta = color_db->getScalar( "beta" ); - bool Restart = color_db->getScalar( "Restart" ); - double din = color_db->getScalar( "din" ); - double dout = color_db->getScalar( "dout" );; + double alpha = color_db->getWithDefault( "alpha", 0.001 ); + double beta = color_db->getWithDefault( "beta", 0.95 ); + bool Restart = color_db->getWithDefault( "Restart", false ); + double din = color_db->getWithDefault( "din", 1.0 ); + double dout = color_db->getWithDefault( "dout", 1.0 );; double inletA=1.f; double inletB=0.f; double outletA=0.f; @@ -108,7 +108,7 @@ int main(int argc, char **argv) auto L = domain_db->getVector( "L" ); auto size = domain_db->getVector( "n" ); auto nproc = domain_db->getVector( "nproc" ); - int BoundaryCondition = domain_db->getScalar( "BC" ); + int BoundaryCondition = domain_db->getWithDefault( "BC", 0 ); int Nx = size[0]; int Ny = size[1]; int Nz = size[2]; @@ -405,7 +405,7 @@ int main(int argc, char **argv) //************ MAIN ITERATION LOOP ***************************************/ PROFILE_START("Loop"); //std::shared_ptr analysis_db; - runAnalysis analysis(analysis_db, rank_info, ScaLBL_Comm, Dm, Np, pBC, Map ); + runAnalysis analysis(db, rank_info, ScaLBL_Comm, Dm, Np, pBC, Map ); //analysis.createThreads( analysis_method, 4 ); while (timestep < timestepMax && err > tol ) { //if ( rank==0 ) { printf("Running timestep %i (%i MB)\n",timestep+1,(int)(Utilities::getMemoryUsage()/1048576)); } @@ -487,7 +487,7 @@ int main(int argc, char **argv) PROFILE_STOP("Update"); // Run the analysis - analysis.run( timestep, analysis_db, *Averages, Phi, Pressure, Velocity, fq, Den ); + analysis.run( timestep, db, *Averages, Phi, Pressure, Velocity, fq, Den ); } analysis.finish();