From 025195430ee3fe84bf2d5c7c6b346be13ef7b45a Mon Sep 17 00:00:00 2001 From: Bhosale Date: Sat, 30 Jul 2022 02:59:50 -0500 Subject: [PATCH 1/2] update: remove sys append calls in examples --- examples/AxialStretchingCase/axial_stretching.py | 7 ------- .../BoundaryConditionsCases/bc_cases_postprocessing.py | 5 ----- .../general_constraint_allow_yaw.py | 7 +------ examples/ButterflyCase/butterfly.py | 7 ------- examples/ContinuumFlagellaCase/continuum_flagella.py | 4 ---- examples/ContinuumSnakeCase/continuum_snake.py | 3 --- .../parallel_connection_example.py | 4 ---- .../flexible_swinging_pendulum.py | 7 ------- examples/FrictionValidationCases/axial_friction.py | 6 +----- .../friction_validation_postprocessing.py | 1 - .../rolling_friction_initial_velocity.py | 6 +----- .../rolling_friction_on_inclined_plane.py | 6 +----- .../FrictionValidationCases/rolling_friction_torque.py | 6 +----- .../HelicalBucklingCase/convergence_helicalbuckling.py | 4 ---- examples/HelicalBucklingCase/helicalbuckling.py | 6 +----- examples/JointCases/fixed_joint.py | 4 ---- examples/JointCases/fixed_joint_torsion.py | 5 ----- examples/JointCases/hinge_joint.py | 4 ---- examples/JointCases/spherical_joint.py | 6 +----- examples/MuscularFlagella/muscular_flagella.py | 4 ---- examples/MuscularSnake/muscular_snake.py | 5 +---- examples/RestartExample/restart_example.py | 3 --- .../RodRigidBodyContact/rod_cylinder_contact.py | 3 --- .../RodRigidBodyContact/rod_cylinder_contact_friction.py | 3 --- .../RodRigidBodyContact/rod_cylinder_contact_validation.py | 5 ----- .../rod_cylinder_contact_with_y_normal.py | 5 ----- .../rigid_cylinder_rotational_motion_case.py | 4 ---- .../rigid_cylinder_translational_motion_case.py | 4 ---- .../RigidBodyCases/rigid_sphere_rotational_motion_case.py | 4 ---- .../rigid_sphere_translational_motion_case.py | 4 ---- .../RodRodContact/rod_rod_contact_inclined_validation.py | 4 ---- .../RodRodContact/rod_rod_contact_parallel_validation.py | 4 ---- .../RodSelfContact/PlectonemesCase/plectoneme_case.py | 4 ---- .../RodSelfContact/SolenoidsCase/solenoid_case.py | 4 ---- examples/TimoshenkoBeamCase/convergence_timoshenko.py | 6 +----- examples/TimoshenkoBeamCase/timoshenko.py | 4 ---- .../ContinuumSnakeVisualization/continuum_snake.py | 7 ------- .../ContinuumSnakeVisualization/continuum_snake_render.py | 4 ---- 38 files changed, 9 insertions(+), 170 deletions(-) diff --git a/examples/AxialStretchingCase/axial_stretching.py b/examples/AxialStretchingCase/axial_stretching.py index 211d94586..7cde2e966 100644 --- a/examples/AxialStretchingCase/axial_stretching.py +++ b/examples/AxialStretchingCase/axial_stretching.py @@ -23,13 +23,6 @@ isort:skip_file """ -# FIXME without appending sys.path make it more generic -import sys - -sys.path.append("../../") # isort:skip - -# from collections import defaultdict - import numpy as np from matplotlib import pyplot as plt diff --git a/examples/BoundaryConditionsCases/bc_cases_postprocessing.py b/examples/BoundaryConditionsCases/bc_cases_postprocessing.py index 715311057..160d363e5 100644 --- a/examples/BoundaryConditionsCases/bc_cases_postprocessing.py +++ b/examples/BoundaryConditionsCases/bc_cases_postprocessing.py @@ -1,12 +1,7 @@ import numpy as np from matplotlib import pyplot as plt -from matplotlib.colors import to_rgb -from mpl_toolkits import mplot3d from scipy.spatial.transform import Rotation -from elastica.rigidbody import Cylinder -from elastica._linalg import _batch_matvec - def plot_position( plot_params_rod1: dict, diff --git a/examples/BoundaryConditionsCases/general_constraint_allow_yaw.py b/examples/BoundaryConditionsCases/general_constraint_allow_yaw.py index 50088323e..80b1d96fe 100644 --- a/examples/BoundaryConditionsCases/general_constraint_allow_yaw.py +++ b/examples/BoundaryConditionsCases/general_constraint_allow_yaw.py @@ -1,11 +1,6 @@ __doc__ = """Fixed joint example, for detailed explanation refer to Zhang et. al. Nature Comm. methods section.""" -import matplotlib.pyplot as plt import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.BoundaryConditionsCases.bc_cases_postprocessing import ( plot_position, @@ -37,7 +32,7 @@ class GeneralConstraintSimulator( shear_modulus = E / (poisson_ratio + 1.0) # setting up timestepper and video -final_time = 10 +final_time = 1 dl = base_length / n_elem dt = 1e-5 total_steps = int(final_time / dt) diff --git a/examples/ButterflyCase/butterfly.py b/examples/ButterflyCase/butterfly.py index 8030df069..8233c24da 100644 --- a/examples/ButterflyCase/butterfly.py +++ b/examples/ButterflyCase/butterfly.py @@ -1,10 +1,3 @@ -# FIXME without appending sys.path make it more generic -import sys - -sys.path.append("../") -sys.path.append("../../") - -# from collections import defaultdict import numpy as np from matplotlib import pyplot as plt from matplotlib.colors import to_rgb diff --git a/examples/ContinuumFlagellaCase/continuum_flagella.py b/examples/ContinuumFlagellaCase/continuum_flagella.py index cdafbc42a..d1295017f 100644 --- a/examples/ContinuumFlagellaCase/continuum_flagella.py +++ b/examples/ContinuumFlagellaCase/continuum_flagella.py @@ -2,10 +2,6 @@ section 5.2.1 """ import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") import os from elastica import * from examples.ContinuumFlagellaCase.continuum_flagella_postprocessing import ( diff --git a/examples/ContinuumSnakeCase/continuum_snake.py b/examples/ContinuumSnakeCase/continuum_snake.py index 703329883..f4aaa5275 100644 --- a/examples/ContinuumSnakeCase/continuum_snake.py +++ b/examples/ContinuumSnakeCase/continuum_snake.py @@ -1,10 +1,7 @@ __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 * from examples.ContinuumSnakeCase.continuum_snake_postprocessing import ( diff --git a/examples/ExperimentalCases/ParallelConnectionExample/parallel_connection_example.py b/examples/ExperimentalCases/ParallelConnectionExample/parallel_connection_example.py index 6f76fc5ce..da0d457e2 100644 --- a/examples/ExperimentalCases/ParallelConnectionExample/parallel_connection_example.py +++ b/examples/ExperimentalCases/ParallelConnectionExample/parallel_connection_example.py @@ -1,10 +1,6 @@ __doc__ = """Parallel connection example""" import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../../") from elastica import * from elastica.experimental.connection_contact_joint.parallel_connection import ( get_connection_vector_straight_straight_rod, diff --git a/examples/FlexibleSwingingPendulumCase/flexible_swinging_pendulum.py b/examples/FlexibleSwingingPendulumCase/flexible_swinging_pendulum.py index 78353226a..abe94d13d 100644 --- a/examples/FlexibleSwingingPendulumCase/flexible_swinging_pendulum.py +++ b/examples/FlexibleSwingingPendulumCase/flexible_swinging_pendulum.py @@ -1,13 +1,6 @@ """ Flexible swinging pendulum test-case isort:skip_file """ -# FIXME without appending sys.path make it more generic -import sys - -sys.path.append("../../") # isort:skip - -# from collections import defaultdict - import numpy as np from matplotlib import pyplot as plt diff --git a/examples/FrictionValidationCases/axial_friction.py b/examples/FrictionValidationCases/axial_friction.py index 5fd463e51..143311214 100644 --- a/examples/FrictionValidationCases/axial_friction.py +++ b/examples/FrictionValidationCases/axial_friction.py @@ -1,10 +1,6 @@ -__doc__ = """Axial friction validation, for detailed explanation refer to Gazzola et. al. R. Soc. 2018 +__doc__ = """Axial friction validation, for detailed explanation refer to Gazzola et. al. R. Soc. 2018 section 4.1.4 and Appendix G """ import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.FrictionValidationCases.friction_validation_postprocessing import ( plot_axial_friction_validation, diff --git a/examples/FrictionValidationCases/friction_validation_postprocessing.py b/examples/FrictionValidationCases/friction_validation_postprocessing.py index 63d40ec61..d163ca557 100644 --- a/examples/FrictionValidationCases/friction_validation_postprocessing.py +++ b/examples/FrictionValidationCases/friction_validation_postprocessing.py @@ -1,4 +1,3 @@ -import numpy as np from matplotlib import pyplot as plt from matplotlib.colors import to_rgb diff --git a/examples/FrictionValidationCases/rolling_friction_initial_velocity.py b/examples/FrictionValidationCases/rolling_friction_initial_velocity.py index d8403a94b..92158be16 100644 --- a/examples/FrictionValidationCases/rolling_friction_initial_velocity.py +++ b/examples/FrictionValidationCases/rolling_friction_initial_velocity.py @@ -1,11 +1,7 @@ -__doc__ = """Rolling friction validation, for detailed explanation refer to Gazzola et. al. R. Soc. 2018 +__doc__ = """Rolling friction validation, for detailed explanation refer to Gazzola et. al. R. Soc. 2018 section 4.1.4 and Appendix G """ import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.FrictionValidationCases.friction_validation_postprocessing import ( plot_friction_validation, diff --git a/examples/FrictionValidationCases/rolling_friction_on_inclined_plane.py b/examples/FrictionValidationCases/rolling_friction_on_inclined_plane.py index fa9a0caf6..af8f83266 100644 --- a/examples/FrictionValidationCases/rolling_friction_on_inclined_plane.py +++ b/examples/FrictionValidationCases/rolling_friction_on_inclined_plane.py @@ -1,11 +1,7 @@ -__doc__ = """Rolling friction validation, for detailed explanation refer to Gazzola et. al. R. Soc. 2018 +__doc__ = """Rolling friction validation, for detailed explanation refer to Gazzola et. al. R. Soc. 2018 section 4.1.4 and Appendix G """ import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.FrictionValidationCases.friction_validation_postprocessing import ( plot_friction_validation, diff --git a/examples/FrictionValidationCases/rolling_friction_torque.py b/examples/FrictionValidationCases/rolling_friction_torque.py index 9f2f3dc1a..3284f7696 100644 --- a/examples/FrictionValidationCases/rolling_friction_torque.py +++ b/examples/FrictionValidationCases/rolling_friction_torque.py @@ -1,11 +1,7 @@ -__doc__ = """Rolling friction validation, for detailed explanation refer to Gazzola et. al. R. Soc. 2018 +__doc__ = """Rolling friction validation, for detailed explanation refer to Gazzola et. al. R. Soc. 2018 section 4.1.4 and Appendix G """ import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.FrictionValidationCases.friction_validation_postprocessing import ( plot_friction_validation, diff --git a/examples/HelicalBucklingCase/convergence_helicalbuckling.py b/examples/HelicalBucklingCase/convergence_helicalbuckling.py index 7eb026967..499147f49 100644 --- a/examples/HelicalBucklingCase/convergence_helicalbuckling.py +++ b/examples/HelicalBucklingCase/convergence_helicalbuckling.py @@ -2,10 +2,6 @@ section 3.4.1 """ import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.HelicalBucklingCase.helicalbuckling_postprocessing import ( analytical_solution, diff --git a/examples/HelicalBucklingCase/helicalbuckling.py b/examples/HelicalBucklingCase/helicalbuckling.py index 7101a3508..d612fb967 100644 --- a/examples/HelicalBucklingCase/helicalbuckling.py +++ b/examples/HelicalBucklingCase/helicalbuckling.py @@ -1,11 +1,7 @@ -__doc__ = """Helical buckling validation case, for detailed explanation refer to +__doc__ = """Helical buckling validation case, for detailed explanation refer to Gazzola et. al. R. Soc. 2018 section 3.4.1 """ import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.HelicalBucklingCase.helicalbuckling_postprocessing import ( plot_helicalbuckling, diff --git a/examples/JointCases/fixed_joint.py b/examples/JointCases/fixed_joint.py index 8c06c4270..834aa3798 100644 --- a/examples/JointCases/fixed_joint.py +++ b/examples/JointCases/fixed_joint.py @@ -1,10 +1,6 @@ __doc__ = """Fixed joint example, for detailed explanation refer to Zhang et. al. Nature Comm. methods section.""" import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.JointCases.joint_cases_postprocessing import ( plot_position, diff --git a/examples/JointCases/fixed_joint_torsion.py b/examples/JointCases/fixed_joint_torsion.py index fb13fa5cb..3d71ef405 100644 --- a/examples/JointCases/fixed_joint_torsion.py +++ b/examples/JointCases/fixed_joint_torsion.py @@ -1,11 +1,6 @@ __doc__ = """Fixed joint example, for detailed explanation refer to Zhang et. al. Nature Comm. methods section.""" -import matplotlib.pyplot as plt import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from elastica.joint import get_relative_rotation_two_systems from examples.JointCases.joint_cases_postprocessing import ( diff --git a/examples/JointCases/hinge_joint.py b/examples/JointCases/hinge_joint.py index f7b3bf904..ac63bf6e0 100644 --- a/examples/JointCases/hinge_joint.py +++ b/examples/JointCases/hinge_joint.py @@ -1,10 +1,6 @@ __doc__ = """Hinge joint example, for detailed explanation refer to Zhang et. al. Nature Comm. methods section.""" import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.JointCases.joint_cases_postprocessing import ( plot_position, diff --git a/examples/JointCases/spherical_joint.py b/examples/JointCases/spherical_joint.py index 4164dd96c..6e469025b 100644 --- a/examples/JointCases/spherical_joint.py +++ b/examples/JointCases/spherical_joint.py @@ -1,11 +1,7 @@ -__doc__ = """Spherical(Free) joint example, for detailed explanation refer to Zhang et. al. Nature Comm. +__doc__ = """Spherical(Free) joint example, for detailed explanation refer to Zhang et. al. Nature Comm. methods section.""" import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.JointCases.joint_cases_postprocessing import ( plot_position, diff --git a/examples/MuscularFlagella/muscular_flagella.py b/examples/MuscularFlagella/muscular_flagella.py index cfbe91d17..29b160c39 100644 --- a/examples/MuscularFlagella/muscular_flagella.py +++ b/examples/MuscularFlagella/muscular_flagella.py @@ -1,10 +1,6 @@ __doc__ = """Muscular flagella example from Zhang et. al. Nature Comm 2019 paper.""" -import sys import numpy as np - -sys.path.append("../../") - from elastica import * from examples.MuscularFlagella.post_processing import ( plot_video_2D, diff --git a/examples/MuscularSnake/muscular_snake.py b/examples/MuscularSnake/muscular_snake.py index 92ffb87a0..ec6de40af 100644 --- a/examples/MuscularSnake/muscular_snake.py +++ b/examples/MuscularSnake/muscular_snake.py @@ -1,8 +1,5 @@ __doc__ = """Muscular snake example from Zhang et. al. Nature Comm 2019 paper.""" -import sys import numpy as np - -sys.path.append("../../") from elastica import * from examples.MuscularSnake.post_processing import ( plot_video_with_surface, @@ -94,7 +91,7 @@ class MuscularSnakeSimulator( # Muscle group 1 and 3, define two antagonistic muscle pairs n_elem_muscle_group_one_to_three = 13 * 3 base_length_muscle = 0.39 -""" +""" In our simulation, we lump many biological tendons into one computational tendon. As a result, our computational tendon is bigger in size, set as elements other than 4-8 below. diff --git a/examples/RestartExample/restart_example.py b/examples/RestartExample/restart_example.py index ff737f9ee..d6eb19aa5 100644 --- a/examples/RestartExample/restart_example.py +++ b/examples/RestartExample/restart_example.py @@ -2,10 +2,7 @@ This script is an example to how to use Pyelastica restart functionality. """ -import sys import numpy as np - -sys.path.append("../../") from elastica import * diff --git a/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact.py b/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact.py index 97c94a8d4..ebd48dda4 100644 --- a/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact.py +++ b/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact.py @@ -1,7 +1,4 @@ import numpy as np -import sys - -sys.path.append("../../../") from elastica import * from post_processing import plot_velocity, plot_video_with_surface diff --git a/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_friction.py b/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_friction.py index 7ad3e5691..e355df5a9 100644 --- a/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_friction.py +++ b/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_friction.py @@ -1,7 +1,4 @@ import numpy as np -import sys - -sys.path.append("../../../") from elastica import * from post_processing import plot_velocity, plot_video_with_surface diff --git a/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_validation.py b/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_validation.py index ad5383955..97887a74a 100644 --- a/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_validation.py +++ b/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_validation.py @@ -1,9 +1,4 @@ import numpy as np - -# FIXME without appending sys.path make it more generic -import sys - -sys.path.append("../../../") from elastica import * from post_processing import plot_video, plot_cylinder_rod_position diff --git a/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_with_y_normal.py b/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_with_y_normal.py index e001c0620..7dc9be584 100644 --- a/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_with_y_normal.py +++ b/examples/RigidBodyCases/RodRigidBodyContact/rod_cylinder_contact_with_y_normal.py @@ -1,9 +1,4 @@ import numpy as np - -# FIXME without appending sys.path make it more generic -import sys - -sys.path.append("../../../") from elastica import * from post_processing import plot_video, plot_cylinder_rod_position diff --git a/examples/RigidBodyCases/rigid_cylinder_rotational_motion_case.py b/examples/RigidBodyCases/rigid_cylinder_rotational_motion_case.py index 0e7d0844d..323166568 100644 --- a/examples/RigidBodyCases/rigid_cylinder_rotational_motion_case.py +++ b/examples/RigidBodyCases/rigid_cylinder_rotational_motion_case.py @@ -1,8 +1,4 @@ -import sys import numpy as np - -sys.path.append("../../") - from elastica import * from examples.FrictionValidationCases.friction_validation_postprocessing import ( plot_friction_validation, diff --git a/examples/RigidBodyCases/rigid_cylinder_translational_motion_case.py b/examples/RigidBodyCases/rigid_cylinder_translational_motion_case.py index d39d97275..404960762 100644 --- a/examples/RigidBodyCases/rigid_cylinder_translational_motion_case.py +++ b/examples/RigidBodyCases/rigid_cylinder_translational_motion_case.py @@ -1,8 +1,4 @@ -import sys import numpy as np - -sys.path.append("../../") - from elastica import * from examples.FrictionValidationCases.friction_validation_postprocessing import ( plot_friction_validation, diff --git a/examples/RigidBodyCases/rigid_sphere_rotational_motion_case.py b/examples/RigidBodyCases/rigid_sphere_rotational_motion_case.py index 9b92d92d8..1e051ede8 100644 --- a/examples/RigidBodyCases/rigid_sphere_rotational_motion_case.py +++ b/examples/RigidBodyCases/rigid_sphere_rotational_motion_case.py @@ -1,8 +1,4 @@ -import sys import numpy as np - -sys.path.append("../../") - from elastica import * from examples.FrictionValidationCases.friction_validation_postprocessing import ( plot_friction_validation, diff --git a/examples/RigidBodyCases/rigid_sphere_translational_motion_case.py b/examples/RigidBodyCases/rigid_sphere_translational_motion_case.py index e5d50cf09..9c8fdafa3 100644 --- a/examples/RigidBodyCases/rigid_sphere_translational_motion_case.py +++ b/examples/RigidBodyCases/rigid_sphere_translational_motion_case.py @@ -1,8 +1,4 @@ -import sys import numpy as np - -sys.path.append("../../") - from elastica import * from examples.FrictionValidationCases.friction_validation_postprocessing import ( plot_friction_validation, diff --git a/examples/RodContactCase/RodRodContact/rod_rod_contact_inclined_validation.py b/examples/RodContactCase/RodRodContact/rod_rod_contact_inclined_validation.py index ff5f35893..4cb305918 100644 --- a/examples/RodContactCase/RodRodContact/rod_rod_contact_inclined_validation.py +++ b/examples/RodContactCase/RodRodContact/rod_rod_contact_inclined_validation.py @@ -1,8 +1,4 @@ import numpy as np -import sys -import numpy as np - -sys.path.append("../../../") from elastica import * from examples.RodContactCase.post_processing import ( plot_video_with_surface, diff --git a/examples/RodContactCase/RodRodContact/rod_rod_contact_parallel_validation.py b/examples/RodContactCase/RodRodContact/rod_rod_contact_parallel_validation.py index 32c21db61..b659ebccc 100644 --- a/examples/RodContactCase/RodRodContact/rod_rod_contact_parallel_validation.py +++ b/examples/RodContactCase/RodRodContact/rod_rod_contact_parallel_validation.py @@ -1,8 +1,4 @@ import numpy as np -import sys -import numpy as np - -sys.path.append("../../../") from elastica import * from examples.RodContactCase.post_processing import ( plot_video_with_surface, diff --git a/examples/RodContactCase/RodSelfContact/PlectonemesCase/plectoneme_case.py b/examples/RodContactCase/RodSelfContact/PlectonemesCase/plectoneme_case.py index fe99a9f9b..51a49d85c 100644 --- a/examples/RodContactCase/RodSelfContact/PlectonemesCase/plectoneme_case.py +++ b/examples/RodContactCase/RodSelfContact/PlectonemesCase/plectoneme_case.py @@ -1,8 +1,4 @@ import numpy as np -import sys -import numpy as np - -sys.path.append("../../../../") from elastica import * from examples.RodContactCase.post_processing import ( plot_video_with_surface, diff --git a/examples/RodContactCase/RodSelfContact/SolenoidsCase/solenoid_case.py b/examples/RodContactCase/RodSelfContact/SolenoidsCase/solenoid_case.py index 91e78282f..a75e314db 100644 --- a/examples/RodContactCase/RodSelfContact/SolenoidsCase/solenoid_case.py +++ b/examples/RodContactCase/RodSelfContact/SolenoidsCase/solenoid_case.py @@ -1,8 +1,4 @@ import numpy as np -import sys -import numpy as np - -sys.path.append("../../../../") from elastica import * from examples.RodContactCase.post_processing import ( plot_video_with_surface, diff --git a/examples/TimoshenkoBeamCase/convergence_timoshenko.py b/examples/TimoshenkoBeamCase/convergence_timoshenko.py index 36e8a8882..4d998195a 100644 --- a/examples/TimoshenkoBeamCase/convergence_timoshenko.py +++ b/examples/TimoshenkoBeamCase/convergence_timoshenko.py @@ -1,11 +1,7 @@ -__doc__ = """Timoshenko beam convergence study, for detailed explanation refer to +__doc__ = """Timoshenko beam convergence study, for detailed explanation refer to Gazzola et. al. R. Soc. 2018 section 3.4.3 """ import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.TimoshenkoBeamCase.timoshenko_postprocessing import ( plot_timoshenko, diff --git a/examples/TimoshenkoBeamCase/timoshenko.py b/examples/TimoshenkoBeamCase/timoshenko.py index d909565ad..b924a8b69 100644 --- a/examples/TimoshenkoBeamCase/timoshenko.py +++ b/examples/TimoshenkoBeamCase/timoshenko.py @@ -2,10 +2,6 @@ Gazzola et. al. R. Soc. 2018 section 3.4.3 """ import numpy as np -import sys - -# FIXME without appending sys.path make it more generic -sys.path.append("../../") from elastica import * from examples.TimoshenkoBeamCase.timoshenko_postprocessing import plot_timoshenko diff --git a/examples/Visualization/ContinuumSnakeVisualization/continuum_snake.py b/examples/Visualization/ContinuumSnakeVisualization/continuum_snake.py index 466952252..821f3b2ad 100644 --- a/examples/Visualization/ContinuumSnakeVisualization/continuum_snake.py +++ b/examples/Visualization/ContinuumSnakeVisualization/continuum_snake.py @@ -1,11 +1,4 @@ import numpy as np - -# FIXME without appending sys.path make it more generic -import sys - -sys.path.append("../../../") - -import os from collections import defaultdict from elastica.wrappers import BaseSystemCollection, Constraints, Forcing, CallBacks from elastica.rod.cosserat_rod import CosseratRod diff --git a/examples/Visualization/ContinuumSnakeVisualization/continuum_snake_render.py b/examples/Visualization/ContinuumSnakeVisualization/continuum_snake_render.py index 678d6f233..3b12b8c82 100644 --- a/examples/Visualization/ContinuumSnakeVisualization/continuum_snake_render.py +++ b/examples/Visualization/ContinuumSnakeVisualization/continuum_snake_render.py @@ -11,10 +11,6 @@ The module requires POVray installed. """ -import sys - -sys.path.append("../../../") - import multiprocessing import os from functools import partial From 3e7fb50194c4398a0cf694ebf04853f431a26272 Mon Sep 17 00:00:00 2001 From: Bhosale Date: Sat, 30 Jul 2022 11:32:19 -0500 Subject: [PATCH 2/2] fix: revert back original final time --- .../BoundaryConditionsCases/general_constraint_allow_yaw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/BoundaryConditionsCases/general_constraint_allow_yaw.py b/examples/BoundaryConditionsCases/general_constraint_allow_yaw.py index 80b1d96fe..8ceccb103 100644 --- a/examples/BoundaryConditionsCases/general_constraint_allow_yaw.py +++ b/examples/BoundaryConditionsCases/general_constraint_allow_yaw.py @@ -32,7 +32,7 @@ class GeneralConstraintSimulator( shear_modulus = E / (poisson_ratio + 1.0) # setting up timestepper and video -final_time = 1 +final_time = 10 dl = base_length / n_elem dt = 1e-5 total_steps = int(final_time / dt)