Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is based on one that was autogenerated by maturin v1.7.1 using:
# maturin generate-ci github
name: 📦
name: ndelement 📦

on:
push:
Expand All @@ -13,7 +13,7 @@ permissions:

jobs:
linux:
name: Build linux wheel
name: Build linux wheel for ndelement
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -44,16 +44,18 @@ jobs:
${{ matrix.platform.python }} -m pip install cffi

- name: Build wheel
run: ${{ matrix.platform.python }} -m maturin build --release --out dist -i ${{ matrix.platform.python }} --target ${{ matrix.platform.target }}
run: |
cd ndelement
${{ matrix.platform.python }} -m maturin build --release --out dist -i ${{ matrix.platform.python }} --target ${{ matrix.platform.target }}

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.wheel }}
path: dist
path: ndelement/dist

macos:
name: Build MacOS wheel
name: Build MacOS wheel for ndelement
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
Expand All @@ -72,11 +74,12 @@ jobs:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
working-directory: ndelement
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist
path: ndelement/dist

sdist:
name: Make sdist
Expand All @@ -89,16 +92,17 @@ jobs:
rust-toolchain: nightly
command: sdist
args: --out dist
working-directory: ndelement
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist
path: ndelement/dist

release:
permissions:
id-token: write
name: Push to PyPI
name: Push ndelement to PyPI
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [linux, macos, sdist]
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/style-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ jobs:
with:
python-version: "3.14"
- run: |
python3 -m pip install ruff
python3 -m ruff check ndelement/python
python3 -m ruff format --check ndelement/python
python3 -m pip install ruff mypy
name: Install Ruff and mypy
- run: |
cd ndelement
python3 -m ruff check python
python3 -m ruff format --check python
name: Run ruff checks
- run: |
python3 -m pip install mypy
python3 -m mypy ndelement/python
cd ndelement
python3 -m mypy python
name: Run mypy checks
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ method.

## The crates

### ndelement
### [ndelement](ndelement/)
[![DefElement verification](https://defelement.org/badges/ndelement.svg)](https://defelement.org/verification/ndelement.html)
[![crates.io](https://img.shields.io/crates/v/ndelement?color=blue)](https://crates.io/crates/ndelement)
[![docs.rs](https://img.shields.io/docsrs/ndelement?label=docs.rs)](https://docs.rs/ndelement/latest/ndelement/)
Expand Down Expand Up @@ -34,7 +34,7 @@ The Python functionality of the library can be tested by running:
python -m pytest ndelement/python/test
```

### ndgrid
### [ndgrid](ndgrid/)
[![crates.io](https://img.shields.io/crates/v/ndgrid?color=blue)](https://crates.io/crates/ndgrid)

ndgrid is an open-source library written in Rust for handling finite element grids/meshes.
Expand Down
2 changes: 1 addition & 1 deletion ndelement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description = "Finite element definition library."
license = "BSD-3-Clause"
homepage = "https://github.com/bempp/nd"
repository = "https://github.com/bempp/nd"
readme = "../README.md"
readme = "README.md"
keywords = ["numerics"]
categories = ["mathematics", "science"]

Expand Down
29 changes: 29 additions & 0 deletions ndelement/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2022-, Timo Betcke, Matthew Scroggs
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 changes: 50 additions & 0 deletions ndelement/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# ndelement

[![DefElement verification](https://defelement.org/badges/ndelement.svg)](https://defelement.org/verification/ndelement.html)
[![crates.io](https://img.shields.io/crates/v/ndelement?color=blue)](https://crates.io/crates/ndelement)
[![docs.rs](https://img.shields.io/docsrs/ndelement?label=docs.rs)](https://docs.rs/ndelement/latest/ndelement/)
[![PyPI](https://img.shields.io/pypi/v/ndelement?color=blue&label=PyPI&logo=pypi&logoColor=white)](https://pypi.org/project/ndelement/)

ndelement is an open-source library written in Rust that can be used to create finite elements on 1D, 2D, or 3D reference cells.

## Using ndelement
### Rust
You can use the latest release of ndelement by adding the following to `[dependencies]` section of your Cargo.toml file:

```toml
ndelement = "0.3.0"
```

### Python
You can install the latest release of ndelement by running:

```bash
pip3 install ndelement
```

The Python functionality of the library can be tested by running:
```bash
python -m pytest ndelement/python/test
```

## Documentation
The latest documentation of nelement is available at
[bempp.github.io/nd/rust/ndelement](https://bempp.github.io/nd/rust/ndelement/) (Rust)
and [bempp.github.io/nd/python/ndelement](https://bempp.github.io/nd/python/ndelement/) (Python).

## Testing
The Rust functionality of the library can be tested by running:
```bash
cargo test
```

## Examples
Examples of use can be found in the [examples](examples/) folder.

## Getting help
Errors in should be added to the [nd GitHub issue tracker](https://github.com/bempp/nd/issues).

Questions about use can be asked on the [Bempp Discourse](https://bempp.discourse.group).

## Licence
ndelement is licensed under a BSD 3-Clause licence.
4 changes: 2 additions & 2 deletions ndelement/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ build-backend = "maturin"
name = "ndelement"
version = "0.3.0-dev"
description = "Finite element definition library."
readme = "../README.md"
readme = "README.md"
requires-python = ">=3.9"
license = { file = "../LICENSE" }
license = { file = "LICENSE" }
authors = [{ name = "Matthew Scroggs", email = "[email protected]" }]
classifiers = [
"Programming Language :: Rust",
Expand Down
2 changes: 1 addition & 1 deletion ndgrid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ description = "Finite element grid library."
license = "BSD-3-Clause"
homepage = "https://github.com/bempp/nd"
repository = "https://github.com/bempp/nd"
readme = "../README.md"
readme = "README.md"
keywords = ["numerics"]
categories = ["mathematics", "science"]

Expand Down
29 changes: 29 additions & 0 deletions ndgrid/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2022-, Timo Betcke, Matthew Scroggs
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 changes: 31 additions & 0 deletions ndgrid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# ndgrid
[![crates.io](https://img.shields.io/crates/v/ndgrid?color=blue)](https://crates.io/crates/ndgrid)

ndgrid is an open-source library written in Rust for handling finite element grids/meshes.

## Using ndgrid
You can use the latest release of ndgrid by adding the following to `[dependencies]` section of your Cargo.toml file:

```toml
ndgrid = "0.1.5"
```

## Documentation
The latest documentation of ngrid is available at [bempp.github.io/nd/rust/ndgrid](https://bempp.github.io/nd/rust/ndgrid/).

## Testing
The Rust functionality of the library can be tested by running:
```bash
cargo test
```

## Examples
Examples of use can be found in the [examples](examples/) folder.

## Getting help
Errors in should be added to the [nd GitHub issue tracker](https://github.com/bempp/nd/issues).

Questions about use can be asked on the [Bempp Discourse](https://bempp.discourse.group).

## Licence
ndgrid is licensed under a BSD 3-Clause licence.