SCTL: Scientific Computing Template Library

Build and test status Code coverage Stable version Latest release

SCTL is a header-only C++ library providing various functionalities for scientific computing. This documentation outlines these functionalities and provides a guide to getting started.

Requirements

The only requirement to use SCTL is a working C++11 compliant compiler with OpenMP 4.0 support. It has been tested with GCC-9 and newer.

Getting Started

Note

SCTL requires a C++11 compliant compiler with OpenMP 4.0 support.

To get started, download the latest version of SCTL from the SCTL GitHub.

git clone https://github.com/dmalhotra/SCTL.git

Since SCTL is a header-only library, it does not require compilation or installation. Simply include the sctl.hpp header file in your C++ project and start using the provided classes and functions.

#include <sctl.hpp>

Ensure the compiler can locate the header file by providing the path to SCTL_ROOT/include using the flag -I ${SCTL_ROOT}/include.

Optional Dependencies

The following libraries can be optionally used when available. If not available, SCTL uses its own implementation which may be slower.

  • BLAS: Enable by defining SCTL_HAVE_BLAS.

  • LAPACK: Enable by defining SCTL_HAVE_LAPACK.

  • libmvec: Enable by defining SCTL_HAVE_LIBMVEC.

  • Intel SVML: Enable by defining SCTL_HAVE_SVML.

  • MPI: Enable by defining SCTL_HAVE_MPI (see Comm).

  • FFTW: Enable double precision by defining SCTL_HAVE_FFTW, single precision by defining SCTL_HAVE_FFTWF, or long double precision by defining SCTL_HAVE_FFTWL (see FFT).

  • PVFMM: Enable by defining SCTL_HAVE_PVFMM (requires MPI, see ParticleFMM).

To enable support for any of these libraries, define the corresponding flag during compilation. For example, to enable MPI support, use -DSCTL_HAVE_MPI.

Optional Compiler Flags

The following compiler flags can be used to enable or disable specific features in SCTL:

Features and Capabilities

The following list outlines the primary features and capabilities provided by the library, along with references to detailed tutorials and documentation for each component:

  • Basic Data Structures: Fundamental classes for storing and manipulating data.

    • Vector: Dynamically allocated linear array.

    • Matrix, Permutation: Dynamically allocated 2D array for matrix operations.

    • Tensor: Statically allocated multi-dimensional array.

  • Spectral Methods: Methods for spectral representations and transformations.

    • FFT: Wrapper for FFTW to perform fast Fourier transforms.

    • SphericalHarmonics: Computing spherical harmonics.

  • Boundary Integral Methods: Techniques for solving partial differential equations using boundary integral representations.

    • BoundaryIntegralOp: Generic class for instantiating layer-potential operators.

    • Kernel functions: Contains a variety of kernel functions for integral equations.

    • ParticleFMM: Integration with PVFMM for particle N-body calculations.

  • High Performance Computing (HPC): Tools for parallel and distributed computing.

    • Comm: Wrapper for MPI to facilitate parallel computing.

    • Vec: SIMD vectorization class for optimized computations.

    • OpenMP utilities: Parallel algorithms such as merge-sort and scan using OpenMP.

    • Profile: Tools for profiling and performance analysis.

  • Legacy (Unmaintained): Older functionalities that are no longer actively maintained.

    • Boundary quadrature: Boundary integrals on quad-patches using hedgehog quadrature.

    • ChebBasis: Tensor product Chebyshev basis for general-dimension computations.

Acknowledgments

This project originated at the University of Texas at Austin, received support from New York university between 2017 and 2020, and is now supported by the Flatiron Institute.