resqpy.olio.volume.tetra_volumes

resqpy.olio.volume.tetra_volumes(cp, centres=None, off_hand=False)[source]

Returns volume array for all hexahedral cells assuming bilinear faces, using numpy operations.

Parameters
  • cp (7D numpy array of floats) – cell corner point data in Pagoda 7D format [nk, nj, ni, kp, jp, ip, xyz]

  • centres (optional, 4D numpy array of floats) – cell centre points [nk, nj, ni, xyz]; calculated if None

  • off_hand (boolean, default False) – if True, the handedness of IJK space is the opposite of that for xyz space; if this argument is not set correctly, negative volumes will be returned

Returns

numpy 3D array of floats being the cell volumes [nk, nj, ni]

Note

length units are assumed to be consistent in x, y & z; and untis of returned volumes are implicitly those length units cubed