bug fix
This commit is contained in:
parent
969c9d54bd
commit
8f486b5198
@ -293,22 +293,26 @@ void ScaLBL_ColorModel::Initialize(){
|
|||||||
}
|
}
|
||||||
MPI_Bcast(×tep,1,MPI_INT,0,comm);
|
MPI_Bcast(×tep,1,MPI_INT,0,comm);
|
||||||
// Read in the restart file to CPU buffers
|
// Read in the restart file to CPU buffers
|
||||||
double *cPhi = new double[Np];
|
int *TmpMap;
|
||||||
double *cDist = new double[19*Np];
|
TmpMap = new int[Np];
|
||||||
int *TmpMap = new int[Np];
|
|
||||||
|
double *cPhi, *cDist;
|
||||||
|
cPhi = new double[Np];
|
||||||
|
cDist = new double[19*Np];
|
||||||
|
|
||||||
ifstream File(LocalRestartFile,ios::binary);
|
ifstream File(LocalRestartFile,ios::binary);
|
||||||
int idx;
|
int idx;
|
||||||
double value,va,vb;
|
double value,va,vb;
|
||||||
|
|
||||||
ScaLBL_CopyToHost(TmpMap, dvcMap, sizeof(int)*Np);
|
ScaLBL_CopyToHost(TmpMap, dvcMap, Np*sizeof(int));
|
||||||
|
|
||||||
for (int n=0; n<Np; n++){
|
for (int n=0; n<Np; n++){
|
||||||
File.read((char*) &va, sizeof(va));
|
File.read((char*) &va, sizeof(va));
|
||||||
File.read((char*) &vb, sizeof(vb));
|
File.read((char*) &vb, sizeof(vb));
|
||||||
value = (va-vb)/(va+vb);
|
value = (va-vb)/(va+vb);
|
||||||
idx = TmpMap[n];
|
idx = TmpMap[n];
|
||||||
cPhi[idx] = value;
|
if (idx > 0 && idx<N)
|
||||||
|
cPhi[idx] = value;
|
||||||
}
|
}
|
||||||
for (int n=0; n<Np; n++){
|
for (int n=0; n<Np; n++){
|
||||||
// Read the distributions
|
// Read the distributions
|
||||||
|
Loading…
Reference in New Issue
Block a user