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

83 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, Small and High-rank, and for the composition of those tensors into Multipoles.

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 ruled out for this purpose because they don't support condensed storage of symmetric tensors.

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 doesn't provide 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 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.

Eventually, I intend to incorporate symtensor into a larger n-body solver built from the ground up. To this end, Christoph Peters has been a big help by generating derivatives of Newton's gravity equation up to arbitrarily high orders.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published