design ColorModel

This commit is contained in:
James E McClure 2018-05-17 09:55:28 -04:00
parent c786ef2967
commit 51e54f2971
2 changed files with 25 additions and 19 deletions

View File

@ -16,26 +16,26 @@ ScaLBL_ColorModel::~ScaLBL_ColorModel(){
void ScaLBL_ColorModel::ReadParams(string filename){ void ScaLBL_ColorModel::ReadParams(string filename){
// read the input database // read the input database
auto db = std::make_shared<Database>( filename ); db = std::make_shared<Database>( filename );
auto domain_db = db->getDatabase( "Domain" ); domain_db = db->getDatabase( "Domain" );
auto color_db = db->getDatabase( "Color" ); color_db = db->getDatabase( "Color" );
auto analysis_db = db->getDatabase( "Analysis" ); analysis_db = db->getDatabase( "Analysis" );
// Color Model parameters // Color Model parameters
timestepMax = domain_db->getScalar<int>( "timestepMax" ); timestepMax = color_db->getScalar<int>( "timestepMax" );
tauA = domain_db->getScalar<double>( "tauA" ); tauA = color_db->getScalar<double>( "tauA" );
tauB = domain_db->getScalar<double>( "tauB" ); tauB = color_db->getScalar<double>( "tauB" );
rhoA = domain_db->getScalar<double>( "rhoA" ); rhoA = color_db->getScalar<double>( "rhoA" );
rhoB = domain_db->getScalar<double>( "rhoB" ); rhoB = color_db->getScalar<double>( "rhoB" );
Fx = domain_db->getVector<double>( "F" )[0]; Fx = color_db->getVector<double>( "F" )[0];
Fy = domain_db->getVector<double>( "F" )[1]; Fy = color_db->getVector<double>( "F" )[1];
Fz = domain_db->getVector<double>( "F" )[2]; Fz = color_db->getVector<double>( "F" )[2];
alpha = domain_db->getScalar<double>( "alpha" ); alpha = color_db->getScalar<double>( "alpha" );
beta = domain_db->getScalar<double>( "beta" ); beta = color_db->getScalar<double>( "beta" );
Restart = domain_db->getScalar<int>( "Restart" ); Restart = color_db->getScalar<bool>( "Restart" );
din = domain_db->getScalar<double>( "din" ); din = color_db->getScalar<double>( "din" );
dout = domain_db->getScalar<double>( "dout" ); dout = color_db->getScalar<double>( "dout" );
flux = domain_db->getScalar<double>( "flux" );; flux = color_db->getScalar<double>( "flux" );;
inletA=1.f; inletA=1.f;
inletB=0.f; inletB=0.f;
outletA=0.f; outletA=0.f;

View File

@ -45,7 +45,13 @@ private:
std::shared_ptr<Domain> Mask; // this domain is for lbm std::shared_ptr<Domain> Mask; // this domain is for lbm
std::shared_ptr<ScaLBL_Communicator> ScaLBL_Comm; std::shared_ptr<ScaLBL_Communicator> ScaLBL_Comm;
std::shared_ptr<TwoPhase> Averages; std::shared_ptr<TwoPhase> Averages;
// input database
std::shared_ptr<Database> db;
std::shared_ptr<Database> domain_db;
std::shared_ptr<Database> color_db;
std::shared_ptr<Database> analysis_db;
// filenames // filenames
char LocalRankString[8]; char LocalRankString[8];
char LocalRankFilename[40]; char LocalRankFilename[40];