Skip to content

Commit

Permalink
fix ischemes without weights for MultiSimplexReference
Browse files Browse the repository at this point in the history
  • Loading branch information
gertjanvanzwieten committed Mar 4, 2015
1 parent 1af3db3 commit 25dce73
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nutils/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,11 +1073,13 @@ def getischeme( self, ischeme ):
simplex = SimplexReference( self.ndims )
points, weights = simplex.getischeme( ischeme )
allcoords = numpy.empty( (len(self.__transforms),)+points.shape, dtype=float )
allweights = numpy.empty( (len(self.__transforms),)+weights.shape, dtype=float )
if weights is not None:
allweights = numpy.empty( (len(self.__transforms),)+weights.shape, dtype=float )
for i, trans in enumerate( self.__transforms ):
allcoords[i] = trans.apply(points)
allweights[i] = weights * abs(float(trans.det))
return allcoords.reshape(-1,self.ndims), allweights.ravel()
if weights is not None:
allweights[i] = weights * abs(float(trans.det))
return allcoords.reshape(-1,self.ndims), allweights.ravel() if weights is not None else None


# SHAPE FUNCTIONS
Expand Down

0 comments on commit 25dce73

Please sign in to comment.