Fast dense evaluation of Green's function kernels in Rust

Overview

Fast evaluation of Greens functions in Rust

This library allows the fast evaluation of Greens functions and potential sums for Laplace, Helmholtz, and modified Helmholtz problems. The library can evaluate sums of the form

f(x_i) = sum_j g(x_i, y_j) * c_j

and the corresponding gradients with respect to the x_i for g(x_i, y_j) defined as one of:

  • Laplace Greens function: g(x, y) = 1 / (4 * pi * | x - y | )
  • Helmholtz Greens function: g(x, y) = exp ( 1j * k * | x - y |) / (4 * pi * | x - y | )
  • Modified Helmholtz Greens function: g(x, y) = exp( -omega * | x - y | ) / (4 * pi * | x - y | )

The implementation is optimised for the compiler to auto-vectorize with SIMD instruction sets. Furthermore, all routines can make use of multithreading.

The library is implemented in Rust and provides a Rust API, C API, and Python bindings.

Installation

To make sure that the library is compiled using modern processor features build it as follows.

export RUSTFLAGS="-C target-feature=+avx2,+fma" 
cargo build --release

After compiling as described above, the Python interface can be built with maturin, which is available from Pypi and conda-forge.

To build the Python bindings make sure that the desired Python virtual environment is activated and that the above RUSTFLAGS definition is set. Then build the Python module with

maturin develop --release -b cffi

This creates a new Python module called rusty_green_kernel and installs it.

Documentation

The documentation of the Rust library and the C API is available at docs.rs. The documentation for the Python module is contained in the Python help for the module rusty_green_kernel.

You might also like...
Basic Rust kernel using Limine

Rust Limine Barebones This is a small kernel that boots using Limine. Build First of all, download Rust ! (I guess you already did it if you are here

A new operating system kernel with Linux binary compatibility written in Rust.
A new operating system kernel with Linux binary compatibility written in Rust.

Kerla Kerla is a monolithic operating system kernel from scratch in Rust which aims to be compatible with the Linux ABI, that is, runs Linux binaries

Minimal x86_64 OS kernel written in Rust
Minimal x86_64 OS kernel written in Rust

rkernel A minimal x86_64 Rust OS kernel. Multiboot2 VGA driver PIC PIT PS/2 Keyboard driver PS/2 Mouse driver TSC RTC Allocator ATA PIO (In progress..

Operating system written in Rust for NumWorks calculator (model n0110)

RustWorks An OS (eventually) for the Numworks calculator (model n0110). Setup First install Rust by following these instuctions then: rustup target ad

SteinsOS is an operating system written in Rust

SteinsOS is an operating system featuring non-preemptive kernel targeting on single-core armv8 architecture.

Learn to write an embedded OS in Rust
Learn to write an embedded OS in Rust

Operating System development tutorials in Rust on the Raspberry Pi

Revons Os is a new OS written from scratch in Rust to experiment with novel OS structure
Revons Os is a new OS written from scratch in Rust to experiment with novel OS structure

Revons Os is a new OS written from scratch in Rust to experiment with novel OS structure, better state management, and how to leverage intralingual design principles to shift OS responsibilities like resource management into the compiler.

Examples on how to write Windows kernel drivers in Rust

windows-kernel-rs Note: this is still work in progress! This is a Windows kernel framework in Rust that consists of windows-kernel-sys, a crate that p

Rust for Linux

The goal of this project is to add support for the Rust language to the Linux kernel. This repository contains the work that will be eventually submitted for review to the LKML.

Releases(v0.1.0)
Owner
null
Hobby OS written in rust ( 🚀 blazingly fast 🚀 ).

pess-OS hobby OS written in rust ( ?? blazingly fast ?? ). Building from Source Prequsities QEMU Rust (nightly), preferably through rustup Step-by-Ste

blu 1 Dec 24, 2022
A comparison of operating systems written in Rust

Rust OS comparison A comparison of operating systems written in Rust. There are several open source operating systems written in Rust. Most of them ar

Markus Kohlhase 492 Jan 8, 2023
An OS kernel written in rust. Non POSIX

"Tifflin" Experimental Kernel (and eventually Operating System) This is an experiment in writing an OS Kernel in rust (http://rust-lang.org). Mostly t

John Hodge (Mutabah) 618 Jan 8, 2023
A hobby operating system, in Rust

intermezzOS: kernel intermezzOS is a hobby operating system. This repository is for its kernel. See the website for more. License This project is dual

intermezzOS 1.3k Jan 1, 2023
A Rust version of the Weenix OS

Reenix This is the start of a unix like operating system written in Rust. It is based on the Weenix Operating system written for Brown's CS167/9. At t

Alex Light 311 Dec 22, 2022
A tiny 32 bit kernel written in Rust

rustboot A tiny 32 bit kernel written in Rust. I was inspired to download Rust and try to do this after seeing zero.rs - a stub that lets Rust program

Charlie Somerville 1.5k Dec 30, 2022
A language-based OS to run Rust on bare metal

RustOS A simple, language-based OS. Current features: Simple VGA for seeing output Some Rust libraries (core, alloc, collections) already in Working (

null 402 Dec 8, 2022
A language-based OS to run Rust on bare metal

RustOS A simple, language-based OS. Current features: Simple VGA for seeing output Some Rust libraries (core, alloc, collections) already in Working (

null 79 Dec 3, 2022
Experimental kernel for embedded devices written in Rust

bkernel is an experimental kernel for embedded devices written in Rust. I'm mostly trying out Rust now to see how it applies to kernel development. Pr

Alexey Shmalko 84 Dec 13, 2022
Open Source Rust kernel; Runs WASM and WASI as lightweight containers.

?? etheryal Kernel etheryal kernel is an Open Source capability-based Kernel written in the Rust programming language. The kernel allows implementing

null 32 Dec 4, 2022