correct D3Q7 Poisson LB algorithm
This commit is contained in:
parent
025987e53b
commit
47db000ba6
@ -151,25 +151,25 @@ extern "C" void ScaLBL_D3Q7_AAodd_Poisson(int *neighborList, int *Map,
|
||||
ElectricField[n + 2 * Np] = Ez;
|
||||
|
||||
// q = 0
|
||||
dist[n] = f0 * (1.0 - rlx) + 0.25 * (rlx * psi) - rho_e;
|
||||
dist[n] = f0 * (1.0 - rlx) + 0.25 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 1
|
||||
dist[nr2] = f1 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[nr2] = f1 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 2
|
||||
dist[nr1] = f2 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[nr1] = f2 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 3
|
||||
dist[nr4] = f3 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[nr4] = f3 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 4
|
||||
dist[nr3] = f4 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[nr3] = f4 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 5
|
||||
dist[nr6] = f5 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[nr6] = f5 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 6
|
||||
dist[nr5] = f6 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[nr5] = f6 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
//........................................................................
|
||||
}
|
||||
}
|
||||
@ -214,25 +214,25 @@ extern "C" void ScaLBL_D3Q7_AAeven_Poisson(int *Map, double *dist,
|
||||
ElectricField[n + 2 * Np] = Ez;
|
||||
|
||||
// q = 0
|
||||
dist[n] = f0 * (1.0 - rlx) + 0.25 * (rlx * psi) - rho_e;
|
||||
dist[n] = f0 * (1.0 - rlx) + 0.25 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 1
|
||||
dist[1 * Np + n] = f1 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[1 * Np + n] = f1 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 2
|
||||
dist[2 * Np + n] = f2 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[2 * Np + n] = f2 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 3
|
||||
dist[3 * Np + n] = f3 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[3 * Np + n] = f3 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 4
|
||||
dist[4 * Np + n] = f4 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[4 * Np + n] = f4 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 5
|
||||
dist[5 * Np + n] = f5 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[5 * Np + n] = f5 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
|
||||
// q = 6
|
||||
dist[6 * Np + n] = f6 * (1.0 - rlx) + 0.125 * (rlx * psi) - rho_e;
|
||||
dist[6 * Np + n] = f6 * (1.0 - rlx) + 0.125 * (rlx * psi + rho_e);
|
||||
//........................................................................
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user