Voltar ao ranking

cpmech/gosl

Go

Linear algebra, eigenvalues, FFT, Bessel, elliptic, orthogonal polys, geometry, NURBS, numerical quadrature, 3D transfinite interpolation, random numbers, Mersenne twister, probability distributions, optimisation, differential equations.

scientific-computinglinear-algebradifferential-equationssparse-systemsparallel-computationscomputational-geometryfast-fourier-transformeigenvalueseigenvectorsoptimizationlinear-programmingmersenne-twister
Crescimento de estrelas
Estrelas
1.9k
Forks
148
Crescimento semanal
Issues
0
5001k1.5k
mai. de 2015jan. de 2019out. de 2022jul. de 2026
ArtefatosGo Modulesgo get github.com/cpmech/gosl
README

Gosl - Go scientific library

Go Reference Go Report Card Awesome

Gosl is a set of tools for developing scientific simulations using the Go language. We mainly consider the development of numerical methods and solvers for differential equations. We also present some functions for fast Fourier transforms, the generation of random numbers, probability distributions, and computational geometry.

This library contains essential functions for linear algebra computations (operations between all combinations of vectors and matrices, eigenvalues and eigenvectors, linear solvers) and the development of numerical methods (e.g., numerical quadrature).

We link Gosl with existing libraries written in C and Fortran, such as OpenBLAS, LAPACK, UMFPACK, MUMPS, QUADPACK, and FFTW3. These libraries have been fundamental for the development of high-performant simulations over many years. We believe that it is nearly impossible to rewrite these libraries in native Go and achieve the same speed delivered by them. For reference, a naive implementation of matrix-matrix multiplication in Go is more than 100 times slower than OpenBLAS.

Installation

Because of the other libraries, Docker is the easiest way to work with Gosl. Having Docker and VS Code installed, you can start developing powerful numerical simulations using Gosl in a matter of minutes. Furthermore, it works out of the box on Windows, Linux, and MacOS.

Containerized

  1. Install Docker
  2. Install Visual Studio Code
  3. Install the Remote Development extension for VS Code
  4. Clone https://github.com/cpmech/hello-gosl
  5. Create your application within a container (see gif below)

Done. And your system will "remain clean."

Debian/Ubuntu GNU Linux

First, install Go as explained in https://golang.org/doc/install

Second, install some libraries:

sudo apt-get install \
  gcc \
  gfortran \
  libfftw3-dev \
  liblapacke-dev \
  libmetis-dev \
  libmumps-seq-dev \
  libopenblas-dev \
  libsuitesparse-dev

Finally, download and compile Gosl:

git clone https://github.com/cpmech/gosl.git
cd gosl
./all.bash

Done. Installation completed.

Documentation

Gosl includes the following essential packages:

  • chk. To check numerical results and for unit testing
  • io. Input/output, including printing to the terminal and handling files
  • utl. To generate series (e.g., linspace) and other functions as in pylab/matlab/octave
  • la. Linear Algebra: vector, matrix, efficient sparse solvers, eigenvalues, decompositions

Gosl includes the following main packages:

  • fun. Special functions, DFT, FFT, Bessel, elliptical integrals, orthogonal polynomials, interpolators
  • gm. Geometry algorithms and structures
  • hb. Pseudo hierarchical binary (hb) data file format
  • num. Fundamental numerical methods such as root solvers, non-linear solvers, numerical derivatives, and quadrature
  • ode. Solvers for ordinary differential equations
  • opt. Numerical optimization: Interior Point, Conjugate Gradients, Powell, Grad Descent
  • pde. Solvers for partial differential equations (FDM, Spectral, FEM)
  • rnd. Random numbers and probability distributions

(see each subdirectory for more information)

We have removed the previous mpi sub-package for maintenance (see next section). However, if you plan to use MPI, we recommend the external library gompi.

Previous version

The previous version, including more packages, is available here and can be used with the Docker image 1.1.3 as in this hello gosl example.

These other packages, such as machine learning, plotting, etc., have been removed because they do not depend on CGO and may be developed independently. We can now more efficiently maintain the core of Gosl, which focuses on the foundation for other scientific codes.

Repositórios relacionados
K-Dense-AI/scientific-agent-skills

Turn any AI agent into an AI Scientist. The #1 Agent Skills library for science, used by 160,000+ scientists worldwide. 148 ready-to-use skills plus 100+ scientific databases covering biology, chemistry, medicine, and drug discovery. Compatible with Cursor, Claude Code, Codex, Pi, Antigravity, and the open Agent Skills standard.

PythonPyPIMIT Licenseai-scientistbioinformatics
k-dense.ai
31.4k3.1k
tracel-ai/burn

Burn is a next generation tensor library and Deep Learning Framework that doesn't compromise on flexibility, efficiency and portability.

Rustcrates.ioApache License 2.0autodiffdeep-learning
burn.dev
15.6k986
scipy/scipy

SciPy library main repository

PythonPyPIBSD 3-Clause "New" or "Revised" Licensepythonscipy
scipy.org
14.8k5.8k
goplus/xgo

XGo is a programming language that reads like plain English. But it's also incredibly powerful — it lets you leverage assets from C/C++, Go, Python, and JavaScript/TypeScript, creating a unified software engineering ecosystem. Our vision is to enable everyone to become a builder of the world.

GoGo ModulesApache License 2.0data-sciencegoplus
xgo.dev
9.4k565
goplus/gop

The Go+ programming language is designed for engineering, STEM education, and data science. Our vision is to enable everyone to become a builder of the digital world.

GoGo ModulesApache License 2.0data-sciencegoplus
goplus.org
9k548
gonum/gonum

Gonum is a set of numeric libraries for the Go programming language. It contains libraries for matrices, statistics, optimization, and more

GoGo ModulesBSD 3-Clause "New" or "Revised" Licensegogolang
gonum.org
8.4k580
stdlib-js/stdlib

✨ The fundamental numerical library for JavaScript and TypeScript. ✨

JavaScriptnpmApache License 2.0javascriptstdlib
stdlib.io
5.9k1.2k
mlpack/mlpack

mlpack: a fast, header-only C++ machine learning library

C++Othermachine-learning-libraryc-plus-plus
mlpack.org
5.7k1.7k
ProjectPhysX/FluidX3D

The fastest and most memory efficient lattice Boltzmann CFD software, running on all GPUs and CPUs via OpenCL. Free for non-commercial use.

C++Othercfdcomputational-fluid-dynamics
youtube.com/@ProjectPhysX
5.2k468
spack/spack

A flexible package manager that supports multiple versions, configurations, platforms, and compilers.

PythonPyPIApache License 2.0pythonspack
spack.io
5.1k2.4k
alandefreitas/matplotplusplus

Matplot++: A C++ Graphics Library for Data Visualization 📊🗾

C++MIT Licenseplot-categoriesdata-visualization
alandefreitas.github.io/matplotplusplus/
4.9k383
arrayfire/arrayfire

ArrayFire: a general purpose GPU library.

C++BSD 3-Clause "New" or "Revised" Licensearrayfirec-plus-plus
arrayfire.com
4.9k555