Debugging color simulator

This commit is contained in:
James E McClure
2018-01-26 14:16:30 -05:00
parent 73dfa1fb7c
commit 3989da9823
2 changed files with 14 additions and 14 deletions

View File

@@ -120,8 +120,8 @@ int main(int argc, char **argv)
// Set default values
// Print warning
printf("WARNING: No input file provided (Color.in is missing)! Default parameters will be used. \n");
tau1 = tau2 = 1.0;
rho1 = rho2 = 1.0;
tauA = tauB = 1.0;
rhoA = rhoB = 1.0;
alpha=0.005;
beta= 0.9;
Fx = Fy = Fz = 0.0;
@@ -205,10 +205,10 @@ int main(int argc, char **argv)
if (rank==0){
printf("********************************************************\n");
printf("tau (non-wetting) = %f \n", tau1);
printf("tau (wetting) = %f \n", tau2);
printf("density (non-wetting) = %f \n", rho1);
printf("density (wetting) = %f \n", rho2);
printf("tau (non-wetting) = %f \n", tauA);
printf("tau (wetting) = %f \n", tauB);
printf("density (non-wetting) = %f \n", rhoA);
printf("density (wetting) = %f \n", rhoB);
printf("alpha = %f \n", alpha);
printf("beta = %f \n", beta);
printf("gamma_{wn} = %f \n", 5.796*alpha);
@@ -494,9 +494,9 @@ int main(int argc, char **argv)
ScaLBL_DeviceBarrier();
ScaLBL_CopyToHost(Averages->Phase.data(),Phi,N*sizeof(double));
ScaLBL_Comm.RegularLayout(Map,Pressure,Averages->Press.data());
ScaLBL_Comm.RegularLayout(Map,&Velocity[0],Averages->Vel_x.data());
ScaLBL_Comm.RegularLayout(Map,&Velocity[Np],Averages->Vel_y.data());
ScaLBL_Comm.RegularLayout(Map,&Velocity[2*Np],Averages->Vel_z.data());
ScaLBL_Comm.RegularLayout(Map,&Vel[0],Averages->Vel_x.data());
ScaLBL_Comm.RegularLayout(Map,&Vel[Np],Averages->Vel_y.data());
ScaLBL_Comm.RegularLayout(Map,&Vel[2*Np],Averages->Vel_z.data());
//...........................................................................
if (rank==0) printf("********************************************************\n");

View File

@@ -229,7 +229,7 @@ void run_analysis( int timestep, int restart_interval,
BlobIDstruct& last_ids, BlobIDstruct& last_index, BlobIDList& last_id_map,
int Np, int Nx, int Ny, int Nz, bool pBC, double beta, double err,
const double *Phi, double *Pressure, const double *Velocity,
const int *Map, const double *fq, const double *Den,
const int *Map, double *fq, double *Den,
const char *LocalRestartFile, std::vector<IO::MeshDataStruct>& visData, fillHalo<double>& fillData,
ThreadPool& tpool, AnalysisWaitIdStruct& wait )
{
@@ -312,10 +312,10 @@ void run_analysis( int timestep, int restart_interval,
PROFILE_STOP("Copy-Wait",1);
PROFILE_START("Copy-State",1);
memcpy(Averages.Phase.data(),phase->data(),N*sizeof(double));
ScaLBL_Comm.RegularLayout(Map,Pressure,Averages->Press.data());
ScaLBL_Comm.RegularLayout(Map,&Velocity[0],Averages->Vel_x.data());
ScaLBL_Comm.RegularLayout(Map,&Velocity[Np],Averages->Vel_y.data());
ScaLBL_Comm.RegularLayout(Map,&Velocity[2*Np],Averages->Vel_z.data());
ScaLBL_Comm.RegularLayout(Map,Pressure,Averages.Press.data());
ScaLBL_Comm.RegularLayout(Map,&Velocity[0],Averages.Vel_x.data());
ScaLBL_Comm.RegularLayout(Map,&Velocity[Np],Averages.Vel_y.data());
ScaLBL_Comm.RegularLayout(Map,&Velocity[2*Np],Averages.Vel_z.data());
PROFILE_STOP("Copy-State",1);
}
std::shared_ptr<double> cDen, cfq;