#include extern "C" void ScaLBL_D3Q7_AAodd_IonConcentration(int *neighborList, double *dist, double *Den, int start, int finish, int Np){ int n,nread; double fq,Ci; for (n=start; n 10Np => odd part of dist) f1 = dist[nr1]; // reading the f1 data into register fq // q=2 nr2 = neighborList[n+Np]; // neighbor 1 ( < 10Np => even part of dist) f2 = dist[nr2]; // reading the f2 data into register fq // q=3 nr3 = neighborList[n+2*Np]; // neighbor 4 f3 = dist[nr3]; // q=4 nr4 = neighborList[n+3*Np]; // neighbor 3 f4 = dist[nr4]; // q=5 nr5 = neighborList[n+4*Np]; f5 = dist[nr5]; // q=6 nr6 = neighborList[n+5*Np]; f6 = dist[nr6]; // q=0 dist[n] = f0*(1.0-rlx)+rlx*0.25*Ci; // q = 1 dist[nr2] = f1*(1.0-rlx) + rlx*0.125*Ci*(1.0+4.0*(ux+uEPx)); // q=2 dist[nr1] = f2*(1.0-rlx) + rlx*0.125*Ci*(1.0-4.0*(ux+uEPx)); // q = 3 dist[nr4] = f3*(1.0-rlx) + rlx*0.125*Ci*(1.0+4.0*(uy+uEPy)); // q = 4 dist[nr3] = f4*(1.0-rlx) + rlx*0.125*Ci*(1.0-4.0*(uy+uEPy)); // q = 5 dist[nr6] = f5*(1.0-rlx) + rlx*0.125*Ci*(1.0+4.0*(uz+uEPz)); // q = 6 dist[nr5] = f6*(1.0-rlx) + rlx*0.125*Ci*(1.0-4.0*(uz+uEPz)); } } extern "C" void ScaLBL_D3Q7_AAeven_Ion(double *dist, double *Den, double *Velocity, double *ElectricField, double Di, int zi, double rlx, double Vt, int start, int finish, int Np){ int n; double Ci; double ux,uy,uz; double uEPx,uEPy,uEPz;//electrochemical induced velocity double Ex,Ey,Ez;//electrical field double f0,f1,f2,f3,f4,f5,f6; for (n=start; n0) + CD_tmp; } }