desc.grid.LinearGrid.copy_data_from_other
- LinearGrid.copy_data_from_other(x, other_grid, surface_label='rho', tol=1e-14)Source
Copy data x from other_grid to this grid at matching surface label.
Given data x corresponding to nodes of other_grid, copy data to a new array that corresponds to this grid.
- Parameters:
x (ndarray, shape(other_grid.num_nodes,...)) – Data to copy. Assumed to be constant over the specified surface.
other_grid (Grid) – Grid to copy from.
surface_label ({"rho", "poloidal", "zeta"}) – The surface label of rho, poloidal, or zeta.
tol (float) – tolerance for considering nodes the same.
- Returns:
y (ndarray, shape(grid2.num_nodes, …)) – Data copied to grid2