Feature/decouple geometry theta resolution
David Dickinson
Branch: feature/decouple_geometry_theta_resolution
Branch: 8.1-RC
Merged
Merged pull request
Merged in feature/decouple_geometry_theta_resolution (pull request #435)
Merged in feature/decouple_geometry_theta_resolution (pull request #435)
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 callingeikcoeffs
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 thentheta
used for the geometry calculation from the equilibrium file itself, in which casentheta_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 ignoreequal_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).