From ad5d428ce32fb9757ad44437f72cb1fc2ead0b98 Mon Sep 17 00:00:00 2001 From: Rex Zhe Li Date: Fri, 7 May 2021 01:54:45 -0400 Subject: [PATCH 1/2] clean redundant code in Poisson solver --- models/PoissonSolver.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/models/PoissonSolver.cpp b/models/PoissonSolver.cpp index 25a31600..7f4d7cdc 100644 --- a/models/PoissonSolver.cpp +++ b/models/PoissonSolver.cpp @@ -98,9 +98,7 @@ void ScaLBL_Poisson::ReadParams(string filename){ h = domain_db->getScalar( "voxel_length" ); } - //Re-calcualte model parameters if user updates input - epsilon0_LB = epsilon0*(h*1.0e-6);//unit:[C/(V*lu)] epsilon_LB = epsilon0_LB*epsilonR;//electric permittivity if (rank==0) printf("***********************************************************************************\n"); From c7b6ac7290740adce11c1c733bd1aafb8e3d35c5 Mon Sep 17 00:00:00 2001 From: Rex Zhe Li Date: Fri, 7 May 2021 03:18:31 -0400 Subject: [PATCH 2/2] make minor change so MPI barrier is in the right place now --- models/IonModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/IonModel.cpp b/models/IonModel.cpp index 67887811..136af02f 100644 --- a/models/IonModel.cpp +++ b/models/IonModel.cpp @@ -831,8 +831,8 @@ void ScaLBL_IonModel::Run(double *Velocity, double *ElectricField){ if (BoundaryConditionSolid==1){ //TODO IonSolid may also be species-dependent ScaLBL_Comm->SolidDirichletD3Q7(&fq[ic*Np*7], IonSolid); - ScaLBL_Comm->Barrier(); comm.barrier(); } + ScaLBL_Comm->Barrier(); comm.barrier(); // *************EVEN TIMESTEP*************// timestep++; @@ -875,8 +875,8 @@ void ScaLBL_IonModel::Run(double *Velocity, double *ElectricField){ if (BoundaryConditionSolid==1){ //TODO IonSolid may also be species-dependent ScaLBL_Comm->SolidDirichletD3Q7(&fq[ic*Np*7], IonSolid); - ScaLBL_Comm->Barrier(); comm.barrier(); } + ScaLBL_Comm->Barrier(); comm.barrier(); } }