jaxmat.tensors.generic_tensors module#

class Tensor[source]#

Bases: Module

Tensor(tensor: jax.Array | None = None, array: jax.Array | None = None)

dim: int#
rank: int#
property shape#
property tensor#
property T#
property array#
property array_shape#
rotate(R)[source]#

Rotate the tensor by applying rotation matrix to each index.

class Tensor2[source]#

Bases: Tensor

Tensor2(tensor: jax.Array | None = None, array: jax.Array | None = None)

dim: int = 3#
rank: int = 2#
classmethod identity()[source]#
property sym#
property inv#
property eigenvalues#
property T#
class SymmetricTensor2[source]#

Bases: Tensor2

SymmetricTensor2(tensor: jax.Array | None = None, array: jax.Array | None = None)

property array_shape#
is_symmetric()[source]#
symmetric_kelvin_mandel_index_map(d)[source]#
Returns:

list mapping KM index → (i,j) - ij_to_km: dict mapping (i,j) → KM index

Return type:

  • km_to_ij

class SymmetricTensor4[source]#

Bases: Tensor

SymmetricTensor4(tensor: jax.Array | None = None, array: jax.Array | None = None)

dim: int = 3#
rank: int = 4#
classmethod identity()[source]#
classmethod J()[source]#
classmethod K()[source]#
property array_shape#
is_symmetric()[source]#
property inv#
class IsotropicTensor4[source]#

Bases: SymmetricTensor4

IsotropicTensor4(kappa, mu)

kappa: float#
mu: float#
property basis#
property coeffs#
eval()[source]#
property inv#