Commit ccd4adb8 authored by Alain O' Miniussi's avatar Alain O' Miniussi
Browse files

avoid implicit copy of this in kernel

refs #597
parent 8d45f454
......@@ -154,9 +154,10 @@ namespace fargOCA {
arr1d<real const> radii = grid.radii();
arr1d<real const> phiMed = grid.phiMed();
arr3d<real> stellarrad = stellarRadiation;
arr3d<real const> dens = disk.density().data();
arr3d<real const> tau = opticalDepth(disk);
arr3d<real> stellarrad = stellarRadiation;
arr3d<real const> dens = disk.density().data();
arr3d<real const> tau = opticalDepth(disk);
arr3d<real const> simpleOpacity = this->simpleOpacity; // avoid this capture
if (disk.physic().adiabatic->radiative->star) {
real fStar = disk.physic().adiabatic->radiative->star->fStar();
......@@ -275,11 +276,16 @@ namespace fargOCA {
arr3d<real const> temperature = disk.temperature()->data();
arr3d<real const> density = disk.density().data();
DiskPhysic::Adiabatic::Radiative cfg = *disk.physic().adiabatic->radiative;
// avoid this capture:
arr3d<real> simpleOpacity = this->simpleOpacity;
arr3d<real> RosselandOpacity = this->RosselandOpacity;
arr3d<real> PlankOpacity = this->PlankOpacity;
kk::parallel_for("simple_opacity", grid.fullRange(),
LBD(int i, int h, int j) {
simpleOpacity(i,h,j) = cfg.dustToGas*100*3.5*RHO0*R0;
});
kk::parallel_for("Rosse_opacity", grid.fullRange(),
kk::parallel_for("Rosseland_opacity", grid.fullRange(),
LBD(int i, int h, int j) {
// multiplication by a factor 100 of DUSTTOGAS as opacity is already calculated for
// a dust to gas ratio of 0.01
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment