Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Reification/TensorRepresentationIndexing

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tensor Representation Indexing (tri)

About

This is a C++14 header-only library for symmetry-optimized tensor computation and type checking.

Tensor contraction formulas can be written using Einstein index notation:

  • Repeated index names are contracted.
  • Index type checking ensures that incorrect formulas are caught at compile time.
  • See tests for examples.

Each tensor index has a type corresponding to a space with a basis and units (e.g. meters, inverse-seconds):

  • Only dual spaces can be contracted.
  • The type checker will detect incompatible index contractions.
  • Space types are derived according to tensor constructions.

Contracted tensor products are lazy-evaluated:

  • Intermediate terms that will not be used in the final contraction are not computed.
  • Index re-use in a tensor contraction expression will result in a compiler error.

Tensors with symmetries are represented using only independent components:

  • Representations are implemented for fully symmetric or anti-symmetric index groups.
  • Efficient multivariable polynomials are supported.
  • The representation uses a single index with a distinct type.

Memory mapping to Eigen is supported for efficient matrix operations and decompositions.

Planned:

  • Young Tableaux independent component specification.
  • Overlapping symmetries (e.g. for Riemann curvature tensor).
  • Optimal contraction ordering (like optimal rectangular matrix associative ordering).

Required:

Included:

Optional:

Documentation:

Derived from EmptyCPP project template (https://github.com/GabrielHare/EmptyCPP)

Building unit tests

Build using CLang:

cmake -G "Unix Makefiles" -B builds/Clang -S . -DBUILD_TESTS=ON \
  -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
cmake --build builds/Clang --target tests

Build using XCode:

cmake -G Xcode -B builds/XCode2025 -S . -DBUILD_TESTS=ON
cmake --build builds/XCode2025 --target tests --config Release

Build using Visual Studio:

cmake -G "Visual Studio 17 2022" -B builds/VS2022 -S . -DBUILD_TESTS=ON -A x64
cmake --build builds/VS2022 --target tests --config Release

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.