refactor dfh tests
This commit is contained in:
parent
e71c2c97db
commit
ab6d94f161
@ -466,9 +466,9 @@ void ScaLBL_DFHModel::Run(){
|
|||||||
ScaLBL_D3Q7_AAodd_DFH(NeighborList, Aq, Bq, Den, Phi, 0, ScaLBL_Comm->next, Np);
|
ScaLBL_D3Q7_AAodd_DFH(NeighborList, Aq, Bq, Den, Phi, 0, ScaLBL_Comm->next, Np);
|
||||||
|
|
||||||
// compute the gradient
|
// compute the gradient
|
||||||
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, SolidPotential, ScaLBL_Comm->first_interior, ScaLBL_Comm->last_interior, Np);
|
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, ScaLBL_Comm->first_interior, ScaLBL_Comm->last_interior, Np);
|
||||||
ScaLBL_Comm->SendHalo(Phi);
|
ScaLBL_Comm->SendHalo(Phi);
|
||||||
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, SolidPotential, 0, ScaLBL_Comm->next, Np);
|
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, 0, ScaLBL_Comm->next, Np);
|
||||||
ScaLBL_Comm->RecvGrad(Phi,Gradient);
|
ScaLBL_Comm->RecvGrad(Phi,Gradient);
|
||||||
|
|
||||||
// Perform the collision operation
|
// Perform the collision operation
|
||||||
@ -502,9 +502,9 @@ void ScaLBL_DFHModel::Run(){
|
|||||||
ScaLBL_D3Q7_AAeven_DFH(Aq, Bq, Den, Phi, 0, ScaLBL_Comm->next, Np);
|
ScaLBL_D3Q7_AAeven_DFH(Aq, Bq, Den, Phi, 0, ScaLBL_Comm->next, Np);
|
||||||
|
|
||||||
// compute the gradient
|
// compute the gradient
|
||||||
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, SolidPotential, ScaLBL_Comm->first_interior, ScaLBL_Comm->last_interior, Np);
|
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, ScaLBL_Comm->first_interior, ScaLBL_Comm->last_interior, Np);
|
||||||
ScaLBL_Comm->SendHalo(Phi);
|
ScaLBL_Comm->SendHalo(Phi);
|
||||||
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, SolidPotential, 0, ScaLBL_Comm->next, Np);
|
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, 0, ScaLBL_Comm->next, Np);
|
||||||
ScaLBL_Comm->RecvGrad(Phi,Gradient);
|
ScaLBL_Comm->RecvGrad(Phi,Gradient);
|
||||||
|
|
||||||
// Perform the collision operation
|
// Perform the collision operation
|
||||||
|
@ -420,9 +420,9 @@ int main(int argc, char **argv)
|
|||||||
ScaLBL_D3Q7_AAodd_DFH(NeighborList, Aq, Bq, Den, Phi, 0, ScaLBL_Comm->next, Np);
|
ScaLBL_D3Q7_AAodd_DFH(NeighborList, Aq, Bq, Den, Phi, 0, ScaLBL_Comm->next, Np);
|
||||||
|
|
||||||
// compute the gradient
|
// compute the gradient
|
||||||
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, SolidPotential, ScaLBL_Comm->first_interior, ScaLBL_Comm->last_interior, Np);
|
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, ScaLBL_Comm->first_interior, ScaLBL_Comm->last_interior, Np);
|
||||||
ScaLBL_Comm->SendHalo(Phi);
|
ScaLBL_Comm->SendHalo(Phi);
|
||||||
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, SolidPotential, 0, ScaLBL_Comm->next, Np);
|
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, 0, ScaLBL_Comm->next, Np);
|
||||||
ScaLBL_Comm->RecvGrad(Phi,Gradient);
|
ScaLBL_Comm->RecvGrad(Phi,Gradient);
|
||||||
|
|
||||||
// Perform the collision operation
|
// Perform the collision operation
|
||||||
@ -456,9 +456,9 @@ int main(int argc, char **argv)
|
|||||||
ScaLBL_D3Q7_AAeven_DFH(Aq, Bq, Den, Phi, 0, ScaLBL_Comm->next, Np);
|
ScaLBL_D3Q7_AAeven_DFH(Aq, Bq, Den, Phi, 0, ScaLBL_Comm->next, Np);
|
||||||
|
|
||||||
// compute the gradient
|
// compute the gradient
|
||||||
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, SolidPotential, ScaLBL_Comm->first_interior, ScaLBL_Comm->last_interior, Np);
|
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, ScaLBL_Comm->first_interior, ScaLBL_Comm->last_interior, Np);
|
||||||
ScaLBL_Comm->SendHalo(Phi);
|
ScaLBL_Comm->SendHalo(Phi);
|
||||||
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, SolidPotential, 0, ScaLBL_Comm->next, Np);
|
ScaLBL_D3Q19_Gradient_DFH(NeighborList, Phi, Gradient, 0, ScaLBL_Comm->next, Np);
|
||||||
ScaLBL_Comm->RecvGrad(Phi,Gradient);
|
ScaLBL_Comm->RecvGrad(Phi,Gradient);
|
||||||
|
|
||||||
// Perform the collision operation
|
// Perform the collision operation
|
||||||
|
@ -45,32 +45,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
// BGK Model parameters
|
// BGK Model parameters
|
||||||
string FILENAME;
|
string FILENAME;
|
||||||
int timestepMax, interval;
|
|
||||||
double Fx,Fy,Fz,tol;
|
|
||||||
// Domain variables
|
// Domain variables
|
||||||
double Lx,Ly,Lz;
|
|
||||||
int nspheres;
|
|
||||||
int i,j,k,n;
|
int i,j,k,n;
|
||||||
int dim = 3;
|
|
||||||
//if (rank == 0) printf("dim=%d\n",dim);
|
|
||||||
int timestep = 0;
|
|
||||||
int timesteps = 100;
|
|
||||||
int centralNode = 2;
|
|
||||||
|
|
||||||
double tauA = 1.0;
|
|
||||||
double tauB = 1.0;
|
|
||||||
double rhoA = 1.0;
|
|
||||||
double rhoB = 1.0;
|
|
||||||
double alpha = 0.005;
|
|
||||||
double beta = 0.95;
|
|
||||||
|
|
||||||
double tau = 1.0;
|
|
||||||
double mu=(tau-0.5)/3.0;
|
|
||||||
double rlx_setA=1.0/tau;
|
|
||||||
double rlx_setB = 8.f*(2.f-rlx_setA)/(8.f-rlx_setA);
|
|
||||||
|
|
||||||
Fx = Fy = 0.f;
|
|
||||||
Fz = 0.f;
|
|
||||||
|
|
||||||
// Load inputs
|
// Load inputs
|
||||||
auto db = loadInputs( nprocs );
|
auto db = loadInputs( nprocs );
|
||||||
@ -188,9 +164,9 @@ int main(int argc, char **argv)
|
|||||||
//...........................................................................
|
//...........................................................................
|
||||||
|
|
||||||
// compute the gradient
|
// compute the gradient
|
||||||
ScaLBL_D3Q19_Gradient_DFH(neighborList, Phi, ColorGrad, Potential, ScaLBL_Comm->first_interior, ScaLBL_Comm->last_interior, Np);
|
ScaLBL_D3Q19_Gradient_DFH(neighborList, Phi, ColorGrad, ScaLBL_Comm->first_interior, ScaLBL_Comm->last_interior, Np);
|
||||||
ScaLBL_Comm->SendHalo(Phi);
|
ScaLBL_Comm->SendHalo(Phi);
|
||||||
ScaLBL_D3Q19_Gradient_DFH(neighborList, Phi, ColorGrad, Potential, 0, ScaLBL_Comm->first_interior, Np);
|
ScaLBL_D3Q19_Gradient_DFH(neighborList, Phi, ColorGrad, 0, ScaLBL_Comm->first_interior, Np);
|
||||||
ScaLBL_Comm->RecvGrad(Phi,ColorGrad);
|
ScaLBL_Comm->RecvGrad(Phi,ColorGrad);
|
||||||
|
|
||||||
double *COLORGRAD;
|
double *COLORGRAD;
|
||||||
|
Loading…
Reference in New Issue
Block a user