-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
5,824 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
repos: | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files"] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.6.0 | ||
hooks: | ||
- id: black | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"rust-analyzer.inlayHints.typeHints.enable": true, | ||
"rust-analyzer.inlayHints.parameterHints.enable": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[package] | ||
name = "py-comfe" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
[lib] | ||
name = "comfe" | ||
crate-type = ["cdylib"] | ||
|
||
[dependencies] | ||
numpy = {version = "0.19.0", features=["nalgebra"]} | ||
nalgebra = "0.32.2" | ||
pyo3 = "0.19.0" | ||
strum = "0.25" | ||
strum_macros = "0.25" | ||
simba = "0.8.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
![Test](https://github.com/srosenbu/comFE/actions/workflows/main.yml/badge.svg) | ||
# comFE | ||
A library for _**co**nstitutive **m**odels in **FE**niCSx_ written in Rust and Python. | ||
|
||
## Goals | ||
|
||
* My side project which should have a similar functionality as https://github.com/BAMresearch/fenics-constitutive. (BUT IN RUST) | ||
* Currently this repo just reserves the name on github (naming stuff is hard) | ||
|
||
## Rstrictions | ||
|
||
* This is my personal Rust-Learning project, therefore don't expect anything groundbreaking. | ||
|
||
## Installing | ||
|
||
1. Clone the repository. | ||
2. Install `mamba` | ||
3. `mamba env create -f environment.yml` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: comfe | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python>=3.10 | ||
- rust | ||
- maturin | ||
- pytest | ||
- conda-ecosystem-user-package-isolation | ||
- fenics-dolfinx=0.6.0 | ||
- numpy | ||
- scipy | ||
- pydantic | ||
- pip | ||
- pip: | ||
- -e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: comfe | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python>=3.10 | ||
- rust | ||
- maturin | ||
- pytest | ||
- conda-ecosystem-user-package-isolation | ||
- fenics-dolfinx | ||
- numpy | ||
- scipy | ||
- pydantic | ||
- ruff | ||
- isort | ||
- black | ||
- pre-commit | ||
- pip | ||
- pip: | ||
- -e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[build-system] | ||
requires = ["maturin>=0.15,<0.16"] | ||
build-backend = "maturin" | ||
|
||
[project] | ||
name = "comfe" | ||
requires-python = ">=3.7" | ||
classifiers = [ | ||
"Programming Language :: Rust", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
|
||
|
||
[tool.maturin] | ||
features = ["pyo3/extension-module"] | ||
python-source = "python" | ||
|
||
[tool.black] | ||
line-length = 119 | ||
|
||
[tool.isort] | ||
profile = "black" | ||
multi_line_output = 3 | ||
include_trailing_comma = true | ||
force_grid_wrap = 0 | ||
use_parentheses = true | ||
ensure_newline_before_comments = true | ||
line_length = 119 | ||
|
||
[tool.ruff] | ||
line-length = 119 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from comfe import cdm, helpers, laws | ||
|
||
from .comfe import jaumann_rotation, jaumann_rotation_expensive |
Oops, something went wrong.