This folder contains applications in Matlab and Fortran, for a variety of scientific applications.
The following capabilities are provided here:
HDI: multidimensional numerical integration using a low-rank TT (Alexandrov et al. 2023);CI: Solving configurational integrals for crystalline solids (Truong et al. 2025);Linear-STSC: TT space-time spectral collocation method for convection-diffusion-reaction (CDR) equation (Adak et al. 2024); with variable coefficients (Adak et al. 2025);Non-linear-STSC: space-time spectral collocation method for the nonlinear convection diffusion equation (Adak et al. 2025);Maxwell-Mimetic: mimetic finite difference method for 3D wave propagation (Manzini et al. 2023);NTE: time-independent Boltzmann neutron transport equation (Truong et al. 2024);RK-1: explicit and implicit Runge-Kutta integrators (Chinomona et al. 2025, LA-UR-25-25351);SWE: high-order finite volume methods for shallow water equations with TT (Danis et al. 2025);TENO: TT TENO scheme for compressible flows (Danis et al. 2025);WENO: TT WENO scheme for compressible flows (Danis et al. 2025);OpInf: TT operator inference (Danis et al._2025);IGA: isogeometric framework for complex geometries (Tran et al._2025);Multimat: Multimaterial hydrodynamics (Truong et al., in prep.).
When cloning the git repo, make sure to pull it with all of its submodules:
git clone --recursive https://github.com/lanl/thor.gitAlternatively, you can pull the submodules after cloning, by running the following git command:
git submodule update --init --recursiveThe Jupyter Notebook is a server-client application, very popular in Python community, that allows editing and running interactive notebooks with notes interspersed with the code, via a web browser. Jupyter can be installed on a wide variety of platforms, and run not only with Python but also with other programming languages, including MATLAB.
All of the examples in the examples subdirectory are documented in Jupyter notebooks.
To have Jupyter on your local system with an interactive MATLAB code, please follows these steps:
- Have a working MATLAB with
matlabcommand in your path. - Use this link for the up-to-date instructions on how to install Jupyter Notebook on your system.
- Install Jupyter-MATLAB proxy.
If you do not wish or cannot install Jupyter, you can also open the examples stored in this repo with a browser, and copy the Matlab code to an *.m file to run them directly in Matlab.
FORTRAN, serial version
- Clone the repo and change to
fortrandirectory. - In the subdirectory
config, find a configuration that most closely matches your system. - Copy it to
fortranunder the namemake.inc. This is a system-dependent part of the Makefile. - Modify it to match your compiler and the location of BLAS/LAPACK libraries.
- Build the code using
make. Test usingmake test.
git clone git@github.com:lanl/thor.git
cd thor/TNI/fortran
cp config/gfortran.inc make.inc
# <edit make.inc>
make -j
make test # optionalYou can also follow the (# LANL HPC Installation Notes) for some of the existing LANL systems (current as of September 2025). The code in this folder is derived from the following third-party libraries and packages:
- TT-Toolbox : https://github.com/oseledets/TT-Toolbox
- tt-fort : https://github.com/oseledets/tt-fort
- ttcross : https://github.com/savostyanov/ttcross
salloc -p general
cd fortran
. load_env.sh intel
make -j
make test # optionalsalloc --qos=debug --reservation=debug --partition=debug
cd fortran
. load_env.sh chicoma
make -j
make test # optional