Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
235 commits
Select commit Hold shift + click to select a range
581672c
add cmake and build structure
skim0119 May 25, 2024
d2985be
Merge pull request #389 from skim0119/elasticapp-integration
armantekinalp May 25, 2024
3a1f106
update: gitignore file to include c++ code
skim0119 May 25, 2024
558cabc
included cmakelists
skim0119 May 28, 2024
7a1fe25
Switch to scikit_build_core, remove setup.py
ankith26 May 30, 2024
060f94f
Add basic pybind11 example with meson buildsystem
ankith26 May 30, 2024
a587b65
Start integrating dependencies
ankith26 Jun 9, 2024
8c36584
elasticapp _batch_matmul ports with benchmarking
ankith26 Jun 13, 2024
3e05a9e
add math utility libraries
skim0119 Jun 14, 2024
b3221cd
add blaze traits
skim0119 Jun 14, 2024
ecedea5
Wrap and test everything in BlazeLinearAlgebra.hpp
ankith26 Jun 23, 2024
d612817
python-binding template for vector/matrix/tensor
skim0119 Jun 24, 2024
fb7f32d
include SO3 backend implementation
skim0119 Jun 26, 2024
f66d050
Fix Utilities/Math/Python issues and make it build
ankith26 Jul 5, 2024
3737d5c
Add elasticapp documentation
ankith26 Jul 7, 2024
4e7a04b
port linalg to use Utils/Math/Python objects
ankith26 Jul 7, 2024
f9d4d00
Update README.md
skim0119 Jul 10, 2024
7d45e74
Add batchcross benchmarking
ankith26 Jul 10, 2024
f1eaef8
Setup optimization blaze defines globally
ankith26 Jul 10, 2024
a61a445
revert: __str__ for blaze objects. Other print-related methods are ad…
skim0119 Jul 11, 2024
2e34cdd
feat: Add bound check during blaze setter
skim0119 Jul 11, 2024
99ff10f
Add default simulator frames definition
skim0119 Jul 11, 2024
d03eb97
binding: elastica tags
skim0119 Jul 11, 2024
23cf020
add elastica::tags and system-type structure
skim0119 Jul 11, 2024
9802213
files: CosseratRod system
skim0119 Jul 11, 2024
4bd8a3a
Add backend CI
ankith26 Jul 11, 2024
47952a7
file: Add MakeString
skim0119 Jul 12, 2024
bcb7ad8
Merge branch 'ankith26-gsoc' of https://github.com/ankith26/PyElastic…
skim0119 Jul 12, 2024
d005f62
remove pretty print for now
skim0119 Jul 12, 2024
5b28ec7
files: add Rod-related traits and include trees
skim0119 Jul 12, 2024
b42fab3
files: add system states
skim0119 Jul 12, 2024
ee2fa43
files: common features for system
skim0119 Jul 12, 2024
b393ab0
Update elasticapp.yml
skim0119 Jul 12, 2024
946459a
files: add Materials
skim0119 Jul 12, 2024
1252253
Update elasticapp.yml
skim0119 Jul 12, 2024
54a2afa
files: block concepts
skim0119 Jul 12, 2024
ed8124e
files: add system configuration
skim0119 Jul 12, 2024
7c43877
pybind: add PyTags
skim0119 Jul 12, 2024
ca9025f
remove ::elastica::Time temporarily to detach from Time madules
skim0119 Jul 12, 2024
575997c
files: add error handling
skim0119 Jul 12, 2024
e182636
files: module settings
skim0119 Jul 13, 2024
1bfb5d4
files: block headers
skim0119 Jul 13, 2024
63b1c27
Handle brigand in buildscript instead of wrap
ankith26 Jul 13, 2024
d92a09c
files: necessary utils
skim0119 Jul 13, 2024
96f67a3
Merge branch 'ankith26-gsoc' of https://github.com/ankith26/PyElastic…
skim0119 Jul 13, 2024
acf83d4
files: component helpers and names
skim0119 Jul 13, 2024
cf55e22
files: add missing math utility files
skim0119 Jul 13, 2024
818de4d
files: add missing utils
skim0119 Jul 13, 2024
8609208
Update BindCosseratRod.cpp
skim0119 Jul 13, 2024
8da7f85
add rod construction script
skim0119 Jul 13, 2024
5da6a9e
Implement inv_rotate in elasticapp._rotations
ankith26 Jul 14, 2024
25c6237
Port more inv_rotate tests
ankith26 Jul 14, 2024
37e5860
Implement rotate in elasticapp._rotations
ankith26 Jul 15, 2024
a984130
fix: remove pretty type
skim0119 Jul 20, 2024
177ac70
Merge branch 'ankith26-gsoc' of https://github.com/ankith26/PyElastic…
skim0119 Jul 20, 2024
17ac94e
Start work the CosseratRod bindings
ankith26 Jul 21, 2024
6c47988
Fix_PyCosseratRods module compilation
ankith26 Aug 4, 2024
579c700
Add a basic test for CosseratRod attributes
ankith26 Aug 4, 2024
151a260
add auto-import logic to elasticapp
ankith26 Aug 4, 2024
23ef432
remove twisted rod and old-damping model
skim0119 Aug 8, 2024
187c20e
add pretty type for pybind
skim0119 Aug 8, 2024
ee41753
add clang-format
skim0119 Aug 8, 2024
b3cc4f8
pretty type pybind getters and variable names
skim0119 Aug 8, 2024
a674997
fix formatting
skim0119 Aug 8, 2024
6a8f2a1
Fix _PyTags link issues
ankith26 Aug 10, 2024
70a073b
Remove failing test, that isn't neeeded anymore
ankith26 Aug 10, 2024
1409988
Add _CosseratRodBlock attributes testing
ankith26 Aug 11, 2024
dd2bac1
Remove all unneeded cmake code
ankith26 Aug 21, 2024
2dfc94e
Added some more doc comments
ankith26 Aug 25, 2024
85ddf84
Merge pull request #391 from ankith26/ankith26-gsoc
skim0119 Sep 22, 2024
f5c6e56
Merge remote-tracking branch 'origin/update-0.3.3' into elasticapp-in…
skim0119 Jul 25, 2025
b93a75d
remove unused wrap scripts for meson
skim0119 Jul 27, 2025
05e02d6
fix sleef version 3.8: blaze seems incompatible with 3.9
skim0119 Jul 27, 2025
49e4c30
update version
skim0119 Sep 26, 2025
5d27327
tests: add behavior test for simulator.close feature
skim0119 Sep 28, 2025
563ffb7
feat: fix ExportCallback example case
skim0119 Sep 28, 2025
01d0fc3
feat: add simulator.close() method for collective end-call for callbacks
skim0119 Sep 28, 2025
1b7bf1a
Merge pull request #503 from skim0119/feat/on-close
skim0119 Oct 10, 2025
931e9dc
fix: compute_additional_segment directions (#509)
zzzzzbk Oct 17, 2025
b520605
specify python version installed for github-action
skim0119 Oct 10, 2025
ced1993
Refactor simulation integration in examples and documentations to use…
skim0119 Sep 26, 2025
f0951f6
mypy: fix using same name for time
skim0119 Sep 28, 2025
5f3b3f9
move initial callback in base module
skim0119 Oct 17, 2025
fbbcc86
feat: allow data collections (list, tuple, dict) to be passed for cal…
skim0119 Oct 18, 2025
ba8d0cd
docs: add description on different way to collect diagnostics
skim0119 Oct 18, 2025
3b77e51
Update documentation for collect_diagnostics usage
skim0119 Oct 18, 2025
6621944
Merge pull request #511 from skim0119/feat/multiple-callback
skim0119 Oct 23, 2025
485c36f
docs: fix numpydoc formats
skim0119 Oct 18, 2025
9288beb
fix: forward referencing during documentation build
skim0119 Oct 25, 2025
a8a0937
fix: documentation no-end-of-line warning
skim0119 Oct 25, 2025
5af7c56
Merge branch 'update-v1' into mod/examples-timestepper
skim0119 Oct 25, 2025
3d4e21d
remove POVray example
skim0119 Oct 25, 2025
c0f5482
Merge branch 'mod/examples-timestepper' of https://github.com/skim011…
skim0119 Oct 25, 2025
754ad53
Merge branch 'docs/warning-fix' into mod/examples-timestepper
skim0119 Oct 26, 2025
7677fd0
mypy: remove self return for .using
skim0119 Oct 26, 2025
c38752b
example: timoshenko in gallery
skim0119 Oct 26, 2025
b892ca4
fix indentation
skim0119 Oct 26, 2025
31162a6
docs: add sphinx gallery setup and configuration
skim0119 Oct 26, 2025
cbb955a
remove binder
skim0119 Oct 26, 2025
9361670
formatting with documentation build
skim0119 Oct 26, 2025
566afa5
update example cases with run-flag for documentation gallery
skim0119 Oct 26, 2025
046df44
add ffmpeg in rtd
skim0119 Oct 26, 2025
cac0229
docs: clean up tutorial for gallery
skim0119 Oct 26, 2025
798b8dd
fix: re-write sphere-rod contact; add detailed docstrings
skim0119 Oct 28, 2025
c0b6e83
fix: bug for rod-sphere aabb contact detection
skim0119 Oct 28, 2025
3b53b11
feat: add function to find minimum distance between cylinder and sphere
skim0119 Oct 28, 2025
510d4f4
feat: add rod-sphere contact simulation example and improve documenta…
skim0119 Oct 28, 2025
8fa4c92
test: add rod-sphere contact tests for collision scenarios
skim0119 Oct 28, 2025
a653745
test: add unit tests for _find_min_dist_cylinder_sphere function with…
skim0119 Oct 28, 2025
7c048e1
remove dissipation for rigid body object
skim0119 Oct 28, 2025
58fa947
remove redundant warning and move the note to documentation
skim0119 Oct 28, 2025
689b841
remove outdated interaction plane
skim0119 Oct 28, 2025
bbdaba5
Merge pull request #502 from skim0119/mod/examples-timestepper
skim0119 Oct 29, 2025
cc2ec7e
Merge branch 'update-v1' into cleanup-contact
skim0119 Oct 29, 2025
efa4405
test: remove outdated test - anisotropic plane forcing moved to contact
skim0119 Oct 29, 2025
f66a525
Merge pull request #513 from skim0119/cleanup-contact
skim0119 Oct 29, 2025
a8441cf
docs: removed outdated forcing classes
skim0119 Oct 29, 2025
42c2203
Merge branch 'master' into update-v1
skim0119 Oct 29, 2025
ad279e1
update pre-commit outdated configuration
skim0119 Dec 11, 2025
cd74197
doc: fix typo and clarify constraining boundary conditions
skim0119 Dec 11, 2025
0c2c903
fix: rod -> system in rod-self contact cases
skim0119 Dec 12, 2025
6efe9e4
test: fix issues with keyword arguments for boundary conditions
skim0119 Dec 12, 2025
024194e
deprecate ea.defaultdict. Use std lib
skim0119 Dec 12, 2025
c61d083
move convergen_function into use case directories
skim0119 Dec 12, 2025
a7df9f6
remove outdated gitignores
skim0119 Dec 12, 2025
229ad30
examples: naming consistency - com --> center_of_mass
skim0119 Dec 12, 2025
c8fe3cc
fix: correct typos and improve naming consistency across various exam…
skim0119 Dec 12, 2025
16b59b8
refactor: update import paths for consistency and clarity across exam…
skim0119 Dec 12, 2025
0a38285
fix: correct rod position indexing in video plotting and update shear…
skim0119 Dec 12, 2025
9d81c49
fix: update time indexing in video plotting functions for consistency…
skim0119 Dec 12, 2025
8a489a4
fix: correct typos and improve clarity in README examples
skim0119 Dec 12, 2025
d254581
refactor: update type variable binding for system in ConstraintBase c…
skim0119 Dec 12, 2025
69a374d
fix: correct typos and improve clarity in documentation across multip…
skim0119 Dec 12, 2025
46406a3
mod: connection joint now derive from ConnectionBase instead of FreeJ…
skim0119 Dec 12, 2025
8e32bf2
refactor: update joint classes to inherit from ConnectionBase instead…
skim0119 Dec 12, 2025
d9cfa44
tests: improve error message clarity in connection tests
skim0119 Dec 12, 2025
dd25c4c
feat: organize code with static system type for plane
skim0119 Dec 12, 2025
3495d02
refactor: update system collection protocols and improve type handlin…
skim0119 Dec 15, 2025
7943a72
refactor: integrate energy computation and knot theory into RodBase, …
skim0119 Dec 15, 2025
8590c56
refactor: rename rigid body import and restructure rigid body classes…
skim0119 Dec 15, 2025
132d7b4
refactor: enhance protocol definitions for explicit and symplectic sy…
skim0119 Dec 15, 2025
16c25fd
refactor: update rigid body and surface documentation, rename imports…
skim0119 Dec 15, 2025
3f12b70
refactor: implement get_relative_rotation_two_systems function for co…
skim0119 Dec 15, 2025
33d4010
refactor: update imports in explicit steppers and base system modules…
skim0119 Dec 15, 2025
fce1369
refactor: clean up imports and update type annotations in constraints…
skim0119 Dec 15, 2025
06deb8f
update codecov CI version
skim0119 Dec 15, 2025
90b8d27
refactor: add REQUISITE_MODULES type annotation to Plane class
skim0119 Dec 15, 2025
a5d04b7
refactor: correct typos and improve documentation across multiple mod…
skim0119 Dec 15, 2025
c90a8fb
update documentation and configuration files for next release
skim0119 Dec 15, 2025
5496059
remove explicit steppers, memory management, and protocol definitions
skim0119 Dec 18, 2025
bc1ca8f
update default parameter handling for force classes to avoid mutable …
skim0119 Dec 18, 2025
4126edd
refactor: enhance error handling and type annotations in boundary_con…
skim0119 Dec 18, 2025
46a573c
docs: rotation and damping modules
skim0119 Dec 18, 2025
27d6cb7
reorganize memory block handling and enhance system protocol definitions
skim0119 Dec 18, 2025
b510629
refactor: rigid body implementation, name for block system impl.
skim0119 Dec 18, 2025
397590e
refactor: update memory block handling and system protocol integration
skim0119 Dec 18, 2025
0f48d15
docs: rename StaticSystemBase to StaticSystemProtocol and update rela…
skim0119 Dec 18, 2025
c54d1a4
Merge branch 'update-v1' into elasticapp-integration
skim0119 Dec 19, 2025
e330631
improve encapsulation and simplifies API for symplectic timestepping
skim0119 Dec 22, 2025
a5f1564
refactor: enhance data structures and documentation for rod components
skim0119 Dec 22, 2025
3086ae5
docs: Update PackageDesign.md for new SymplecticSystemProtocol
skim0119 Dec 22, 2025
fecb75e
remove outdated constructor
skim0119 Dec 22, 2025
5230cd8
simplifies code to include for release version
skim0119 Dec 22, 2025
2363bd9
tests: add some basic behavior for block memory structure
skim0119 Dec 22, 2025
b0535c5
update version
skim0119 Dec 22, 2025
1dcb1ad
add simplified block behavior headers
skim0119 Dec 22, 2025
bd05325
add binding
skim0119 Dec 22, 2025
db8d0d3
impl: block variable getter
skim0119 Dec 22, 2025
336d02b
add macros for installation and test
skim0119 Dec 22, 2025
aa6b442
feat: implement ghost node handling and reset functionality in BlockR…
skim0119 Dec 22, 2025
92b826b
Merge remote-tracking branch 'origin/refactor/symplectic' into elasti…
skim0119 Dec 22, 2025
4a330d2
Implement operation for cosserat_equations and necessary Eigen kernels
skim0119 Dec 23, 2025
d135865
SIMD and threading support options
skim0119 Dec 23, 2025
7df60c6
feat: enhance BlockRodSystem with reshaping
skim0119 Dec 23, 2025
5840da6
move out elasticapp cores
skim0119 Dec 24, 2025
40a574d
preserve: old damping
skim0119 Dec 24, 2025
abcd104
Merge remote-tracking branch 'origin/refactor/symplectic' into update-v1
skim0119 Dec 24, 2025
dca80c0
Merge remote-tracking branch 'origin/update-v1' into elasticapp-integ…
skim0119 Dec 24, 2025
69fd414
Remove outdated
skim0119 Dec 24, 2025
18f5399
feat: enhance BlockRodSystem and MemoryBlockCosseratRod functionality
skim0119 Dec 24, 2025
46b7105
refactor: optimize Cosserat rod computations and enhance threading su…
skim0119 Dec 24, 2025
d6223f3
feat: add Timoshenko beam simulation example
skim0119 Dec 24, 2025
b89405d
feat: add benchmarking scripts for memory block integrity and PDE per…
skim0119 Dec 24, 2025
f8ec94d
refactor: simplify matrix type definitions and improve indexing consi…
skim0119 Dec 24, 2025
1d0d6c5
feat: enhance Block class with ghost node handling and input validation
skim0119 Dec 24, 2025
b79b1f6
feat: extend BlockRodSystem API with strain computation and data view…
skim0119 Dec 24, 2025
4596223
refactor: update Makefile and CMakeLists.txt for improved build confi…
skim0119 Dec 24, 2025
0841441
docs: update README
skim0119 Dec 24, 2025
ee5506c
fix hinting
skim0119 Dec 24, 2025
70aada6
Merge branch 'update-v1' into elasticapp-integration
skim0119 Dec 24, 2025
aae60a1
remove action to publish
skim0119 Dec 26, 2025
7ad53de
Merge branch 'update-v1' into elasticapp-integration
skim0119 Dec 26, 2025
e1b3c4d
fix action for cpp build check
skim0119 Dec 26, 2025
2aa000b
fix test: disable opemmp for ghost reset
skim0119 Dec 26, 2025
4eb4c51
remove catch2 for installation
skim0119 Dec 26, 2025
feb86f4
add cache path for elasticapp installation
skim0119 Dec 26, 2025
107e1bc
include CTest in github action
skim0119 Dec 26, 2025
965ac21
add flag for removing GIL
skim0119 Dec 27, 2025
8f3e0dc
remove threading flag: openmp is now required
skim0119 Dec 27, 2025
04ddbcf
optimize: reduce dummy variable creation at each iteration
skim0119 Dec 27, 2025
0b4d8ae
fix: block ghost reset with provided method
skim0119 Dec 27, 2025
2ce0f56
simplify loop
skim0119 Dec 27, 2025
f2eea94
add few extra tools in pre-commit
skim0119 Dec 27, 2025
68e8f61
reduce variadic error message
skim0119 Dec 28, 2025
80d7c1b
remove old ignore lists
skim0119 Dec 29, 2025
9a20a74
add python-api of collision modules
skim0119 Dec 29, 2025
7dc6800
add cpp binding
skim0119 Dec 29, 2025
d0ddd5d
rebuild process include removing previous build
skim0119 Dec 29, 2025
2f232c6
add main collision system class
skim0119 Dec 29, 2025
fff92e6
add collision in build
skim0119 Dec 29, 2025
198e465
add commonly use node-to-element mapping routine
skim0119 Dec 29, 2025
bd1e978
use free-function math for elem-to-node conversion for radius
skim0119 Dec 29, 2025
6aa5438
fix: compilation issue
skim0119 Dec 29, 2025
897a34e
add crtp concepts
skim0119 Dec 29, 2025
5dcb641
unittest for collision module
skim0119 Dec 29, 2025
5332b60
add linear spring dashpot implementation
skim0119 Dec 29, 2025
34bbb0e
add no-interaction physics model for dummy or testing
skim0119 Dec 29, 2025
b182fa5
implement collision physics models: add NoInteraction and LinearSprin…
skim0119 Dec 29, 2025
4caa607
fix namespaces: compilation issues
skim0119 Dec 29, 2025
33ac388
add fine-detection routine
skim0119 Dec 29, 2025
a1f93f3
add coarse grid detection
skim0119 Dec 29, 2025
b1546c9
add batching methods
skim0119 Dec 29, 2025
9a0b27a
uncomment api for collision module
skim0119 Dec 29, 2025
71cdbd7
fix build: correct namespace from upstream redefinitions
skim0119 Dec 30, 2025
e21b5e4
update unittest for batch cache
skim0119 Dec 30, 2025
ba88719
update: remove layer of stepper protocol structure
skim0119 Jan 24, 2026
7ce5169
move out energy equation to rod_base
skim0119 Jan 24, 2026
ad02dfc
remove old warning
skim0119 Jan 28, 2026
6171705
Merge branch 'update-v1' into elasticapp-integration
skim0119 Feb 2, 2026
76ef4a1
Add typing-extensions to dependencies
hanson-hschang Feb 4, 2026
75c6adc
Merge pull request #521 from GazzolaLab/elasticapp-integration
skim0119 Feb 12, 2026
091f1f2
formatting: typo
skim0119 Feb 20, 2026
7eff0fa
pass dt during acceleration update for designing better stepper
skim0119 Feb 20, 2026
e2963f3
Merge branch 'update-v1' of https://github.com/GazzolaLab/PyElastica …
skim0119 Feb 20, 2026
e36d5c7
fix: cpp rod property with copy-reference
skim0119 Feb 20, 2026
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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ updates:
schedule:
interval: "daily"
open-pull-requests-limit: 99
target-branch: "update-v1"
target-branch: "master"
versioning-strategy: lockfile-only
61 changes: 61 additions & 0 deletions .github/workflows/elasticapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: elasticapp (Elastica++ based backend) tests

# trigger run only on changes to the backend folder.
on:
push:
paths:
- backend/**
pull_request:
paths:
- backend/**

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.11"] #, "3.12"]
os: [ubuntu-latest] # , macos-latest]
include:
- os: ubuntu-latest
path: ~/.cache/pip
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
uv-version: latest
- name: Compile OpenMP
env:
OMP_NUM_THREADS: 2
run: |
sudo apt-get update; sudo apt-get install -y libomp5 libomp-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up cache
uses: actions/cache@v5
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('uv.lock') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('uv.lock') }}
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}

- name: Install PyElastica and dependencies
run: |
make install-dev-deps PYTHON_VERSION=${{ matrix.python-version }}
uv cache prune --ci

- name: Run elasticapp tests
run: |
source .venv/bin/activate
cd backend
make clean-build
make test
# pytest backend/tests/py
18 changes: 5 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@ name: CI

# Controls when the action will run.
on: [push, pull_request]
# Older settings:
# Triggers the workflow on push request events for the master branch,
# and pull request events for all branches.
#on:
# push:
# branches: [ master ]
# pull_request:
# branches: [ '**' ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down Expand Up @@ -52,7 +44,7 @@ jobs:
run: python -c "import sys; print(sys.version)"
# Set up cache
- name: Set up cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('uv.lock') }}
Expand All @@ -62,7 +54,7 @@ jobs:
# Install dependencies
- name: Install dependencies
run: |
make install-dev-deps
make install-dev-deps PYTHON_VERSION=${{ matrix.python-version }}
uv cache prune --ci
source .venv/bin/activate
# Runs a single command using the runners shell
Expand Down Expand Up @@ -102,7 +94,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Set up cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('uv.lock') }}
Expand All @@ -111,14 +103,14 @@ jobs:
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies
run: |
make install-dev-deps
make install-dev-deps PYTHON_VERSION=${{ matrix.python-version }}
uv cache prune --ci
source .venv/bin/activate
- name: Test PyElastica using pytest
if: startsWith(runner.os, 'macOS')
run: |
make test_coverage_xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
27 changes: 0 additions & 27 deletions .github/workflows/publish-to-pypi.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ __pycache__/
*.so

*.swp
.vscode
docs/_gallery
docs/gen_modules
docs/sg_execution_times.rst

# Distribution / packaging
.Python
Expand Down Expand Up @@ -215,6 +219,7 @@ sample_prog.py

# txt files
*.txt
!CMakelists.txt

# movie or video file formats
*.mp4
Expand All @@ -237,3 +242,6 @@ outcmaes/*

# csv files
*.csv

# ./backend dependencies
deps
7 changes: 5 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
default_language_version:
python: python3

default_stages: [commit, push]
default_stages: [pre-commit, pre-push]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: check-json
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
exclude: LICENSE
- id: check-added-large-files
- id: mixed-line-ending

- repo: local
hooks:
Expand Down
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-24.04
apt_packages:
- ffmpeg
tools: { python: "3.10" }
jobs:
create_environment:
Expand All @@ -14,6 +16,7 @@ build:
install:
- "true"


# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Please don't hesitate improving [documentation](https://github.com/GazzolaLab/Py

We also have many related projects in separate repositories that utilize the PyElastica as a core library.
Since the package is often used for research purpose, many on-going projects are typically not published.
If you are interested in hearing more, please contact one of our the maintainer.
If you are interested in hearing more, please contact the maintainer.

### Pull requests

Expand Down
27 changes: 20 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@
PYTHON := python3
PYTHONPATH := `pwd`
AUTOFLAKE_ARGS := -r
PYTHON_VERSION :=

#* Installation
.PHONY: install
install:
ifdef PYTHON_VERSION
uv sync --python $(PYTHON_VERSION)
else
uv sync
endif

.PHONY: install-dev-deps
install-dev-deps:
ifdef PYTHON_VERSION
uv sync --all-groups --all-extras --python $(PYTHON_VERSION)
else
uv sync --all-groups --all-extras
endif


.PHONY: build
Expand All @@ -25,7 +34,7 @@ pre-commit-install:
.PHONY: black
black:
uv run black --version
uv run black --config pyproject.toml elastica tests examples
uv run black --config pyproject.toml elastica tests examples backend

.PHONY: black-check
black-check:
Expand All @@ -35,7 +44,7 @@ black-check:
.PHONY: flake8
flake8:
uv run flake8 --version
uv run flake8 elastica tests
uv run flake8 elastica

.PHONY: autoflake-check
autoflake-check:
Expand All @@ -45,7 +54,7 @@ autoflake-check:
.PHONY: autoflake-format
autoflake-format:
uv run autoflake --version
uv run autoflake --in-place $(AUTOFLAKE_ARGS) elastica tests examples
uv run autoflake --in-place $(AUTOFLAKE_ARGS) elastica tests examples backend

.PHONY: format-codestyle
format-codestyle: black autoflake-format
Expand All @@ -62,15 +71,15 @@ mypy:

.PHONY: test
test:
uv run pytest -c pyproject.toml
uv run pytest -c pyproject.toml tests

.PHONY: test_coverage
test_coverage:
NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica -c pyproject.toml
NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica -c pyproject.toml tests

.PHONY: test_coverage_xml
test_coverage_xml:
NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica --cov-report=xml -c pyproject.toml
NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica --cov-report=xml -c pyproject.toml tests

.PHONY: check-codestyle
check-codestyle: black-check flake8 autoflake-check
Expand Down Expand Up @@ -103,8 +112,12 @@ pytestcache-remove:
build-remove:
rm -rf build/ dist/

.PHONY: doc-remove
doc-remove:
rm -rf docs/_build docs/gen_modules/ docs/sg_execution_times.rst docs/_gallery/

.PHONY: cleanup
cleanup: pycache-remove dsstore-remove ipynbcheckpoints-remove pytestcache-remove mypycache-remove build-remove
cleanup: pycache-remove dsstore-remove ipynbcheckpoints-remove pytestcache-remove mypycache-remove build-remove doc-remove

all: format-codestyle cleanup test

Expand Down
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div align='center'>
<h1> PyElastica </h1>

[![CI][badge-CI]][link-CI] [![Documentation Status][badge-docs-status]][link-docs-status] [![codecov][badge-codecov]][link-codecov] [![Downloads][badge-pepy-download-count]][link-pepy-download-count] [![DOI][badge-doi]][link-doi] [![Binder][badge-binder]][link-binder] [![Gitter][badge-gitter]][link-gitter]
[![CI][badge-CI]][link-CI] [![Documentation Status][badge-docs-status]][link-docs-status] [![codecov][badge-codecov]][link-codecov] [![Downloads][badge-pepy-download-count]][link-pepy-download-count] [![DOI][badge-doi]][link-doi] [![Gitter][badge-gitter]][link-gitter]
</div>

PyElastica is the python implementation of **Elastica**: an *open-source* project for simulating assemblies of slender, one-dimensional structures using Cosserat Rod theory.

[![gallery][link-readme-gallary]][link-project-website]
[![gallery][link-readme-gallery]][link-project-website]

Visit [www.cosseratrods.org][link-project-website] for more information and learn about Elastica and Cosserat rod theory.

Expand Down Expand Up @@ -84,13 +84,6 @@ We ask that any publications which use Elastica cite as following:
- [Controlling a CyberOctopus soft arm with muscle-like actuation](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9683318) (UIUC, 2020) (IEEE CDC 2021)
- [Energy shaping control of a CyberOctopus soft arm](https://ieeexplore.ieee.org/document/9304408) (UIUC, 2020) (IEEE CDC 2020)

## Tutorials
[![Binder][badge-binder-tutorial]][link-binder]

We have created several Jupyter notebooks and Python scripts to help users get started with PyElastica. The Jupyter notebooks are available on Binder, allowing you to try out some of the tutorials without having to install PyElastica.

We have also included an example script for visualizing PyElastica simulations using POVray. This script is located in the examples folder ([`examples/Visualization`](examples/Visualization)).

## Contribution

If you would like to participate, please read our [contribution guideline](CONTRIBUTING.md). Private development branches are moved to [elastica-python](https://github.com/GazzolaLab/elastica-python) repository; access is limited to the core developers, collaborators, and maintainers.
Expand All @@ -113,7 +106,7 @@ _Names arranged alphabetically_

[//]: # (Collection of URLs.)

[link-readme-gallary]: https://github.com/skim0119/PyElastica/blob/assets_logo/assets/alpha_gallery.gif
[link-readme-gallery]: https://github.com/skim0119/PyElastica/blob/assets_logo/assets/alpha_gallery.gif

[link-project-website]: https://cosseratrods.org
[link-lab-website]: http://mattia-lab.com/
Expand All @@ -122,7 +115,6 @@ _Names arranged alphabetically_
[badge-pypi]: https://badge.fury.io/py/pyelastica.svg
[badge-CI]: https://github.com/GazzolaLab/PyElastica/workflows/CI/badge.svg
[badge-docs-status]: https://readthedocs.org/projects/pyelastica/badge/?version=latest
[badge-binder]: https://mybinder.org/badge_logo.svg
[badge-pepy-download-count]: https://pepy.tech/badge/pyelastica
[badge-codecov]: https://codecov.io/gh/GazzolaLab/PyElastica/branch/master/graph/badge.svg
[badge-gitter]: https://badges.gitter.im/PyElastica/community.svg
Expand All @@ -133,7 +125,5 @@ _Names arranged alphabetically_
[link-pepy-download-count]: https://pepy.tech/project/pyelastica
[link-codecov]: https://codecov.io/gh/GazzolaLab/PyElastica

[badge-binder-tutorial]: https://img.shields.io/badge/Launch-PyElastica%20Tutorials-579ACA.svg?logo=data:image/png;base64,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
[link-binder]: https://mybinder.org/v2/gh/GazzolaLab/PyElastica/master?filepath=examples%2FBinder%2F0_PyElastica_Tutorials_Overview.ipynb
[link-gitter]: https://gitter.im/PyElastica/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[link-doi]: https://zenodo.org/badge/latestdoi/254172891
17 changes: 17 additions & 0 deletions backend/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
# We'll use defaults from the Google style.
# See http://clang.llvm.org/docs/ClangFormat.html for help.
Language: Cpp
BasedOnStyle: Google
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
PointerAlignment: Left
DerivePointerAlignment: false
FixNamespaceComments: true
IncludeCategories:
- Regex: "^<.*"
Priority: 1
- Regex: ".*"
Priority: 2
NamespaceIndentation: All
SortIncludes: false
Loading
Loading