コード例 #1
0
ファイル: wtree.py プロジェクト: ogiorgis/pyCGNS
 def marknode_p(self):
     node = self.getLastEntered()
     node.switchMarked()
     path = node.sidsPath()
     while path is not None:
         path = CGU.getPathAncestor(path)
         if (path not in ['/', None]):
             node = self.model().nodeFromPath('/CGNSTree' + path)
             node.switchMarked()
     self.model().updateSelected()
コード例 #2
0
 def scope(self, path):
     if path in self:
         return dict.__getitem__(self, path)
     level = 1
     while True:
         apath = CGU.getPathAncestor(path, level)
         if apath in self:
             return dict.__getitem__(self, apath)
         if apath == '/':
             return None
         level += 1
コード例 #3
0
                        pttype=CGK.PointRange_s)
    g = CGL.newGridLocation(n, value=CGK.FaceCenter_s)
    z = [z1, z2]
    return (T, b, z)


(T, b, z) = makeStTree()
TESTS.append((tag, T, diag))

#  -------------------------------------------------------------------------
tag = 'zone structured uncomplete BC and GridConnect (warning)'
diag = False
(T, b, z) = makeStTree()
pth = CGU.getAllNodesByTypeOrNameList(z[0],
                                      ['Zone_t', 'ZoneBC_t', '{BC1_1}'])[0]
CGU.removeChildByName(CGU.getNodeByPath(z[0], CGU.getPathAncestor(pth)),
                      '{BC1_1}')
pth = CGU.getAllNodesByTypeOrNameList(
    z[1], ['Zone_t', 'ZoneGridConnectivity_t', 'join2_1'])[0]
CGU.removeChildByName(CGU.getNodeByPath(z[1], CGU.getPathAncestor(pth)),
                      'join2_1')
TESTS.append((tag, T, diag))

#  -------------------------------------------------------------------------
tag = 'zone structured doubly defined BC and GridConnect (warning)'
diag = False
(T, b, z) = makeStTree()
pth = CGU.getAllNodesByTypeOrNameList(z[0], ['Zone_t', 'ZoneBC_t'])[0]
zbc = CGU.getNodeByPath(z[0], pth)
n = CGL.newBoundary(zbc,
                    '{BC1_1b}', [[5, 5], [1, 2], [1, 2]],