Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
KeitaNakamura committed Sep 1, 2024
1 parent 9150518 commit 0840a34
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
[![CI](https://github.com/KeitaNakamura/Tensorial.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/KeitaNakamura/Tensorial.jl/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/KeitaNakamura/Tensorial.jl/branch/main/graph/badge.svg?token=V58DXDI1R5)](https://codecov.io/gh/KeitaNakamura/Tensorial.jl)

Tensorial provides useful tensor operations (e.g., contraction; tensor product, ``; `inv`; etc.) written in the [Julia programming language](https://julialang.org).
The library supports arbitrary size of non-symmetric and symmetric tensors, where symmetries should be specified to avoid wasteful duplicate computations.
The way to give a size of the tensor is similar to [StaticArrays.jl](https://github.com/JuliaArrays/StaticArrays.jl), and symmetries of tensors can be specified by using `@Symmetry`.
For example, symmetric fourth-order tensor (symmetrizing tensor) is represented in this library as `Tensor{Tuple{@Symmetry{3,3}, @Symmetry{3,3}}}`.
Einstein summation macro and automatic differentiation functions are also provided.
Tensorial provides useful tensor operations, such as contraction, tensor product (``), and inversion (`inv`), implemented in the Julia programming language. The library supports tensors of arbitrary size, including both symmetric and non-symmetric tensors, where symmetries can be specified to avoid redundant computations. The approach for defining the size of a tensor is similar to that used in [StaticArrays.jl](https://github.com/JuliaArrays/StaticArrays.jl), and tensor symmetries can be specified using the `@Symmetry` macro. For instance, a symmetric fourth-order tensor (a symmetrized tensor) is represented in this library as `Tensor{Tuple{@Symmetry{3,3}, @Symmetry{3,3}}}`. The library also includes an Einstein summation macro `@einsum` and functions for automatic differentiation, such as `gradient` and `hessian`.

## Speed

Expand Down
7 changes: 2 additions & 5 deletions docs/src/Tensor Type.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Type parameters

All tensors are represented by a type `Tensor{S, T, N, L}` where each type parameter represents following:
All tensors in Tensorial.jl are represented by the type `Tensor{S, T, N, L}`, where each type parameter represents the following:

- `S`: The size of `Tensor`s which is specified by using `Tuple` (e.g., 3x2 tensor becomes `Tensor{Tuple{3,2}}`).
- `T`: The type of element which must be `T <: Real`.
Expand All @@ -13,10 +13,7 @@ Basically, the type parameters `N` and `L` do not need to be specified for const

## `Symmetry`

If possible, specifying the symmetry of the tensor is good for performance since Tensorial.jl provides the optimal computations.
The symmetries can be applied using `Symmetry` in type parameter `S` (e.g., `Symmetry{Tuple{3,3}}`).
`@Symmetry` macro can omit `Tuple` like `@Symmetry{2,2}`.
The following are examples to specify symmetries:
Specifying the symmetry of a tensor can improve performance, as Tensorial.jl provides optimized computations for symmetric tensors. Symmetries can be applied using `Symmetry` in the type parameter `S` (e.g., `Symmetry{Tuple{3,3}}`). The `@Symmetry` macro simplifies this process by allowing you to omit `Tuple`, as in `@Symmetry{2,2}`. Below are some examples of how to specify symmetries:

- ``A_{(ij)}`` with 3x3: `Tensor{Tuple{@Symmetry{3,3}}}`
- ``A_{(ij)k}`` with 3x3x2: `Tensor{Tuple{@Symmetry{3,3}, 2}}`
Expand Down
6 changes: 1 addition & 5 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

## Introduction

Tensorial provides useful tensor operations (e.g., contraction; tensor product, ``; `inv`; etc.) written in the [Julia programming language](https://julialang.org).
The library supports arbitrary size of non-symmetric and symmetric tensors, where symmetries should be specified to avoid wasteful duplicate computations.
The way to give a size of the tensor is similar to [StaticArrays.jl](https://github.com/JuliaArrays/StaticArrays.jl), and symmetries of tensors can be specified by using `@Symmetry`.
For example, symmetric fourth-order tensor (symmetrizing tensor) is represented in this library as `Tensor{Tuple{@Symmetry{3,3}, @Symmetry{3,3}}}`.
Einstein summation macro and automatic differentiation functions are also provided.
Tensorial provides useful tensor operations, such as contraction, tensor product (``), and inversion (`inv`), implemented in the Julia programming language. The library supports tensors of arbitrary size, including both symmetric and non-symmetric tensors, where symmetries can be specified to avoid redundant computations. The approach for defining the size of a tensor is similar to that used in [StaticArrays.jl](https://github.com/JuliaArrays/StaticArrays.jl), and tensor symmetries can be specified using the `@Symmetry` macro. For instance, a symmetric fourth-order tensor (a symmetrized tensor) is represented in this library as `Tensor{Tuple{@Symmetry{3,3}, @Symmetry{3,3}}}`. The library also includes an Einstein summation macro `@einsum` and functions for automatic differentiation, such as `gradient` and `hessian`.

## Installation

Expand Down

0 comments on commit 0840a34

Please sign in to comment.