refactoring to mkae things work hopefullly

This commit is contained in:
James E McClure
2018-05-06 00:35:37 -04:00
parent 1ad1b08119
commit 4fd78883e8
3 changed files with 4 additions and 4 deletions

View File

@@ -493,8 +493,8 @@ void runAnalysis::run( int timestep, TwoPhase& Averages, const double *Phi,
{
phase = std::shared_ptr<DoubleArray>(new DoubleArray(d_N[0],d_N[1],d_N[2]));
//ScaLBL_CopyToHost(phase->data(),Phi,N*sizeof(double));
DoubleArray PHASE(d_N[0],d_N[1],d_N[2]));
ScaLBL_Comm.RegularLayout(Map,Phi,PHASE);
DoubleArray PHASE(d_N[0],d_N[1],d_N[2]);
d_ScaLBL_Comm.RegularLayout(d_Map,Phi,PHASE);
memcpy(PHASE.data(),phase->data(),N*sizeof(double));
}

View File

@@ -4125,7 +4125,7 @@ void ScaLBL_Communicator::RecvHalo(double *data){
//...................................................................................
}
void ScaLBL_Communicator::RegularLayout(IntArray map, double *data, DoubleArray &regdata){
void ScaLBL_Communicator::RegularLayout(IntArray map, const 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);

View File

@@ -297,7 +297,7 @@ public:
void SendHalo(double *data);
void RecvHalo(double *data);
void RecvGrad(double *Phi, double *Gradient);
void RegularLayout(IntArray map, double *data, DoubleArray &regdata);
void RegularLayout(IntArray map, const double *data, DoubleArray &regdata);
// Routines to set boundary conditions
void Color_BC_z(int *Map, double *Phi, double *Den, double vA, double vB);