aurel.maths
maths.py
- This module contains functions for manipulating rank 2 tensors, including:
extracting components or formatting components into matrices,
computing determinants and inverses,
symmetrizing or antisymmetrizing tensors.
safe division
- aurel.maths.determinant4(f)[source]
Determinant of a 4x4 matrice in every position of the data grid.
- aurel.maths.getcomponents3(f)[source]
Extract components of a rank 2 tensor with 3D indices.
This assumes this tensor is symmetric.
- Parameters:
f ((3, 3, Nx, Ny, Nz) array_like or list of 6 components [xx, xy, xz, yy, yz, zz])
- Returns:
[xx, xy, xz, yy, yz, zz] – Each element is (Nx, Ny, Nz) array_like
- Return type:
list
- aurel.maths.getcomponents4(f)[source]
Extract components of a rank 2 tensor with 4D indices.
This assumes this tensor is symmetric.
- Parameters:
f ((4, 4, Nx, Ny, Nz) array_like or list of 10 components [tt, tx, ty, tz, xx, xy, xz, yy, yz, zz])
- Returns:
[tt, tx, ty, tz, xx, xy, xz, yy, yz, zz] – Each element is (Nx, Ny, Nz) array_like
- Return type:
list