Crates.io | libceed |
lib.rs | libceed |
version | 0.12.0 |
source | src |
created_at | 2021-05-28 15:56:43.91841 |
updated_at | 2023-11-01 06:15:48.318723 |
description | High-level interface for libCEED - the efficient high-order discretization library developed by the ECP co-design center CEED. |
homepage | |
repository | https://github.com/CEED/libCEED |
max_upload_size | |
id | 403198 |
size | 242,825 |
This crate provides an interface to libCEED, which is a performance-portable library for extensible element-based discretization for partial differential equations and related computational problems. The formulation is algebraic and intended to be lightweight and easy to incorporate in higher level abstractions. See the libCEED user manual for details on interface concepts and extensive examples.
To call libCEED from a Rust package, the following Cargo.toml
can be used.
[dependencies]
libceed = "0.12.0"
For a development version of the libCEED Rust bindings, use the following Cargo.toml
.
[dependencies]
libceed = { git = "https://github.com/CEED/libCEED", branch = "main" }
extern crate libceed;
fn main() -> libceed::Result<()> {
let ceed = libceed::Ceed::init("/cpu/self/ref");
let xc = ceed.vector_from_slice(&[0., 0.5, 1.0])?;
let xs = xc.view()?;
assert_eq!(xs[..], [0., 0.5, 1.0]);
Ok(())
}
This crate provides modules for each object, but they are usually created from the Ceed
object as with the vector above.
The resource string passed to Ceed::init
is used to identify the "backend", which includes algorithmic strategies and hardware such as NVIDIA and AMD GPUs.
See the libCEED documentation for more information on available backends.
Examples of libCEED can be found in the libCEED repository under the examples/rust
directory.
This crate uses katexit
to render equations in the documentation.
To build the documentation locally with katexit
enabled, use
cargo doc --features=katexit
The libceed
crate is developed within the libCEED repository.
See the contributing guidelines for details.