MiniTensor Version of the Day
Loading...
Searching...
No Matches
MiniTensor

Table of Contents

MiniTensor Overview

MiniTensor is a library for the use, manipulation, algebra and optimization of small vectors and tensors and problems that depend on them. Its purpose is to provide a compact representation of vector and tensor expressions. Its emphasis is on ease of use, and accurate algorithms, specifically those used for the development of constitutive models in finite deformation solid mechanics. It is fully templated, compatible with Sacado automatic differentiation types, and usable inside Kokkos device kernels.

MiniTensor is part of the Trilinos Project.

Modules

MiniTensor is organized as a collection of module headers. Including MiniTensor.h provides the containers plus linear algebra, geometry and mechanics; each module header can also be included on its own.

Header Contents
MiniTensor.h Umbrella: containers, linear algebra, geometry, mechanics
MiniTensor_Vector.h, MiniTensor_Tensor.h, MiniTensor_Tensor3.h, MiniTensor_Tensor4.h, MiniTensor_Matrix.h Containers
MiniTensor_Traits.h, MiniTensor_Scalar.h Type Traits and Scalar Utilities
MiniTensor_Norms.h Norms and Invariants
MiniTensor_Inverse.h Inverse and Linear Solves
MiniTensor_Factorizations.h Factorizations
MiniTensor_MatrixFunctions.h Matrix Functions
MiniTensor_Rotations.h Rotations
MiniTensor_LinearAlgebra.h Umbrella over the five linear-algebra modules above
MiniTensor_Quaternion.h Quaternions and rotation-representation conversions: Rotations
MiniTensor_Geometry.h Geometry
MiniTensor_Mechanics.h Mechanics
MiniTensor_Solvers.h, MiniTensor_TestFunctions.h Solvers and Optimization

Basic Usage

#include <MiniTensor.h>
using T = double;
// 3D identity tensor, static storage.
minitensor::Tensor<T, 3> const I = minitensor::identity<T, 3>(3);
// A deformation-gradient-like tensor; fillers provide zeros, ones,
// random values, ...
F = 0.5 * (F + minitensor::transpose(F)) + I;
// Linear algebra and mechanics operations.
T const j = minitensor::det(F);
minitensor::Tensor<T, 3> const E = 0.5 * (C - I);
KOKKOS_INLINE_FUNCTION Matrix< T, M, N > transpose(Matrix< T, N, M > const &A)
KOKKOS_INLINE_FUNCTION Tensor< T, N > log_sym(Tensor< T, N > const &A)
KOKKOS_INLINE_FUNCTION T det(Tensor< T, N > const &A)

Replace double with a Sacado forward-AD type to differentiate through any of the above.

Copyright and License

MiniTensor is distributed under the BSD 3-clause license; see the COPYRIGHT and LICENSE files in the package root, and the Trilinos License and Copyright page.

For All Questions and Comments...

Please contact the authors listed in the License above, or open an issue in the Trilinos GitHub repository (https://github.com/trilinos/Trilinos).