Skip to content

Commit

Permalink
refactor examples: wrappers -> modules
Browse files Browse the repository at this point in the history
  • Loading branch information
skim0119 committed Aug 16, 2022
1 parent 1c8c703 commit b84a2ae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions examples/Binder/1_Timoshenko_Beam.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"![timoshenko_beam_figure.png](../../assets/timoshenko_beam_figure.png)\n",
"\n",
"## Getting Started\n",
"To set up the simulation, the first thing you need to do is import the necessary classes. Here we will only import the classes that we need. The `elastica.wrappers` classes make it easy to construct different simulation systems. Along with these wrappers, we need to import a rod class, classes for the boundary conditions, and time-stepping functions. As a note, this method of explicitly importing all classes can be a bit cumbersome. Future releases will simplify this step."
"To set up the simulation, the first thing you need to do is import the necessary classes. Here we will only import the classes that we need. The `elastica.modules` classes make it easy to construct different simulation systems. Along with these modules, we need to import a rod class, classes for the boundary conditions, and time-stepping functions. As a note, this method of explicitly importing all classes can be a bit cumbersome. Future releases will simplify this step."
]
},
{
Expand All @@ -41,8 +41,8 @@
"source": [
"import numpy as np\n",
"\n",
"# Import Wrappers\n",
"from elastica.wrappers import BaseSystemCollection, Constraints, Forcing, Damping\n",
"# Import modules\n",
"from elastica.modules import BaseSystemCollection, Constraints, Forcing, Damping\n",
"\n",
"# Import Cosserat Rod Class\n",
"from elastica.rod.cosserat_rod import CosseratRod\n",
Expand All @@ -67,7 +67,7 @@
}
},
"source": [
"Now that we have imported all the necessary classes, we want to create our beam system. We do this by combining all the wrappers we need to represent the physics that we to include in the simulation. In this case, that is the `BaseSystemCollection`, `Constraint`, `Forcings` and `Damping` because the simulation will consider a rod that is fixed in place on one end, and subject to an applied force on the other end."
"Now that we have imported all the necessary classes, we want to create our beam system. We do this by combining all the modules we need to represent the physics that we to include in the simulation. In this case, that is the `BaseSystemCollection`, `Constraint`, `Forcings` and `Damping` because the simulation will consider a rod that is fixed in place on one end, and subject to an applied force on the other end."
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions examples/Binder/2_Slithering_Snake.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"\n",
"\n",
"## Getting Started\n",
"To set up the simulation, the first thing you need to do is import the necessary classes. As with the Timoshenko bean, we need to import wrapper functions which allow us to more easily construct different simulation systems. We also need to import a rod class, all the necessary forces to be applied, timestepping functions, and callback classes. "
"To set up the simulation, the first thing you need to do is import the necessary classes. As with the Timoshenko bean, we need to import modules which allow us to more easily construct different simulation systems. We also need to import a rod class, all the necessary forces to be applied, timestepping functions, and callback classes. "
]
},
{
Expand All @@ -31,8 +31,8 @@
"source": [
"import numpy as np\n",
"\n",
"# import wrappers\n",
"from elastica.wrappers import BaseSystemCollection, Constraints, Forcing, CallBacks, Damping\n",
"# import modules\n",
"from elastica.modules import BaseSystemCollection, Constraints, Forcing, CallBacks, Damping\n",
"\n",
"# import rod class, damping and forces to be applied\n",
"from elastica.rod.cosserat_rod import CosseratRod\n",
Expand All @@ -58,7 +58,7 @@
},
"source": [
"## Initialize System and Add Rod\n",
"The first thing to do is initialize the simulator class by combining all the imported wrappers. After initializing, we will generate a rod and add it to the simulation. "
"The first thing to do is initialize the simulator class by combining all the imported modules. After initializing, we will generate a rod and add it to the simulation. "
]
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
from collections import defaultdict
from elastica.wrappers import BaseSystemCollection, Constraints, Forcing, CallBacks
from elastica.modules import BaseSystemCollection, Constraints, Forcing, CallBacks
from elastica.rod.cosserat_rod import CosseratRod
from elastica.external_forces import GravityForces, MuscleTorques
from elastica.interaction import AnisotropicFrictionalPlane
Expand Down

0 comments on commit b84a2ae

Please sign in to comment.