Skip to content

Commit

Permalink
Set imat = np.ones((1, 1), dtype=float) if self.greville.size == 1
Browse files Browse the repository at this point in the history
  • Loading branch information
max-models committed Oct 1, 2024
1 parent 5ff3884 commit b462135
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions psydac/fem/splines.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,17 @@ def init_interpolation( self, dtype=float ):
Greville points.
"""
imat = collocation_matrix(
knots = self.knots,
degree = self.degree,
periodic = self.periodic,
normalization = self.basis,
xgrid = self.greville,
multiplicity = self.multiplicity
)
if self.greville.size == 1:
imat = np.ones((1, 1), dtype=float)
else:
imat = collocation_matrix(
knots = self.knots,
degree = self.degree,
periodic = self.periodic,
normalization = self.basis,
xgrid = self.greville,
multiplicity = self.multiplicity
)

if self.periodic:
# Convert to CSC format and compute sparse LU decomposition
Expand Down

0 comments on commit b462135

Please sign in to comment.