Skip to content

Commit

Permalink
make trimmed boundaries trimmable
Browse files Browse the repository at this point in the history
  • Loading branch information
gertjanvanzwieten committed Jan 18, 2015
1 parent 30e14a7 commit 27e7aa5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions nutils/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,9 @@ def children( self ):
return [ (ctrans,self) for ctrans in self.child_transforms ]

def subvertex( self, ichild, i ):
if i == 0:
assert ichild == 0
return self.nverts, numpy.arange(self.nverts)
n = 2**(i-1)
if self.ndims == 1:
assert 0 <= ichild < 2
Expand Down Expand Up @@ -910,7 +913,15 @@ def __init__( self, child ):
self.child = child
Reference.__init__( self, child.vertices )

def subvertex( self, ichild, i ):
if i == 0:
assert ichild == 0
return self.child.nverts, numpy.arange(self.child.nverts)
return self.child.subvertex( ichild, i-1 )

def getischeme( self, ischeme ):
if ischeme.startswith( 'vertex' ):
ischeme = 'vertex{}'.format( int(ischeme[6:])-1 )
return self.child.getischeme( ischeme )

@property
Expand Down

0 comments on commit 27e7aa5

Please sign in to comment.