In GitLab by @mkovari on Jan 14, 2021, 14:43
Issue #1230 showed that function pbremden (Bremsstrahlung radiation density) takes 32% of the total execution time (includes calls from that function).

As far as I can see, the only purpose of this function is to be able to divide the total radiation into line radiation and bremsstrahlung so as to be able to output these quantities. I think that only the total radiation is actually used in the remainder of the PROCESS calculation. The only line I can find where the bremsstrahlung is used is
where
!! pimp : output real : total impurity radiation density (W/m3)
!! pbrem : output real : Bremsstrahlung radiation density (W/m3)
!! pline : output real : other radiation density (W/m3)
If this is correct, then we have some simple options for speeding up the code:
EITHER Remove this routine entirely and remove the separate output of line radiation and bremsstrahlung,
OR calculate the bremsstrahlung only on the function call that occurs after the last VMCON iteration when the OUT.DAT will be written.
Detailed options:
- Replace the function
zav_of_te by something much quicker.
- Reduce the number of steps in the profile integration:
npts = 200 in subroutine imprad.
In GitLab by @mkovari on Jan 14, 2021, 14:43
Issue #1230 showed that

function pbremden(Bremsstrahlung radiation density) takes 32% of the total execution time (includes calls from that function).As far as I can see, the only purpose of this function is to be able to divide the total radiation into line radiation and bremsstrahlung so as to be able to output these quantities. I think that only the total radiation is actually used in the remainder of the PROCESS calculation. The only line I can find where the bremsstrahlung is used is
where
If this is correct, then we have some simple options for speeding up the code:
EITHER Remove this routine entirely and remove the separate output of line radiation and bremsstrahlung,
OR calculate the bremsstrahlung only on the function call that occurs after the last VMCON iteration when the OUT.DAT will be written.
Detailed options:
zav_of_teby something much quicker.npts = 200insubroutine imprad.