make the WriteLog in PoissonSolver a bool type to facilitate input
This commit is contained in:
parent
de60bae8fc
commit
7ef18bfea3
@ -36,7 +36,7 @@ void ScaLBL_Poisson::ReadParams(string filename){
|
|||||||
Vin = 1.0; //Boundary-z (inlet) electric potential
|
Vin = 1.0; //Boundary-z (inlet) electric potential
|
||||||
Vout = 1.0; //Boundary-Z (outlet) electric potential
|
Vout = 1.0; //Boundary-Z (outlet) electric potential
|
||||||
chargeDen_dummy = 1.0e-3;//For debugging;unit=[C/m^3]
|
chargeDen_dummy = 1.0e-3;//For debugging;unit=[C/m^3]
|
||||||
WriteLog = 0;
|
WriteLog = false;
|
||||||
|
|
||||||
// LB-Poisson Model parameters
|
// LB-Poisson Model parameters
|
||||||
if (electric_db->keyExists( "timestepMax" )){
|
if (electric_db->keyExists( "timestepMax" )){
|
||||||
@ -55,13 +55,7 @@ void ScaLBL_Poisson::ReadParams(string filename){
|
|||||||
chargeDen_dummy = electric_db->getScalar<double>( "DummyChargeDen" );
|
chargeDen_dummy = electric_db->getScalar<double>( "DummyChargeDen" );
|
||||||
}
|
}
|
||||||
if (electric_db->keyExists( "WriteLog" )){
|
if (electric_db->keyExists( "WriteLog" )){
|
||||||
auto writelog = electric_db->getScalar<std::string>( "WriteLog" );
|
WriteLog = electric_db->getScalar<bool>( "WriteLog" );
|
||||||
if (writelog !="True" && writelog !="False"){
|
|
||||||
ERROR("Error: LB-Poisson Solver: WriteLog cannot be identified! Uesage: WriteLog is either True or False.\n");
|
|
||||||
}
|
|
||||||
else if (writelog =="True"){
|
|
||||||
WriteLog = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read solid boundary condition specific to Poisson equation
|
// Read solid boundary condition specific to Poisson equation
|
||||||
@ -466,7 +460,7 @@ void ScaLBL_Poisson::Run(double *ChargeDensity){
|
|||||||
psi_avg_previous = psi_avg;
|
psi_avg_previous = psi_avg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(WriteLog==1){
|
if(WriteLog==true){
|
||||||
getConvergenceLog(timestep,error);
|
getConvergenceLog(timestep,error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
double epsilon0,epsilon0_LB,epsilonR,epsilon_LB;
|
double epsilon0,epsilon0_LB,epsilonR,epsilon_LB;
|
||||||
double Vin, Vout;
|
double Vin, Vout;
|
||||||
double chargeDen_dummy;//for debugging
|
double chargeDen_dummy;//for debugging
|
||||||
short WriteLog;
|
bool WriteLog;
|
||||||
|
|
||||||
int Nx,Ny,Nz,N,Np;
|
int Nx,Ny,Nz,N,Np;
|
||||||
int rank,nprocx,nprocy,nprocz,nprocs;
|
int rank,nprocx,nprocy,nprocz,nprocs;
|
||||||
|
Loading…
Reference in New Issue
Block a user