Crates.io | rusty-green-kernel |
lib.rs | rusty-green-kernel |
version | 0.2.0 |
source | src |
created_at | 2021-04-26 11:59:03.214746 |
updated_at | 2022-04-10 17:07:34.640755 |
description | A library for the evaluation of potential sums for the Laplace, Helmholtz and modified Helmholtz kernel. |
homepage | https://github.com/rusty-fast-solvers/rusty-green-kernel |
repository | https://github.com/rusty-fast-solvers/rusty-green-kernel |
max_upload_size | |
id | 389663 |
size | 167,813 |
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:
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.
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.
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
.