Skip to content

Commit 0eca4d5

Browse files
committed
small bug fix
1 parent 26b9a18 commit 0eca4d5

1 file changed

Lines changed: 7 additions & 37 deletions

File tree

src/evolution.cu

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -220,42 +220,15 @@ void evolve(Grid &par,
220220
*gridSize);
221221

222222

223-
/*
224-
// calling the kernel to find the edges
225-
if (dimnum > 1){
226-
find_edges(par, wfc, edges);
227-
double* edges_gpu = par.dsval("edges_gpu");
228-
229-
// Now we need to output everything
230-
if (write_it){
231-
FileIO::writeOutDouble(buffer, data_dir+"Edges",
232-
edges, gridSize, i);
233-
}
234-
235-
// Creating boolean array to work with
236-
double thresh = find_thresh(par,edges_gpu,
237-
thresh_const);
238-
//std::cout << "threshold is: " << thresh << '\n';
239-
bool *threshold_gpu = threshold_wfc(par, edges_gpu,
240-
thresh,
241-
xDim, yDim, zDim);
242-
243-
bool *threshold_cpu =
244-
(bool *)malloc(sizeof(bool)*gridSize);
245-
246-
cudaMemcpy(threshold_cpu, threshold_gpu,
247-
sizeof(bool)*gridSize,
248-
cudaMemcpyDeviceToHost);
249-
250-
if (write_it){
251-
FileIO::writeOutBool(buffer, data_dir+"Thresh",
252-
threshold_cpu,gridSize,i);
253-
}
223+
find_edges(par, wfc, edges);
224+
double* edges_gpu = par.dsval("edges_gpu");
254225

255-
cudaFree(threshold_cpu);
256-
free(edges);
226+
// Now we need to output everything
227+
if (write_it){
228+
FileIO::writeOutDouble(buffer, data_dir+"Edges",
229+
edges, gridSize, i);
257230
}
258-
*/
231+
free(edges);
259232

260233
}
261234
else if (dimnum == 2){
@@ -880,9 +853,6 @@ void evolve(Grid &par,
880853
}
881854
}
882855

883-
// std::cout << "finished evolution" << '\n';
884-
// Storing wavefunctions for later
885-
//std::cout << gpuWfc[0].x << '\t' << gpuWfc[0].y << '\n';
886856
par.store("wfc", wfc);
887857
par.store("wfc_gpu", gpuWfc);
888858
}

0 commit comments

Comments
 (0)