Tweaks for speed
This commit is contained in:
parent
8ab094ad3d
commit
d875416200
2 changed files with 128 additions and 135 deletions
|
@ -192,7 +192,9 @@ void SPHSmooth<ValType,Ndims>::addGridSite(const typename SPHTree::coords& c)
|
|||
{
|
||||
ComputePrecision d = internal.distances[i];
|
||||
SPHCell& cell = *(internal.ngb[i]);
|
||||
cell.val.weight += getKernel(d/internal.smoothRadius) / r3;
|
||||
double kernel_value = getKernel(d/internal.smoothRadius) / r3;
|
||||
#pragma omp atomic
|
||||
cell.val.weight += kernel_value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue