Skip to content

Commit

Permalink
implement evalf_iadd for Inflate
Browse files Browse the repository at this point in the history
This patch implements `evalf_iadd` for `Inflate`.
  • Loading branch information
joostvanzwieten committed Mar 14, 2024
1 parent 6d30a9b commit c9623e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nutils/evaluable.py
Original file line number Diff line number Diff line change
Expand Up @@ -3025,6 +3025,9 @@ def evalf(self, array, indices, length):
numpy.add.at(inflated, self._indices_head + (indices,), array)
return inflated

def evalf_iadd(self, output, array, indices, length):
numpy.add.at(output, self._indices_head + (indices,), array)

def _inflate(self, dofmap, length, axis):
if dofmap.ndim == 0 and dofmap == self.dofmap and length == self.length:
return diagonalize(self, -1, axis)
Expand Down

0 comments on commit c9623e6

Please sign in to comment.