debug crusher
This commit is contained in:
parent
eadb420d06
commit
9043751281
|
@ -1323,7 +1323,7 @@ void Membrane::RecvD3Q7AA(double *dist){
|
|||
// Unpack the distributions on the device
|
||||
//...................................................................................
|
||||
//...Unpacking for x face(q=2)................................
|
||||
ScaLBL_D3Q7_Membrane_Unpack(2,dvcRecvDist_x, dvcRecvLinks_x,0,linkCount_x[0],recvCount_x,recvbuf_x,dist,Np,coefficient_x);
|
||||
/* ScaLBL_D3Q7_Membrane_Unpack(2,dvcRecvDist_x, dvcRecvLinks_x,0,linkCount_x[0],recvCount_x,recvbuf_x,dist,Np,coefficient_x);
|
||||
//...................................................................................
|
||||
//...Packing for X face(q=1)................................
|
||||
ScaLBL_D3Q7_Membrane_Unpack(1,dvcRecvDist_X, dvcRecvLinks_X,0,linkCount_X[0],recvCount_X,recvbuf_X,dist,Np,coefficient_X);
|
||||
|
@ -1339,7 +1339,7 @@ void Membrane::RecvD3Q7AA(double *dist){
|
|||
//...Packing for Z face(q=5)................................
|
||||
ScaLBL_D3Q7_Membrane_Unpack(5,dvcRecvDist_Z, dvcRecvLinks_Z,0,linkCount_Z[0],recvCount_Z,recvbuf_Z,dist,Np,coefficient_Z);
|
||||
//..................................................................................
|
||||
|
||||
*/
|
||||
//...................................................................................
|
||||
Lock=false; // unlock the communicator after communications complete
|
||||
//...................................................................................
|
||||
|
|
|
@ -441,7 +441,6 @@ void ScaLBL_IonModel::ReadParams(string filename) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Read solid boundary condition specific to Ion model
|
||||
BoundaryConditionSolid = 0;
|
||||
if (ion_db->keyExists("BC_Solid")) {
|
||||
|
@ -1375,12 +1374,7 @@ void ScaLBL_IonModel::RunMembrane(double *Velocity, double *ElectricField, doubl
|
|||
timestep++;
|
||||
|
||||
//LB-Ion collison
|
||||
IonMembrane->SendD3Q7AA(&fq[ic * Np * 7]); //READ FORM NORMAL
|
||||
IonMembrane->RecvD3Q7AA(&fq[ic * Np * 7]); //WRITE INTO OPPOSITE
|
||||
ScaLBL_Comm->Barrier();
|
||||
comm.barrier();
|
||||
if (rank==0) printf(" IonMembrane: completeted # 1 \n");
|
||||
fflush(stdout);
|
||||
IonMembrane->SendD3Q7AA(&fq[ic * Np * 7]); //READ FORM NORMAL
|
||||
|
||||
ScaLBL_D3Q7_AAodd_Ion(
|
||||
IonMembrane->NeighborList, &fq[ic * Np * 7], &Ci[ic * Np],
|
||||
|
@ -1389,12 +1383,7 @@ void ScaLBL_IonModel::RunMembrane(double *Velocity, double *ElectricField, doubl
|
|||
IonDiffusivity[ic], IonValence[ic], rlx[ic], Vt,
|
||||
ScaLBL_Comm->FirstInterior(), ScaLBL_Comm->LastInterior(), Np);
|
||||
|
||||
ScaLBL_Comm->Barrier();
|
||||
comm.barrier();
|
||||
if (rank==0) printf(" IonMembrane: completeted # 2 \n");
|
||||
fflush(stdout);
|
||||
|
||||
// IonMembrane->RecvD3Q7AA(&fq[ic * Np * 7]); //WRITE INTO OPPOSITE
|
||||
IonMembrane->RecvD3Q7AA(&fq[ic * Np * 7]); //WRITE INTO OPPOSITE
|
||||
|
||||
ScaLBL_D3Q7_AAodd_Ion(
|
||||
IonMembrane->NeighborList, &fq[ic * Np * 7], &Ci[ic * Np],
|
||||
|
@ -1403,18 +1392,9 @@ void ScaLBL_IonModel::RunMembrane(double *Velocity, double *ElectricField, doubl
|
|||
IonDiffusivity[ic], IonValence[ic], rlx[ic], Vt, 0,
|
||||
ScaLBL_Comm->LastExterior(), Np);
|
||||
|
||||
ScaLBL_Comm->Barrier();
|
||||
comm.barrier();
|
||||
if (rank==0) printf(" IonMembrane: completeted # 3 \n");
|
||||
fflush(stdout);
|
||||
|
||||
IonMembrane->IonTransport(&fq[ic * Np * 7],&Ci[ic * Np]);
|
||||
|
||||
ScaLBL_Comm->Barrier();
|
||||
comm.barrier();
|
||||
if (rank==0) printf(" IonMembrane: completeted # 4 \n");
|
||||
fflush(stdout);
|
||||
|
||||
|
||||
/* if (BoundaryConditionSolid == 1) {
|
||||
//TODO IonSolid may also be species-dependent
|
||||
|
@ -1428,15 +1408,6 @@ void ScaLBL_IonModel::RunMembrane(double *Velocity, double *ElectricField, doubl
|
|||
|
||||
//LB-Ion collison
|
||||
IonMembrane->SendD3Q7AA(&fq[ic * Np * 7]); //READ FORM NORMAL
|
||||
IonMembrane->RecvD3Q7AA(&fq[ic * Np * 7]); //WRITE INTO OPPOSITE
|
||||
ScaLBL_Comm->Barrier();
|
||||
comm.barrier();
|
||||
|
||||
|
||||
ScaLBL_Comm->Barrier();
|
||||
comm.barrier();
|
||||
if (rank==0) printf(" IonMembrane: completeted # 5 \n");
|
||||
fflush(stdout);
|
||||
|
||||
ScaLBL_D3Q7_AAeven_Ion(
|
||||
&fq[ic * Np * 7], &Ci[ic * Np], &FluxDiffusive[3 * ic * Np],
|
||||
|
@ -1445,30 +1416,20 @@ void ScaLBL_IonModel::RunMembrane(double *Velocity, double *ElectricField, doubl
|
|||
rlx[ic], Vt, ScaLBL_Comm->FirstInterior(),
|
||||
ScaLBL_Comm->LastInterior(), Np);
|
||||
|
||||
//IonMembrane->RecvD3Q7AA(&fq[ic * Np * 7]); //WRITE INTO OPPOSITE
|
||||
ScaLBL_Comm->Barrier();
|
||||
comm.barrier();
|
||||
if (rank==0) printf(" IonMembrane: completeted # 6 \n");
|
||||
fflush(stdout);
|
||||
|
||||
IonMembrane->RecvD3Q7AA(&fq[ic * Np * 7]); //WRITE INTO OPPOSITE
|
||||
|
||||
ScaLBL_D3Q7_AAeven_Ion(
|
||||
&fq[ic * Np * 7], &Ci[ic * Np], &FluxDiffusive[3 * ic * Np],
|
||||
&FluxAdvective[3 * ic * Np], &FluxElectrical[3 * ic * Np],
|
||||
Velocity, ElectricField, IonDiffusivity[ic], IonValence[ic],
|
||||
rlx[ic], Vt, 0, ScaLBL_Comm->LastExterior(), Np);
|
||||
|
||||
ScaLBL_Comm->Barrier();
|
||||
comm.barrier();
|
||||
if (rank==0) printf(" IonMembrane: completeted # 7 \n");
|
||||
fflush(stdout);
|
||||
|
||||
|
||||
IonMembrane->IonTransport(&fq[ic * Np * 7],&Ci[ic * Np]);
|
||||
|
||||
ScaLBL_Comm->Barrier();
|
||||
comm.barrier();
|
||||
if (rank==0) printf(" IonMembrane: completeted # 8 \n");
|
||||
fflush(stdout);
|
||||
|
||||
/*
|
||||
if (BoundaryConditionSolid == 1) {
|
||||
//TODO IonSolid may also be species-dependent
|
||||
|
|
|
@ -560,9 +560,10 @@ void ScaLBL_Poisson::Run(double *ChargeDensity, bool UseSlippingVelBC, int times
|
|||
// Check convergence of steady-state solution
|
||||
if (timestep==2){
|
||||
//save electric potential for convergence check
|
||||
ScaLBL_CopyToHost(Psi_previous.data(),Psi,sizeof(double)*Nx*Ny*Nz);
|
||||
}
|
||||
if (timestep%analysis_interval==0){
|
||||
/* get the elecric potential */
|
||||
ScaLBL_CopyToHost(Psi_host.data(),Psi,sizeof(double)*Nx*Ny*Nz);
|
||||
if (rank==0) printf(" ... getting Poisson solver error \n");
|
||||
double err = 0.0;
|
||||
double max_error = 0.0;
|
||||
|
@ -684,10 +685,10 @@ void ScaLBL_Poisson::SolveElectricPotentialAAeven(int timestep_from_Study, doubl
|
|||
void ScaLBL_Poisson::SolvePoissonAAodd(double *ChargeDensity, bool UseSlippingVelBC){
|
||||
|
||||
ScaLBL_Comm->SendD3Q19AA(fq); //READ FROM NORMAL
|
||||
ScaLBL_Comm->RecvD3Q19AA(fq); //WRITE INTO OPPOSITE
|
||||
ScaLBL_Comm->Barrier();
|
||||
ScaLBL_D3Q19_AAodd_Poisson(NeighborList, dvcMap, fq, ChargeDensity, Psi, ElectricField, tau, epsilon_LB, UseSlippingVelBC, ScaLBL_Comm->FirstInterior(), ScaLBL_Comm->LastInterior(), Np);
|
||||
//ScaLBL_Comm->RecvD3Q19AA(fq); //WRITE INTO OPPOSITE
|
||||
ScaLBL_Comm->RecvD3Q19AA(fq); //WRITE INTO OPPOSITE
|
||||
|
||||
ScaLBL_D3Q19_AAodd_Poisson(NeighborList, dvcMap, fq, ChargeDensity, Psi, ElectricField, tau, epsilon_LB, UseSlippingVelBC, 0, ScaLBL_Comm->LastExterior(), Np);
|
||||
ScaLBL_Comm->Barrier();
|
||||
//TODO: perhaps add another ScaLBL_Comm routine to update Psi values on solid boundary nodes.
|
||||
|
@ -698,9 +699,8 @@ void ScaLBL_Poisson::SolvePoissonAAodd(double *ChargeDensity, bool UseSlippingVe
|
|||
|
||||
void ScaLBL_Poisson::SolvePoissonAAeven(double *ChargeDensity, bool UseSlippingVelBC){
|
||||
ScaLBL_Comm->SendD3Q19AA(fq); //READ FROM NORMAL
|
||||
ScaLBL_Comm->RecvD3Q19AA(fq); //WRITE INTO OPPOSITE
|
||||
ScaLBL_Comm->Barrier();
|
||||
ScaLBL_D3Q19_AAeven_Poisson(dvcMap, fq, ChargeDensity, Psi, ElectricField, ResidualError, tau, epsilon_LB, UseSlippingVelBC, ScaLBL_Comm->FirstInterior(), ScaLBL_Comm->LastInterior(), Np);
|
||||
ScaLBL_Comm->RecvD3Q19AA(fq); //WRITE INTO OPPOSITE
|
||||
// ScaLBL_Comm->RecvD3Q19AA(fq); //WRITE INTO OPPOSITE
|
||||
ScaLBL_D3Q19_AAeven_Poisson(dvcMap, fq, ChargeDensity, Psi, ElectricField, ResidualError, tau, epsilon_LB, UseSlippingVelBC, 0, ScaLBL_Comm->LastExterior(), Np);
|
||||
ScaLBL_Comm->Barrier();
|
||||
|
|
|
@ -124,7 +124,7 @@ int main(int argc, char **argv)
|
|||
fflush(stdout);
|
||||
|
||||
timestep++;//AA operations
|
||||
/*
|
||||
|
||||
|
||||
if (timestep%Study.analysis_interval==0){
|
||||
Analysis.Basic(IonModel,PoissonSolver,StokesModel,timestep);
|
||||
|
@ -137,7 +137,7 @@ int main(int argc, char **argv)
|
|||
//StokesModel.getVelocity(timestep);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
if (rank==0) printf("Save simulation raw data at maximum timestep\n");
|
||||
|
|
Loading…
Reference in New Issue
Block a user