Skip to content

Commit

Permalink
Added special case of degree=0 for local_element_end in FemAssembly…
Browse files Browse the repository at this point in the history
…Grid
  • Loading branch information
camillo81 committed Oct 6, 2022
1 parent 327afb3 commit e031c07
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion psydac/fem/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ def __init__( self, space, start, end, *, quad_order=None, nderiv=1, parent_star
local_element_start = self._spans.searchsorted( degree + start )
local_element_end = self._spans.searchsorted( degree + end )
else:
if end+1 >= degree:
if degree == 0:
local_element_start = self._spans.searchsorted( degree if start == 0 else 1 + start)
local_element_end = self._spans.searchsorted( end )
elif end+1 >= degree:
local_element_start = self._spans.searchsorted( degree if start == 0 else 1 + start)
local_element_end = self._spans.searchsorted( end if end == n-1 else 1 + end )
else:
Expand Down

1 comment on commit e031c07

@spossann
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably fixed, not sure.

Please sign in to comment.