debugging color

This commit is contained in:
James E McClure 2018-01-26 15:09:46 -05:00
parent 02b86d2bef
commit eda88946f9
3 changed files with 11 additions and 11 deletions

View File

@ -256,7 +256,7 @@ public:
void BiRecvD3Q7AA(double *Aq, double *Bq);
void SendHalo(double *data);
void RecvHalo(double *data);
void RegularLayout(IntArray map, double *data, double *regdata);
void RegularLayout(IntArray map, double *data, DoubleArray regdata);
// Routines to set boundary conditions
void Color_BC_z(int *Map, double *Phi, double *Den, double vA, double vB);
@ -4267,7 +4267,7 @@ void ScaLBL_Communicator::RecvHalo(double *data){
//...................................................................................
}
void ScaLBL_Communicator::RegularLayout(IntArray map, double *data, double *regdata){
void ScaLBL_Communicator::RegularLayout(IntArray map, double *data, DoubleArray regdata){
// Gets data from the device and stores in regular layout
int i,j,k,n,idx;
int Nx = map.size(0);
@ -4285,7 +4285,7 @@ void ScaLBL_Communicator::RegularLayout(IntArray map, double *data, double *regd
idx=map(i,j,k);
if (!(idx<0)){
double value=TmpDat[idx];
regdata[n]=value;
regdata(i,j,k)=value;
}
}
}

View File

@ -493,10 +493,10 @@ 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,Pressure,Averages->Press);
ScaLBL_Comm.RegularLayout(Map,&Velocity[0],Averages->Vel_x);
ScaLBL_Comm.RegularLayout(Map,&Velocity[Np],Averages->Vel_y);
ScaLBL_Comm.RegularLayout(Map,&Velocity[2*Np],Averages->Vel_z);
//...........................................................................
if (rank==0) printf("********************************************************\n");

View File

@ -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);
ScaLBL_Comm.RegularLayout(Map,&Velocity[0],Averages->Vel_x);
ScaLBL_Comm.RegularLayout(Map,&Velocity[Np],Averages->Vel_y);
ScaLBL_Comm.RegularLayout(Map,&Velocity[2*Np],Averages->Vel_z);
PROFILE_STOP("Copy-State",1);
}
std::shared_ptr<double> cDen, cfq;