Commit 3bd4b2d5 authored by Alain O' Miniussi's avatar Alain O' Miniussi
Browse files

Limit usage of fake constant to make cuda happier.

parent ca2c9da7
......@@ -833,7 +833,7 @@ namespace fargOCA {
real kappa;
switch (opacityLaw) {
case OL_BELL_LIN:
kappa = details::oplin(temp*TEMP0,rho*RHO0);
kappa = details::oplin(temp,rho);
break;
case OL_CONSTANT:
kappa = constKappa;
......
......@@ -251,11 +251,11 @@ namespace fargOCA {
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
RosselandOpacity(i,h,j) = cfg.kappa(temperature(i,h,j),density(i,h,j));
RosselandOpacity(i,h,j) = cfg.kappa(temperature(i,h,j)*TEMP0, density(i,h,j)*RHO0);
});
kk::parallel_for("Plank_opacity", grid.fullRange(),
LBD(int i, int h, int j) {
PlankOpacity(i,h,j) = cfg.dustToGas*100*cfg.kappa(temperature(i,h,j),density(i,h,j));
PlankOpacity(i,h,j) = cfg.dustToGas*100*cfg.kappa(temperature(i,h,j)*TEMP0, density(i,h,j)*RHO0);
});
}
......
......@@ -81,7 +81,7 @@ write_tau1(Disk& gas, std::ostream& out)
real deltaphi = radMed(i)*(phi[h+1]-phi[h]);
real moy = 0.;
for (int j = 0; j < ns; j++ ) {
moy += dens(i,h,j)*cfg.kappa(temp(i,h,j), dens(i,h,j));
moy += dens(i,h,j)*cfg.kappa(temp(i,h,j)*TEMP0, dens(i,h,j)*RHO0);
}
moy /= ns;
tau(i) += moy*deltaphi;
......
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