Improve format and documentation
@@ -87,7 +87,8 @@ class Beam(BaseStructure):
self.generate_dof_arrays()
# ini info
- self.ini_info = StructTimeStepInfo(self.num_node, self.num_elem, self.num_node_elem, num_dof = self.num_dof, num_bodies = self.num_bodies)
+ self.ini_info = StructTimeStepInfo(self.num_node, self.num_elem, self.num_node_elem,
+ num_dof=self.num_dof, num_bodies=self.num_bodies)
# mutibody: FoR information
try:
@@ -453,8 +454,19 @@ class Beam(BaseStructure):
dt*np.dot(self.timestep_info[ts].cga(),
self.timestep_info[ts].for_vel[0:3]))
-
def nodal_b_for_2_a_for(self, nodal, tstep, filter=np.array([True]*6)):
+ """
+ Projects a nodal variable from the local, body-attached frame (B) to the reference A frame.
+
+ Args:
+ nodal (np.array): Nodal variable of size ``(num_node, 6)``
+ tstep (sharpy.datastructures.StructTimeStepInfo): structural time step info.
+ filter (np.array): optional argument that filters and does not convert a specific degree of
+ freedom. Defaults to ``np.array([True, True, True, True, True, True])``.
+
+ Returns:
+ np.array: the ``nodal`` argument projected onto the reference ``A`` frame.
+ """
nodal_a = nodal.copy(order='F')
for i_node in range(self.num_node):
# get master elem and i_local_node
