Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

95 missing imports example cases #96

Merged
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
3 changes: 2 additions & 1 deletion examples/AxialStretchingCase/axial_stretching.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class StretchingBeamSimulator(BaseSystemCollection, Constraints, Forcing, CallBa
youngs_modulus = 1e4
# For shear modulus of 1e4, nu is 99!
poisson_ratio = 0.5
shear_modulus = youngs_modulus / (poisson_ratio + 1.0)

stretchable_rod = CosseratRod.straight_rod(
n_elem,
Expand All @@ -72,7 +73,7 @@ class StretchingBeamSimulator(BaseSystemCollection, Constraints, Forcing, CallBa
density,
nu,
youngs_modulus,
poisson_ratio,
shear_modulus=shear_modulus,
)

stretch_sim.append(stretchable_rod)
Expand Down
3 changes: 2 additions & 1 deletion examples/ButterflyCase/butterfly.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class ButterflySimulator(BaseSystemCollection, CallBacks):
nu = 0.0
youngs_modulus = 1e4
poisson_ratio = 0.5
shear_modulus = youngs_modulus / (poisson_ratio + 1.0)

positions = np.empty((MaxDimension.value(), n_elem + 1))
dl = total_length / n_elem
Expand Down Expand Up @@ -77,7 +78,7 @@ class ButterflySimulator(BaseSystemCollection, CallBacks):
density=density,
nu=nu,
youngs_modulus=youngs_modulus,
poisson_ratio=poisson_ratio,
shear_modulus=shear_modulus,
position=positions,
)

Expand Down
2 changes: 2 additions & 0 deletions examples/ContinuumSnakeCase/continuum_snake.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
__doc__ = """Snake friction case from X. Zhang et. al. Nat. Comm. 2021"""

import sys
import os
import numpy as np

sys.path.append("../../")
from elastica import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# from collections import defaultdict

# import numpy as np
import numpy as np
from matplotlib import pyplot as plt

from elastica import *
Expand Down
1 change: 1 addition & 0 deletions examples/MuscularFlagella/muscular_flagella.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
__doc__ = """Muscular flagella example from Zhang et. al. Nature Comm 2019 paper."""

import sys
import numpy as np

sys.path.append("../../")

Expand Down
1 change: 1 addition & 0 deletions examples/MuscularSnake/muscular_snake.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__doc__ = """Muscular snake example from Zhang et. al. Nature Comm 2019 paper."""
import sys
import numpy as np

sys.path.append("../../")
from elastica import *
Expand Down
1 change: 1 addition & 0 deletions examples/RestartExample/restart_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

import sys
import numpy as np

sys.path.append("../../")
from elastica import *
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import numpy as np

sys.path.append("../../")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import numpy as np

sys.path.append("../../")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import numpy as np

sys.path.append("../../")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import numpy as np

sys.path.append("../../")

Expand Down