PyElastica is the Python implementation of Elastica, an open-source software for the simulation of assemblies of slender, one-dimensional structures using Cosserat Rod theory.

Overview

PyElastica

Build_status CI Documentation Status codecov Downloads Binder

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

gallery

Visit cosseratrods.org for more information and learn about Elastica and Cosserat rod theory.

Installation

PyPI version

PyElastica is compatible with Python 3.6 - 3.8. The easiest way to install PyElastica is with PIP.

$ pip install pyelastica 

Documentation

Documentation Status

Documentation of PyElastica is available here

Tutorials

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).

Contribution

If you would like to participate, please read our contribution guideline

PyElastica is developed by the Gazzola Lab at the University of Illinois at Urbana-Champaign.

List of publications and submissions

Citation

We ask that any publications which use Elastica cite the following papers:

Overall and for single rods:
Gazzola, Dudte, McCormick, Mahadevan, Forward and inverse problems in the mechanics of soft filaments, Royal Society Open Science, 2018. doi: 10.1098/rsos.171628

@article{Gazzola2018,
  title={Forward and inverse problems in the mechanics of soft filaments},
  author={Gazzola, M and Dudte, LH and McCormick, AG and Mahadevan, L},
  journal={Royal Society open science},
  volume={5},
  number={6},
  pages={171628},
  year={2018},
  publisher={The Royal Society Publishing},
  doi = {10.1098/rsos.171628},
  url = {https://doi.org/10.1098/rsos.171628},
}

For assemblies of rods:
Zhang, Chan, Parthasarathy, Gazzola, Modeling and simulation of complex dynamic musculoskeletal architectures, Nature Communications, 2019. doi: 10.1038/s41467-019-12759-5

@article{Zhang2019,
  title={Modeling and simulation of complex dynamic musculoskeletal architectures},
  author={Zhang, X and Chan, FK and Parthasarathy, T and Gazzola, M},
  journal={Nature Communications},
  volume={10},
  number={1},
  pages={1--12},
  year={2019},
  publisher={Nature Publishing Group},
  doi = {10.1038/s41467-019-12759-5},
  url = {https://doi.org/10.1038/s41467-019-12759-5},
}

For control of soft robots:
Naughton, Sun, Tekinalp, Parthasarathy, Chowdhary and Gazzola, Elastica: A compliant mechanics environment for soft robotic control, IEEE Robotics and Automation Letters, 2021. doi: 10.1109/LRA.2021.3063698

@article{Naughton2021,
  author={Naughton, N and Sun, J and Tekinalp, A and Parthasarathy, T and Chowdhary, G and Gazzola, M},
  journal={IEEE Robotics and Automation Letters}, 
  title={Elastica: A compliant mechanics environment for soft robotic control}, 
  year={2021},
  volume={},
  number={},
  pages={1-1},
  doi={10.1109/LRA.2021.3063698}
}

Senior Developers

Names arranged alphabetically

  • Arman Tekinalp
  • Chia-Hsien Shih (Cathy)
  • Fan Kiat Chan
  • Noel Naughton
  • Seung Hyun Kim
  • Tejaswin Parthasarathy (Teja)
  • Yashraj Bhosale (Yash)
Comments
  • Adding Interaction plane to slithering snake example

    Adding Interaction plane to slithering snake example

    Dear PyElastica Team,

    I am currently trying to add an Interaction plane (or any arbitrary obstacle) to the slithering snake example, so that the snake "bounces of" the plane and continues to move into a different direction. However, I wasn't able to find out the correct way to do it. I tried adding the following code into the example

    side_plane = np.array([0.0, 0.0, 3.0]) side_normal = np.array([0.0, 0.0, 1.0]) surface_tol=1e-4

    plane_sim = InteractionPlane(k=1.0,nu=1e-6,plane_origin=side_plane,plane_normal=normal_plane)

    I do not obtain any error messages. Unfortunately, the code does not seem to have any effect on the snake. I am thankful for any tips. I am very new to the PyElastica (and Github) implementation, however I think this is a great project!

    help wanted 
    opened by matei1996 14
  • Fix #122 by enabling joints to connect rods and rigid bodies

    Fix #122 by enabling joints to connect rods and rigid bodies

    Features and Changes

    This issue fixes #122 by implementing the following changes and features:

    1. Enables the connection of Cosserat rods and rigid bodies in any arbitrary combination for the following joint types: FreeJoint, HingeJoint, and FixedJoint
    2. The FreeJoint constrains the translational movement of both systems at the specified connection point. As the point of joint connection doesn't necessarily coincide with the center of mass of the rigid body or the node of the rod, the user can use the point_system_one and point_system_two parameters to specify how the connection point relates to the node / CoM in the local frame of the system.
    3. For the HingeJoint, the link_direction of the second system is now extracted from the director_collection instead of subtracting node positions
    4. The FixedJoint class now also accepts the point_system_one and point_system_two parameters and forwards them to the parent class FreeJoint

    Examples of Usage

    How to connect two Cosserat rods together using a spherical joint with a gap of 0.01 m in between.

    simulator.connect(rod_one, rod_two).using(
        FreeJoint,
        k=1e4,
        nu=1,
        point_system_one=np.array([0.0, 0.0, 0.005]),
        point_system_two=np.array([0.0, 0.0, -0.005]),
    )
    

    How to connect the distal end of a CosseratRod with the base of a cylinder using a spherical joint.

    simulator.connect(rod, cylinder).using(
        FreeJoint,
        k=1e4,
        nu=1,
        point_system_two=np.array([0.0, 0.0, -cylinder.length / 2.]),
    )
    

    How to connect a cosserat rod with the base of a cylinder using a fixed joint, where the cylinder is rotated by 45 degrees around the y-axis.

    from scipy.spatial.transform import Rotation
    simulator.connect(rod, cylinder).using(
          FixedJoint,
          k=1e5,
          nu=1e0,
          kt=1e3,
          nut=1e-3,
          point_system_two=np.array([0, 0, -cylinder.length / 2]),
          rest_rotation_matrix=Rotation.from_euler('y', np.pi / 4, degrees=False).as_matrix(),
    )
    

    Results from JointCases

    Spherical joint:

    System consisting of two rods and one cylinder connected with spherical joints. The sinusoidal force is applied to the second rod. Example can be run using:

    python examples/JointCases/spherical_joint.py
    

    https://user-images.githubusercontent.com/2360366/180027045-d9753a1a-56ec-4459-a719-a13c7398620e.mp4

    Fixed joint:

    System consisting of two rods and one cylinder connected with fixed joints. The sinusoidal force is applied to the second rod. Example can be run using:

    python examples/JointCases/fixed_joint.py
    

    https://user-images.githubusercontent.com/2360366/180449881-c806dd79-324b-40d9-9f57-b6257c7f8978.mp4

    TODOs

    • [x] Write tests for connecting rods with cylinders, particularly for non-zero point_system_one and point_system_two parameters
    • [x] Add cylinder to spherical_joint.py example as third element.
    • [x] Add cylinder to fixed_joint.py example as third element
    enhancement discussion 
    opened by mstoelzle 13
  • Address #148 by adding `ConfigurableFixedConstraint` boundary condition class

    Address #148 by adding `ConfigurableFixedConstraint` boundary condition class

    Motivation

    Currently, there exists only the option to either have a) no boundary conditions or b) fully fixed boundary conditions. The only functionality in between is that for example translations are allowed, but rotations are constrained and vice-versa. However in practice, there are many situations where we would like to allow certain translations (for example along a plane) or rotations (for example allow yawing of the end of the rod), but constrain all other DoF. The user of the library would have to implement this functionality all themselves inheriting from the FreeBC class. In many cases, such an implementation is not straight-forward. Thus, the library should provide the user the option to configure the BC themselves in a simple fashion. Although it obviously will never cover all the edge-cases a specific project might require, it will give the user an idea / hint / guidance on how to implement a similar solution.

    Provided functionality

    This PR add the following functionality through the ConfigurableFixedConstraint class:

    • Using boolean arrays translational_constraint_selector and rotational_constraint_selector, the user can specify which Degrees of Freedom to allow / constrain at the specified nodes.
    • These boolean arrays have to be specified in the inertial frame.
    • The ConfigurableFixedConstraint will now only re-set the positions, velocities, directors and omegas to the saved, fixed values for the constrained dimensions. The other DoF are allowed to freely move / rotate.
    • We can simplify the codebase by now having FixedConstraint be a child class of ConfigurableFixedConstraint. FixedConstraint will still constrain all dimension, e.g. translational_constraint_selector=np.array([True, True, True]) and rotational_constraint_selector=np.array([True, True, True])

    Examples for usage

    Below examples motivate the usage of this new class.

    # How to fix all translational and rotational DoF except allowing twisting around z-axis in inertial frame:
    
    simulator.constrain(rod).using(
        ConfigurableFixedConstraint,
        constrained_position_idx=(0,),
        constrained_director_idx=(0,),
        translational_constraint_selector=np.array([True, True, True]),
        rotational_constraint_selector=np.array([True, True, False]),
    )
    
    # How to allow the end of the rod to move in the x-y plane and allow all rotational DoF:
    
    simulator.constrain(rod).using(
        ConfigurableFixedConstraint,
        constrained_position_idx=(-1,),
        translational_constraint_selector=np.array([True, True, False]),
    )
    

    I also added an example in examples/BoundaryConditionCases/configurable_fixed_constraint.py, which applies torsion to end tip of a rod. With a fully FixedConstraint the resulting orientation of the first node of the rod would look like this:

    Fully Fixed BC: configurable_bc_fully_fixed

    When we now use rotational_constraint_selector=np.array([True, True, False]) (e.g. allow for yawing / rotation around the z-axis), the orientation of the first node of the rod looks like this:

    Free Yawing: configurable_bc_free_yaw

    TODO's

    • [x] Tests for ConfigurableFixedConstraint class
    • [x] Numba-compatible implementation of nb_constraint_rotational_values
    • [x] Rotate omega_collection into the inertial frame before applying zero-speed constraints

    Request for ideas / feedback

    I would like to ask the maintainers specifically for feedback on the current prototype of nb_constraint_rotational_values. Obviously, this is currently not numba-compatible. But more importantly, I would like to ask for your thoughts if constraining the Euler angles is a suitable way to go and if you have other ideas to allow the rotation around certain axis and constrain the rotation around other axis?

    enhancement discussion 
    opened by mstoelzle 12
  • Create a pre-curved rod

    Create a pre-curved rod

    Hello PyElastica,

    I am a student and I am trying to apply the library 'PyElastica' in my project for a rod with a pre-curvature. But I could only create a straight rod. Could you please advise me if there is a way to make a pre-curved rod?

    Thank you in advance for your help and congratulations for this beautiful work !

    Émerson

    opened by emersonkt 12
  • paralleled rod connection setting

    paralleled rod connection setting

    Dear PyElastica,

    thank you in advance. While using powerful PyElastica to model a soft robot, which is consisted of 3 parallel rods connected from each other. Luckily, I found a similar one from your paper: Topology, Geometry, and Mechanics of Strongly Stretched and Twisted Filaments: Solenoids, Plectonemes, and Artificial Muscle Fibers, but i can not find any reference code. So could you share the modeling code like boundary condition or how the bilateral rods connected to the centeral one. Thank you for your time and help.

    BR Daphne

    help wanted 
    opened by daphne198693 12
  • Applying a constant torque in one direction

    Applying a constant torque in one direction

    Hello! Is there any way to apply torque( at the end of the rod) in the same direction as rod is fixed. For example I have a rod in y direction and I would like to apply a torque in this direction. I have created a calss called "OnedirectionTorque"

    class OnedirectionTorque(NoForces): def init(self,torque_end,direction): super(EndPointTorques, self).init() self.torque_end= (torque_end * direction).reshape(3, 1) # defined in global frame, shape(3,1) def apply_torques(self, system, time: np.float = 0.0): system.external_torques[..., -1] += system.director_collection[..., -1]@self.torque_end

    I also have add it this piece of lines in examples/TimoshenkoBeamCase/timoshenko.py direction = np.array([0.0, 1.0, 0.0]) toque_end = -10 timoshenko_sim.add_forcing_to(shearable_rod).using( UniformTorques,toque_end,direction)

    Is it implemented correctly

    Thanks in advance

    opened by ghost 12
  • How to simulate the gravity of cable being applied forces?

    How to simulate the gravity of cable being applied forces?

    Hi PyElasitica teams,

    I want to simulate the process of cable operation. I set one end of the cable fixed, applied an upward force in the middle of the cable, and applied gravity to the whole cable. image

    The unfixed end of the real cable will sag naturally under the influence of gravity, as shown in above figure, but in my simulation results, the unfixed end is still lifting until the whole cable is straightened, as shown in below figure. image

    Here is my code:

    help wanted 
    opened by woshizh951 11
  • Is there a cpp version of this library?

    Is there a cpp version of this library?

    Hi, I'm developing a research project and found this library. However, I'm doing mainly cpp and need a lib to be able to integrate it into the current system.

    After checking the code, it seems the main lib is written in python? Or do you have another version that is written in C/C++ elsewhere?

    Thank you

    opened by xarthurx 10
  • Refactor internal dissipation as external addon damping module

    Refactor internal dissipation as external addon damping module

    Fixes #112 by providing an alternative add-on damping module (mixin class) for internal dissipation of Cosserat rods, with the following advantages:

    1. Damping can be added as a Mixin class when it is needed for a rod, thus making damping modular.
    2. The analytical version of the original internal damper ExponentialDamper is unconditionally stable, and removes any timestep restrictions coming in from damping.
    3. With the incoming modularity, other damping models can be conveniently implemented.

    Additionally, a DeprecationWarning is added when the damping constant is provided in the rod constructor (soon the option will be removed in the following release-0.4).

    The examples will be refactored (with help from @armantekinalp), along with confirmation, that the dynamics of the individual cases stay the same:

    • [x] axial stretching
    • [x] binder stuff?
    • [x] butterfly
    • [x] continuum flagella
    • [x] continuum snake
    • [x] Experimental cases - parallel connection
    • [x] flexible swinging pendulum
    • [x] friction validation cases
    • [x] helical buckling
    • [x] joint cases
    • [x] muscular flagella
    • [x] muscular snake
    • [x] restart example
    • [x] rod-rod contact cases
    • [x] rod self contact cases
    • [x] timoshenko

    @armantekinalp after finishing the confirmations, we should also check if we can raise timesteps in these cases.

    enhancement update 
    opened by bhosale2 9
  • (#80) node to element interpolation fix

    (#80) node to element interpolation fix

    Fixes #80, by

    1. Adding momentum conserving node-to-element interpolation for velocity.
    2. Renaming older node-to-element interpolation as to be used for position.
    3. Specifically naming the node-to-element interpolation used for mass/forces (edge special treatment).

    @armantekinalp I ran the snake and flagella, and they produce results as expected.

    bug enhancement 
    opened by bhosale2 9
  • Update FixedJoints: restoring spring-damped-torques, initial rotation offset

    Update FixedJoints: restoring spring-damped-torques, initial rotation offset

    Fixes #131 for the FixedJoint class:

    • Now any arbitrary torques applied to rods or rigid bodies connected by a FixedJoint are compensated (e.g. more general implementation)
    • Rotation frame deviation is computed using rotation vectors
    • Rotational spring-damper system is used to restrict the rotational mode
    • Spring: spring constant kt scales the rotational frame deviation between systems one and two
    • Damper: damping constant nut scales the difference between angular velocities of system one and two
    • Introduce functionality of static rotation offset between systems one and two: records the initial relative rotation between the two systems and enforces this static rotation throughout the entire simulation. If use_static_rotation==False, the static rotation is set to an identity matrix and restoring torques are applied to fully align the local frames of both systems at the join.
    • Example examples/JointCases/fixed_joint_torsion.py illustrates how this implementation generates torsional / twisting torques to prevent torsional deviations
    • Use common diagnostic callback for all joint cases examples The attached plots demonstrates the results of the examples/JointCases/fixed_joint_torsion.py example: Orientation_of_last_node_of_rod_1 Orientation_of_last_node_of_rod_2
    enhancement 
    opened by mstoelzle 7
  • Timoschenko Beam example-length of Beam remains the same

    Timoschenko Beam example-length of Beam remains the same

    Hello,

    I am looking at the Timoschenko Beam example and I noticed that when one applies an end force to the beam the x-value of the solution doesn't change compared to the starting point. That would imply that the Beam gets longer over time. Is this intended or is there a workaround to this problem?

    Thanks and kind regards, Matei

    help wanted 
    opened by matei1996 7
  • Static Solution

    Static Solution

    Hi,

    I'm currently looking into different tools to do static and dynamic analysis of cosserat rods. Hence my question: Is it possible to do static analysis with PyElastica without time integration? And if not, is it possible without too much effort to include this feature with additional code by myself without manipulating PyElastica itself?

    Thank you for your feedback. Bests

    help wanted 
    opened by fepauly 1
  • Follower Forces and Torques

    Follower Forces and Torques

    Hi,

    I am trying to implement the helical motion benchmark from this paper:

    https://www.researchgate.net/publication/329252597_A_Geometrically_Exact_Model_for_Soft_Continuum_Robots_The_Finite_Element_Deformation_Space_Formulation

    To do this I need to define a follower force and follower torque at the tip of the rod. The force needs to remain perpendicular to the rod under deformation. This is my current attempt at defining a follower force.

    class endpointTorque(NoForces):
        def __init__(
            self,
            torque=np.array([0.0, 0.0, 0.0]),
            rampUpTime = 0.0
        ):  
            self.torque=torque
            self.rampUpTime=rampUpTime
    
        def apply_torques(self, system, time: np.float64 = 0.0):
            if self.rampUpTime != 0:
                factor = min(1, time / self.rampUpTime)
                system.external_torques[..., -1] += system.director_collection[...,-1] @ (self.torque*factor)
            else:
                system.external_torques[..., -1] += system.director_collection[...,-1] @ self.torque
    
    
    
    class endpointForce(NoForces):
        def __init__(
            self,
            force=np.array([0.0, 0.0, 0.0]),
            rampUpTime = 0.0
        ):  
            self.force=force
            self.rampUpTime = rampUpTime
    
        def apply_forces(self, system, time: np.float64 = 0.0):
            if self.rampUpTime != 0:
                factor = min(1, time / self.rampUpTime)
                system.external_forces[..., -1] += system.director_collection[...,-1] @ (self.force*factor)
            else:
                system.external_forces[..., -1] += system.director_collection[...,-1] @ self.force
    

    Unfortunately, this doesn't result in the desired helical twisting of the rod. Instead, the rod is stretched in one direction. Screenshot 2022-11-14 110139

    Instead, I would expect something like this: Screenshot 2022-11-14 113646

    Do you know what I am doing wrong? Thank you very much.

    help wanted 
    opened by SvRichter 2
  • Include Windows builds

    Include Windows builds

    Currently there is an issue with Windows CI builds, because of that we are removing Windows build in #206 . However, we should include it in future. @bhosale2 could you please attach the relevant links.

    enhancement prio:low 
    opened by armantekinalp 1
  • Remove the option for internal damping module for Cosserat rods following warning message

    Remove the option for internal damping module for Cosserat rods following warning message

    Currently, adding damping to the rod via AnalyticalLinearDamper results in the following warning message:

    Screen Shot 2022-08-30 at 10 02 31 PM

    Per the warning to make a soft change, we should convert the warning message to an error message if the user provides internal damping other than None when initializing a Cosserat rod, and remove related functionality from the cosserat rod equations.

    Thoughts @armantekinalp and @skim0119?

    enhancement discussion prio:medium 
    opened by bhosale2 1
  • Clarify namespace for elastica modules to avoid namespace confusion and clutter

    Clarify namespace for elastica modules to avoid namespace confusion and clutter

    Currently, in example cases, the modules from elastica are imported directly as from elastica import *. This can become an issue when using elastica across packages (where elastica is a plugin), where modules from other packages can collide in namings with the modules from elastica. To avoid this, it may be helpful to use functionalities in elastica as:

    import elastica as ea; ea.Damping(....) to make it explicit where the functionality comes from.

    @skim0119 and @armantekinalp thoughts?

    enhancement good first issue discussion prio:medium 
    opened by bhosale2 2
Releases(v0.3.0)
  • v0.3.0(Aug 18, 2022)

    Release 0.3.0

    New Features

    • Refactor internal dissipation as external addon damping module by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/114
      • New AnalyticalDamper
      • Update timestep values for the new damping module by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/120
    • Filter Damper class by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/123
    • Adding ConfigurableFixedConstraint boundary condition class by @mstoelzle in https://github.com/GazzolaLab/PyElastica/pull/143

    What's Changed

    • Adds significant digits to shear coefficient (Alpha) (#79) by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/82
    • Dissipation constant fix (#81) by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/87
      • Scale dissipation constant by mass instead of length.
    • Update FixedJoints: restoring spring-damped-torques, initial rotation offset by @mstoelzle in https://github.com/GazzolaLab/PyElastica/pull/135
    • Update: Damping values for rod-rigid body contact cases (#171) by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/172
    • Fix damping force direction by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/170
    • Refactor: wrappers -> modules by @skim0119 in https://github.com/GazzolaLab/PyElastica/pull/177

    Minor Fixes

    • Fix compute shear energy function typo by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/88
    • Track velocity norms as dynamic proxies in Axial stretching and Timoshenko examples by @tp5uiuc in https://github.com/GazzolaLab/PyElastica/pull/97
    • Node to element interpolation fix by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/98
    • Update: numba disable jit flag in poetry command by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/146
    • Adjusting data structure of fixed_positions and fixed_directors by @mstoelzle in https://github.com/GazzolaLab/PyElastica/pull/147
    • Docs: correct endpoint forces docstring by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/157
    • Update: remove sys append calls in examples by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/162

    New Experimental Features

    • Enabling joints to connect rods and rigid bodies by @mstoelzle in https://github.com/GazzolaLab/PyElastica/pull/149

    Repository Updates

    • Codeowners setup by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/115
    • Remove _elastica_numba folder while keeping _elastica_numba.py by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/138
    • Update CI: Add sphinx build by @skim0119 in https://github.com/GazzolaLab/PyElastica/pull/139
    • Poetry setup for PyElastica (#101) by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/141
    • Add pre commit to pyelastica by @bhosale2 in https://github.com/GazzolaLab/PyElastica/pull/151
    • Update makefile commands: test by @skim0119 in https://github.com/GazzolaLab/PyElastica/pull/156

    Full Changelog: https://github.com/GazzolaLab/PyElastica/compare/v0.2.4...v0.3.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.4(Jul 15, 2022)

    Release Note (version 0.2.4)

    What's Changed

    • Refactor EndPointForcesSinusoidal example and test cases by @armantekinalp in https://github.com/GazzolaLab/PyElastica/pull/110
    • Fix save_every condition in ExportCallBack by @mstoelzle in https://github.com/GazzolaLab/PyElastica/pull/125
    • Fix and update contact examples by @armantekinalp in https://github.com/GazzolaLab/PyElastica/pull/109
    • Update rigid body rod contact by @armantekinalp in https://github.com/GazzolaLab/PyElastica/pull/117
    • Update rigid body rod contact friction by @armantekinalp in https://github.com/GazzolaLab/PyElastica/pull/124
    • Update ExportCallback by @skim0119 in https://github.com/GazzolaLab/PyElastica/pull/130

    New Contributors

    • @mstoelzle made their first contribution in https://github.com/GazzolaLab/PyElastica/pull/125
    Source code(tar.gz)
    Source code(zip)
  • v0.2.3(May 19, 2022)

    Release Note (version 0.2.3)

    Developer Note

    The major updates are knot theory module added to the Cosserat rod as mixin, and muscular snake example is added.

    Notable Changes

    • #70: Knot theory module to compute topological quantities.
    • #71: Reorganize rod constructor warning messages and collect messages in log.
    • #72: Muscular snake example is added.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(Mar 9, 2022)

    Release Note (version 0.2.2)

    Developer Note

    The major documentation update is finished in this version. Constraint and finalize module are refactored to enhance readability.

    Notable Changes

    • #64: Core wrapper redesign. The finalizing code is refactored for easier integration.
    • #65: Documentation update.
    • #56: Constraint module has been refactored to include proper abstract base class. Additionally, new FixedConstraint is added for generalized fixed boundary condition.
    • More test cases are added to increase code-coverage.
    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Jan 26, 2022)

    Release Note (version 0.2.1)

    Developer Note

    Contact model between two different rods and rod with itself is implemented. Testing the contact model is done through simulations. These simulation scripts can be found under RodContactCase. However, in future releases we have to add unit tests for contact model functions to test them and increase code coverage.

    Notable Changes

    • #31: Merge contact model to master PR #40 in public
    • #46: The progress bar can be disabled by passing an argument to integrate.
    • #48: Experimental modules are added to hold functions that are in test phase.

    Release Note

    Click to expand
    • Rod-Rod contact and Rod self contact is added.
    • Two example cases for rod-rod contact is added, i.e. two rods colliding to each other in space.
    • Two example cases for rod self contact is added, i.e. plectonemes and solenoids.
    • Progress bar can be disabled by passing an argument to integrate function.
    • Experimental module added.
    • Bugfix in callback mechanism
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0.post1(Jan 3, 2022)

  • 0.2.0(Dec 30, 2021)

    Release Note (version 0.2)

    Developer Note

    Good luck! If it explode, increase nu. :rofl: If it doesn't explode, thoroughly check for the bug.

    Notable Changes

    • #84: Block implementation
    • #75: Poisson ratio and definition of modulus PR #26 in public
    • #95: MuscularFlagella example case is added
    • #100: ExportCallBack is added to export the rod-data into file.
    • #109: Numpy-only version is now removed. Numba-implementation is set to default.
    • #112: Save and load implementation with the example are added.

    Release Note

    Click to expand
    • Block structure is included as part of optimization strategy.
    • Different Poisson ratio is supported.
    • Contributing guideline is added.
    • Update readme
    • Add MuscularFlagella example case
    • Minimum requirement for dependencies is specified.
    • Shear coefficient is corrected.
    • Connection index assertion fixed.
    • Remove numpy-only version.
    • Save/Load example
    Source code(tar.gz)
    Source code(zip)
  • 0.1.0.post5(Nov 29, 2021)

    • Soft changes are done for rod initialization. If user does not provides shear modulus then warning messages will be raised and shear modulus will be computed based on Poisson Ratio.

    • We changed the test scripts to test new warning messages.

    • Old test scripts are updated such that warning messages won't be raised.

    • Examples are updated such that warning messages won't be raised.

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0.post4(Nov 10, 2021)

  • 0.1.0.post3(Sep 14, 2021)

  • 0.1.0.post2(Dec 30, 2020)

    This release of PyElastica uses the Python package numba to enable just in time compilation leading to a ~8x speedup over the previous version. Numba is not required to run PyElastica and if numba is not installed, PyElastica will defualt to the non-numba implementation. As such, if you wish to take advantage of the speed-up afforded by numba, please be sure to install it separately.

    Future releases of PyElastica will require numba and we will no longer be maintaining the non-numba code beyond this release.

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

    (This post-release fixes a bug which appears with new version of Numba. In new versions of Numba jitclass is imported from numba.experimental and import path was wrong in PyElastica. Since we are not using jitclass we removed all jitclass import statements from the code base.)

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0.post1(Nov 2, 2020)

    This release of PyElastica uses the Python package numba to enable just in time compilation leading to a ~8x speedup over the previous version. Numba is not required to run PyElastica and if numba is not installed, PyElastica will defualt to the non-numba implementation. As such, if you wish to take advantage of the speed-up afforded by numba, please be sure to install it separately.

    Future releases of PyElastica will require numba and we will no longer be maintaining the non-numba code beyond this release.

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

    (This post-release fixes a bug in the setup.py file to allow the package to properly install)

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Nov 2, 2020)

    This release of PyElastica uses the Python package numba to enable just in time compilation leading to a ~8x speedup over the previous version. Numba is not required to run PyElastica and if numba is not installed, PyElastica will defualt to the non-numba implementation. As such, if you wish to take advantage of the speed-up afforded by numba, please be sure to install it separately.

    Future releases of PyElastica will require numba and we will no longer be maintaining the non-numba code beyond this release.

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

    Source code(tar.gz)
    Source code(zip)
  • 0.0.2(Apr 15, 2020)

  • 0.0.1(Apr 15, 2020)

Owner
Gazzola Lab
We bring together theory, computing and experiments for the discovery of rational design principles.
Gazzola Lab
Code for paper "Do Language Models Have Beliefs? Methods for Detecting, Updating, and Visualizing Model Beliefs"

This is the codebase for the paper: Do Language Models Have Beliefs? Methods for Detecting, Updating, and Visualizing Model Beliefs Directory Structur

Peter Hase 19 Aug 21, 2022
Code accompanying paper: Meta-Learning to Improve Pre-Training

Meta-Learning to Improve Pre-Training This folder contains code to run experiments in the paper Meta-Learning to Improve Pre-Training, NeurIPS 2021. P

28 Dec 31, 2022
The source code of CVPR 2019 paper "Deep Exemplar-based Video Colorization".

Deep Exemplar-based Video Colorization (Pytorch Implementation) Paper | Pretrained Model | Youtube video 🔥 | Colab demo Deep Exemplar-based Video Col

Bo Zhang 253 Dec 27, 2022
PyTorch implementation of "Representing Shape Collections with Alignment-Aware Linear Models" paper.

deep-linear-shapes PyTorch implementation of "Representing Shape Collections with Alignment-Aware Linear Models" paper. If you find this code useful i

Romain Loiseau 27 Sep 24, 2022
Explaining in Style: Training a GAN to explain a classifier in StyleSpace

Explaining in Style: Official TensorFlow Colab Explaining in Style: Training a GAN to explain a classifier in StyleSpace Oran Lang, Yossi Gandelsman,

Google 197 Nov 08, 2022
A foreign language learning aid using a neural network to predict probability of translating foreign words

Langy Langy is a reading-focused foreign language learning aid orientated towards young children. Reading is an activity that every child knows. It is

Shona Lowden 6 Nov 17, 2021
An improvement of FasterGICP: Acceptance-rejection Sampling based 3D Lidar Odometry

fasterGICP This package is an improvement of fast_gicp Please cite our paper if possible. W. Jikai, M. Xu, F. Farzin, D. Dai and Z. Chen, "FasterGICP:

79 Dec 31, 2022
PyTorch implementation of MoCo v3 for self-supervised ResNet and ViT.

MoCo v3 for Self-supervised ResNet and ViT Introduction This is a PyTorch implementation of MoCo v3 for self-supervised ResNet and ViT. The original M

Facebook Research 887 Jan 08, 2023
Source code for PairNorm (ICLR 2020)

PairNorm Official pytorch source code for PairNorm paper (ICLR 2020) This code requires pytorch_geometric=1.3.2 usage For SGC, we use original PairNo

62 Dec 08, 2022
Statsmodels: statistical modeling and econometrics in Python

About statsmodels statsmodels is a Python package that provides a complement to scipy for statistical computations including descriptive statistics an

statsmodels 8.1k Jan 02, 2023
CCPD: a diverse and well-annotated dataset for license plate detection and recognition

CCPD (Chinese City Parking Dataset, ECCV) UPdate on 10/03/2019. CCPD Dataset is now updated. We are confident that images in subsets of CCPD is much m

detectRecog 1.8k Dec 30, 2022
An updated version of virtual model making

Model-Swap-Face v2   这个项目是基于stylegan2 pSp制作的,比v1版本Model-Swap-Face在推理速度和图像质量上有一定提升。主要的功能是将虚拟模特进行环球不同区域的风格转换,目前转换器提供西欧模特、东亚模特和北非模特三种主流的风格样式,可帮我们实现生产资料零成

seeprettyface.com 62 Dec 09, 2022
GeneGAN: Learning Object Transfiguration and Attribute Subspace from Unpaired Data

GeneGAN: Learning Object Transfiguration and Attribute Subspace from Unpaired Data By Shuchang Zhou, Taihong Xiao, Yi Yang, Dieqiao Feng, Qinyao He, W

Taihong Xiao 141 Apr 16, 2021
Framework for training options with different attention mechanism and using them to solve downstream tasks.

Using Attention in HRL Framework for training options with different attention mechanism and using them to solve downstream tasks. Requirements GPU re

5 Nov 03, 2022
Code for technical report "An Improved Baseline for Sentence-level Relation Extraction".

RE_improved_baseline Code for technical report "An Improved Baseline for Sentence-level Relation Extraction". Requirements torch = 1.8.1 transformers

Wenxuan Zhou 74 Nov 29, 2022
Unofficial TensorFlow implementation of the Keyword Spotting Transformer model

Keyword Spotting Transformer This is the unofficial TensorFlow implementation of the Keyword Spotting Transformer model. This model is used to train o

Intelligent Machines Limited 8 May 11, 2022
[ICCV 2021 (oral)] Planar Surface Reconstruction from Sparse Views

Planar Surface Reconstruction From Sparse Views Linyi Jin, Shengyi Qian, Andrew Owens, David F. Fouhey University of Michigan ICCV 2021 (Oral) This re

Linyi Jin 89 Jan 05, 2023
Adjust Decision Boundary for Class Imbalanced Learning

Adjusting Decision Boundary for Class Imbalanced Learning This repository is the official PyTorch implementation of WVN-RS, introduced in Adjusting De

Peyton Byungju Kim 16 Jan 04, 2023
A computational optimization project towards the goal of gerrymandering the results of a hypothetical election in the UK.

A computational optimization project towards the goal of gerrymandering the results of a hypothetical election in the UK.

Emma 1 Jan 18, 2022
Apache Spark - A unified analytics engine for large-scale data processing

Apache Spark Spark is a unified analytics engine for large-scale data processing. It provides high-level APIs in Scala, Java, Python, and R, and an op

The Apache Software Foundation 34.7k Jan 04, 2023