Skip to content

Commit

Permalink
fix: No. of beam element nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
yexiang1992 committed Dec 15, 2024
1 parent fc2f688 commit 260e953
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions opstool/post/_get_model_data_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def _make_mp_constraint(self):
def _make_truss_info(self, ele_tag):
self.truss_tags.append(ele_tag)
ele_nodes = ops.eleNodes(ele_tag)
node_i, node_j = ele_nodes
node_i, node_j = ele_nodes[:2]
idx_i, idx_j = self.node_index[node_i], self.node_index[node_j]
# --------------------------------------------------------
self.truss_cells.append([2, idx_i, idx_j])
Expand Down Expand Up @@ -273,7 +273,7 @@ def _get_local_axis(ele_tag):
return xaxis, yaxis, zaxis

def _make_link_info(self, ele_tag):
node_i, node_j = ops.eleNodes(ele_tag)
node_i, node_j = ops.eleNodes(ele_tag)[:2]
idx_i, idx_j = self.node_index[node_i], self.node_index[node_j]
coordi, coordj = self.node_coords[idx_i], self.node_coords[idx_j]
# --------------------------------------------------------
Expand All @@ -287,7 +287,7 @@ def _make_link_info(self, ele_tag):
self.link_zaxis.append(zaxis)

def _make_beam_info(self, ele_tag):
node_i, node_j = ops.eleNodes(ele_tag)
node_i, node_j = ops.eleNodes(ele_tag)[:2]
idx_i, idx_j = self.node_index[node_i], self.node_index[node_j]
# --------------------------------------------------------
self.beam_tags.append(ele_tag)
Expand Down Expand Up @@ -336,7 +336,7 @@ def _make_contact_info(self, ele_tag, ele_class_tag):
self.contact_cells.append(cell)

def _make_all_line_info(self, ele_tag, class_tag):
idxs = [self.node_index[tag_] for tag_ in ops.eleNodes(ele_tag)]
idxs = [self.node_index[tag_] for tag_ in ops.eleNodes(ele_tag)[:2]]
key = OPS_ELE_CLASSTAG2TYPE[class_tag]
self.ELE_CELLS_VTK[key].append([2] + idxs)
self.ELE_CELLS_TYPE_VTK[key].append(LINE_CELL_TYPE_VTK[2])
Expand Down

0 comments on commit 260e953

Please sign in to comment.