Feature/decouple geometry theta resolution

Merged
#435 · Created  · Last updated

Merged pull request

Merged in feature/decouple_geometry_theta_resolution (pull request #435)

b800508·Author: ·Closed by: ·2021-08-02

Description

  • Add a routine to resample the output of eikcoefs onto a different theta resolution

  • Add ntheta_geometry input to allow specification of resolution in geometry calculation

If ntheta_geometry is not set then follow old code path of calling eikcoeffs directly.

This is designed to allow the calculation in eikcoeffs to be performed at a different theta resolution to that used in the rest of the code. This can help to ensure that the calculation of the geometrical coefficients isn’t limiting the minimum theta resolution for simulation convergence.

Currently this is only implemented for 'eik' style grids. Some 'eik' variants derive the ntheta used for the geometry calculation from the equilibrium file itself, in which case ntheta_geometry cannot be used to force higher resolution calculation, but the new code can still allow us to sample onto a different theta grid.

We run gridgen on the resampled data rather than the raw data from geometry. In the common use case where ntheta_geometry > ntheta we may rather run gridgen on the higher resolution raw data and then down-sample the result. This could be implemented but is likely to complicate the code and gridgen can sometimes struggle with high resolution.

The geometry calculated using the new code path is not guaranteed to be directly backwards compatible, even in the case where ntheta_geometry = ntheta as we resample onto a uniform theta grid (before then calling gridgen). This means we also effectively ignore equal_arc after the initial geometry calculation (although we may actually do this already as gridgen may rearrange grid points so it is no longer equal arc). To (partially) address this one could choose to define the new theta grid by directly sampling the original theta grid (e.g. interpolation in index space).

0 attachments

0 comments

Loading commits...