Allow odd number of passing pitch angles
Currently the number of pitch angles in the passing part of lambda is set to be ng2 = 2*ngauss
where ngauss
is an input parameter. In many (all?) instances the number of trapped pitch angles will be odd (~ ntheta/2+1
) and hence the total number of pitch angles will be odd. This can sometimes complicate the choice of parallelisation sweetspots when attempting to distribute lambda. Looking into the code, there seems to be no clear numerical reason for the restriction for using an even number of passing pitch angles so I’d hope it should be possible to allow for odd ng2
to be specified directly in the input file.
In a test of this approach it was found that velocity space integrations are equally accurate with both even and odd ng2
and sample physics results are also insensitive to this detail. There is an implicit assumption in init_vpdiff
of collisions that ng2 >= 2
and an assumption in get_gtran
of dist_fn that ng2 > 3
(this is only used for diagnostic output as a part of the get_verr
diagnostics).
Is there a reason not to allow odd ng2
?
Comments (2)
-
reporter -
reporter - changed status to resolved
Implemented in PR #399
- Log in to comment
If there’s no reason to forbid odd
ng2
then we could simply addng2
as an input which defaults to2*ngauss
if not set.