com1DFA.DFAtools.getNormalArray

getNormalArray(x, y, Nx, Ny, Nz, csz)[source]

Interpolate vector field from grid to unstructures points

Originaly created to get the normal vector at location (x,y) given the normal vector field on the grid. Grid has its origin in (0,0). Can be used to interpolate any vector field. Interpolation using a bilinear interpolation

Parameters
  • x (numpy array) – location in the x location of desiered interpolation

  • y (numpy array) – location in the y location of desiered interpolation

  • Nx (2D numpy array) – x component of the vector field at the grid nodes

  • Ny (2D numpy array) – y component of the vector field at the grid nodes

  • Nz (2D numpy array) – z component of the vector field at the grid nodes

  • csz (float) – cellsize of the grid

Returns

  • nx (numpy array) – x component of the interpolated vector field at position (x, y)

  • ny (numpy array) – y component of the interpolated vector field at position (x, y)

  • nz (numpy array) – z component of the interpolated vector field at position (x, y)