renaming: callback function parameters renamed.
This commit renames input variable `list` to `callback_params`.
@@ -35,20 +35,20 @@ class MyCallBack(CallBackBaseClass):
new call back classes
"""
- def __init__(self, step_skip: int, list):
+ def __init__(self, step_skip: int, callback_params):
CallBackBaseClass.__init__(self)
self.every = step_skip
- self.list = list
+ self.callback_params = callback_params
def make_callback(self, system, time, current_step: int):
if current_step % self.every == 0:
- self.list["time"].append(time)
- self.list["step"].append(current_step)
- self.list["position"].append(system.position_collection.copy())
- self.list["directors"].append(system.director_collection.copy())
- self.list["velocity"].append(system.velocity_collection.copy())
+ self.callback_params["time"].append(time)
+ self.callback_params["step"].append(current_step)
+ self.callback_params["position"].append(system.position_collection.copy())
+ self.callback_params["directors"].append(system.director_collection.copy())
+ self.callback_params["velocity"].append(system.velocity_collection.copy())
return
@@ -58,19 +58,19 @@ class ContinuumSnakeCallBack(CallBackBaseClass):
Call back function for continuum snake
"""
- def __init__(self, step_skip: int, list):
+ def __init__(self, step_skip: int, callback_params):
CallBackBaseClass.__init__(self)
self.every = step_skip
- self.list = list
+ self.callback_params = callback_params
def make_callback(self, system, time, current_step: int):
if current_step % self.every == 0:
- self.list["time"].append(time)
- self.list["step"].append(current_step)
- self.list["position"].append(system.position_collection.copy())
- self.list["velocity"].append(system.velocity_collection.copy())
- self.list["avg_velocity"].append(system.compute_velocity_center_of_mass())
+ self.callback_params["time"].append(time)
+ self.callback_params["step"].append(current_step)
+ self.callback_params["position"].append(system.position_collection.copy())
+ self.callback_params["velocity"].append(system.velocity_collection.copy())
+ self.callback_params["avg_velocity"].append(system.compute_velocity_center_of_mass())
return
