Skip to content

Commit

Permalink
TL: solving numerical issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tlunet committed Jun 21, 2024
1 parent 239f3b5 commit 1c4aecd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions qmat/qcoeff/collocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ def __init__(self, nNodes, nodeType, quadType, tLeft=0, tRight=1):
nodes *= (tRight-tLeft)
nodes += tLeft
self.tLeft, self.tRight = tLeft, tRight
# Rounding for safety
np.round(nodes, 14, out=nodes) # TODO : check if necessary ...
# Safety when bound should be included ...
if np.allclose(tLeft, nodes[0]): nodes[0] = tLeft
if np.allclose(tRight, nodes[-1]): nodes[-1] = tRight
self._nodes = nodes

# Lagrange approximation based on nodes
Expand Down

0 comments on commit 1c4aecd

Please sign in to comment.