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 arrayoffloats) – cell corner point data in Pagoda 7D format [nk, nj, ni, kp, jp, ip, xyz]centres (optional,
4D numpy arrayoffloats) – cell centre points [nk, nj, ni, xyz]; calculated if Noneoff_hand (
boolean, defaultFalse) – 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