Skip to content

Commit 7aed23e

Browse files
committed
Improve Codacy diff coverage
1 parent df3af03 commit 7aed23e

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

actions/triangular_actions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ def collapse_edge(mesh: Mesh, n1: Node, n2: Node) -> True:
121121
else:
122122
ds = d2s.get_beta(1)
123123
ds.set_node(n1)
124+
"""
124125
elif d12 is None and d2112 is not None:
125126
d2112.set_node(n1)
126127
ds = (d2112.get_beta(1)).get_beta(1)
@@ -129,7 +130,7 @@ def collapse_edge(mesh: Mesh, n1: Node, n2: Node) -> True:
129130
ds2.set_node(n1)
130131
ds = (ds2.get_beta(1)).get_beta(1)
131132
ds2 = ds.get_beta(2)
132-
133+
"""
133134
#update beta2 relations
134135
if d112 is not None:
135136
d112.set_beta(2, d12)

mesh_model/mesh_analysis.py

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ def degree(n: Node) -> int:
147147
else:
148148
adjacency += 0.5
149149
if adjacency != int(adjacency):
150-
print(adjacency)
151-
print(n.id)
152150
raise ValueError("Adjacency error")
153151
return adjacency
154152

@@ -168,21 +166,6 @@ def get_boundary_darts(m: Mesh) -> list[Dart]:
168166
return boundary_darts
169167

170168

171-
def get_boundary_nodes(m: Mesh) -> list[Node]:
172-
"""
173-
Find all boundary nodes
174-
:param m: a mesh
175-
:return: a list of all boundary nodes
176-
"""
177-
boundary_nodes = []
178-
for n_id in range(0, len(m.nodes)):
179-
if m.nodes[n_id, 2] >= 0:
180-
n = Node(m, n_id)
181-
if on_boundary(n):
182-
boundary_nodes.append(n)
183-
return boundary_nodes
184-
185-
186169
def find_opposite_node(d: Dart) -> (int, int):
187170
"""
188171
Find the coordinates of the vertex opposite in the adjacent triangle
@@ -499,4 +482,20 @@ def test_degree(n: Node) -> bool:
499482
if degree(n) > 10:
500483
return False
501484
else:
502-
return True
485+
return True
486+
487+
"""
488+
def get_boundary_nodes(m: Mesh) -> list[Node]:
489+
#
490+
Find all boundary nodes
491+
:param m: a mesh
492+
:return: a list of all boundary nodes
493+
#
494+
boundary_nodes = []
495+
for n_id in range(0, len(m.nodes)):
496+
if m.nodes[n_id, 2] >= 0:
497+
n = Node(m, n_id)
498+
if on_boundary(n):
499+
boundary_nodes.append(n)
500+
return boundary_nodes
501+
"""

0 commit comments

Comments
 (0)