Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug in which qdisk structure was incorrectly zeroed before photon ... #69

Merged
merged 1 commit into from
Feb 14, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions python.c
Original file line number Diff line number Diff line change
Expand Up @@ -1709,17 +1709,6 @@ run -- 07jul -- ksl
top_bot_select, select_extract, rho_select, z_select,
az_select, r_select);

/* Zero the arrays that store the heating of the disk */

/* 080520 - ksl - There is a conundrum here. One should really zero out the
* quantities below each time the wind structure is updated. But relatively
* few photons hit the disk under normal situations, and therefore the statistcs
* are not very good.
*/
for (n = 0; n < NRINGS; n++)
{
qdisk.heat[n] = qdisk.nphot[n] = qdisk.w[n] = qdisk.ave_freq[n] = 0;
}

wind_rad_init (); /*Zero the parameters pertaining to the radiation field */

Expand Down Expand Up @@ -1765,6 +1754,23 @@ run -- 07jul -- ksl

define_phot (p, freqmin, freqmax, nphot_to_define, 0, iwind, 1);

/* Zero the arrays that store the heating of the disk */

/* 080520 - ksl - There is a conundrum here. One should really zero out the
* quantities below each time the wind structure is updated. But relatively
* few photons hit the disk under normal situations, and therefore the statistcs
* are not very good.
*/

/* 130213 JM -- previously this was done before define_phot, which meant that
the ionization state was never computed with the heated disk */

for (n = 0; n < NRINGS; n++)
{
qdisk.heat[n] = qdisk.nphot[n] = qdisk.w[n] = qdisk.ave_freq[n] = 0;
}



photon_checks (p, freqmin, freqmax, "Check before transport");

Expand Down