Skip to content

A templated C++ library for working with small symmetric tensors of arbitrary rank.

License

Notifications You must be signed in to change notification settings

JacksonCampolattaro/symtensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

symtensor logo

unit tests MIT license C++20

For more information, see the documentation!

Symtensor is designed for working with tensors which are...

  • Symmetric — only the upper triangle needs to be stored.
  • Small — indices have semantic meaning, similar to GLM's mat3x3 type.
  • High-rank — not just vectors and matrices, these tensors can have any number of dimensions.

These are unusual needs for a tensor library. The design comes from symtensor's original purpose as part of an implementation of the Fast Multipole Method for an n-body gravity simulation. Popular tensor libraries like GLM, Eigen, and Fastor are immediately ruled out for this purpose.

There are a handful of projects which aim to solve the same problems as this one, including Tensor, GADGET-4's symmetric tensor library, and fmmgen. Tensor is feature-rich, but has a broader maths focus and provides no benchmarks. GADGET-4's library has been proven to perform well for n-body simulations, but is ultimately limited by its handwritten operators -- it can't be used for high-order multipoles. Fmmgen uses a script to generate efficient multipole and symmetric tensor code which makes it very flexible, but the code it produces is entirely based on C-style arrays and not intended to be human-readable.

The goal of this project is to produce a library which combines the modern sensibilities of Tensor with the performance of GADGET-4's library and the flexibility of fmmgen.

About

A templated C++ library for working with small symmetric tensors of arbitrary rank.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published