Skip to content

A c++ library with the purpose to calculate the decomposition of the Yukawa interactions invariants on SO(2N) groups in terms of the SU(N) subgroup.

License

Notifications You must be signed in to change notification settings

dedacosta/sospin

Repository files navigation

Dynamic JSON Badge C++ form DOI DOI

A C++ Library Project

Overview

The ${\color{rgb(0,40,100)}\textsf{SO}}\textsf{Ƨpin}$ (one reads it as a single word “sospin”) c++ library has the purpose to calculate the decomposition of the Yukawa interactions invariants on SO(2N) groups in terms of the SU(N) subgroup. The program also includes specific functions to address the SO(10).

For the original Git repository of the ${\color{rgb(0,40,100)}\textsf{SO}}\textsf{Ƨpin}$ library see version 1.0.0.

Compilation & Installation

The ${\color{rgb(0,40,100)}\textsf{SO}}\textsf{Ƨpin}$ library was converted into a CMake project. This as simplified the installation of the library and involves the followings commands

  1. cmake -S . -B build (prepare the build)
  2. cmake --build build (build the library and executables)
  3. cmake --install build (by defaut installs in the out directory)
  4. make -f build/doc/Makefile doxygen-doc (optional, generate ${\color{rgb(0,40,100)}\textsf{SO}}\textsf{Ƨpin}$ library documentation)

For convenience, it was created Makefile with the goals:

    make clean|buid|install|doxygen-doc|doc|format|info
  • clean -- it removes all generated build files and folders
  • build -- it builds the cmake project
  • install -- it installs the executables, includes and library files in the out folder (if no other prefix is set)
  • doxygen-doc or doc -- it generates the library documentation with doxygen
  • format -- it reformats the source and header files according to the configuration file '.clang-format'
  • info -- it shows the header and source files being take into account by cmake

Without any given command, make will build the workspace by default. This Makefile is only meant to simplify the set of the cmake commands shown above.

The code style follows the Google Style Guides (https://google.github.io/styleguide) and our extensions are encoded in '.clang-format'. The extended styling can be applied using git command:

     git clang-format

During the build process, the folder build is created with all necessary tools for compilation without polluting the workspace. The installation of the library and in the include files are deployed in the generated folder out. This can be changed by setting the variable CMAKE_INSTALL_PREFIX within the file CMakeLists.txt to the desired destination.

The CMake build was test on:

  • Linux 64-bits,
  • macOS Ventura,
  • Windows Visual Studio 17 2022,
  • Windows MinGW64

FORM Installation:

Symbolic Manipulation System FORM to final expression simplifications. The FORM version 4.3.1 has been successfully tested The FORM binary package file can be downloaded in http://www.nikhef.nl/~form/, after accepting the license agreement.

After accepting the license agreement, click in binaries link and then click in the executable for your system:

  • Linux 64-bits
  • Apple

The other possibility to be used in other operating systems is to clone the git FORM project at GitHub and follow their Installation file.

There are two binaries for UNIX and Apple computers, one for sequential(form) and other for multi-threaded (tform). You can choose anyone. IMPORTANT: If you choose the multi-threaded version please rename the binary executable name to "form".

In UNIX you have to turn the execution flag on form, chmod +x form

Uninstallation

To remove the installed library do: make uninstall If you have installed the library in the system you also need to run the command with root privileges.

Using the library and Compiling

Using the Library: There are several code examples in the examples folder which come with the ${\color{rgb(0,40,100)}\textsf{SO}}\textsf{Ƨpin}$ library.

Linking code with the library in Linux: g++ −O3 −I/library_installation_path/include −L/library_installation_path/lib
example.cpp −o example −lsospin

Note: if you didn't use the --prefix option, the compilation will be more easy, g++ -O3 example.cpp -o example -lsospin

and in the code use #include <sospin/son.h> and if using SO(10) specific functions: #include <sospin/tools/so10.h>

Compilation within a Podman container

A Dockerfile is included to test the compilation process in a debian 12.1 container. A support script at ./scripts/podman-box.sh was added to facilitate the container creation. The script has the following commands

  • clean -- it cleans the podman images and container
  • start/stop -- it starts / stops the container

Without parameters the script makes a bash shell connection to the container.

Using the specific functions or symbols within the constant part of Braket

pure imaginary: i_
delta function: d_(...,...)
levi-civita tensor: e_(...,...,...)
square root: sqrt(...)

Quick examples

#include <sospin/son.h>

using namespace sospin;
using namespace std;

int main(int argc, char ∗argv[ ]) {
    setDim(4) ;
    Braket left = bra(0, M(a), identity) ;
    left += bra(0, Mb(a) ∗ e_(l, m) / 2, b(m) ∗ b(l)) ;
    Braket right = ket(0, M(b), identity) ;
    right += ket(0,Mb(b) ∗ e_(i, j) / 2, bt(i) ∗ bt(j)) ;

    Braket res = left ∗ Bop() ∗ right ;
    res.evaluate(false) ;
    Field(M, 0, 0, ASYM_WITH_FLAVOR) ;
    Field(Mb, 0, 0, ASYM_WITH_FLAVOR) ;
    newId("a") ; newId("b") ;
    unsetFormIndexSum() ;
    CallForm(res, false, true, "j") ;
    res.setON() ;
    cout << "Result :" << endl << res << endl;
    res.setOFF() ;
    CleanGlobalDecl() ;
    exit(0) ;
}

References

Bugs and remarks

For reporting bugs, asking questions, giving remarks and suggestions, we welcome you to use the Issue Tracker.

About

A c++ library with the purpose to calculate the decomposition of the Yukawa interactions invariants on SO(2N) groups in terms of the SU(N) subgroup.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published