desc.grid.QuadratureGrid.meshgrid_flatten
- QuadratureGrid.meshgrid_flatten(x, order)Source
Flatten data to match standard ordering. Inverse of grid.meshgrid_reshape.
Given data on a tensor product grid, flatten the data in the standard DESC ordering.
- Parameters:
x (ndarray, shape(n1, n2, n3,...)) – Data to reshape.
order (str) – Order of axes for input data. Should be a permutation of
grid.coordinates, egorder="rtz"has the first axis of the data correspond to different rho coordinates, the second axis to different theta, etc.order="trz"would have the first axis correspond to theta, and so on.
- Returns:
x (ndarray, shape(n1*n2*n3,…)) – Data flattened in standard DESC ordering.