def test_ezgkdef_fmem_YY_ezgxprm_supergrid(self): gp1 = self.getGridParams_ZEYY(0) gp2 = self.getGridParams_ZEYY(1) gid1 = rmn.ezgdef_fmem(gp1['ni'],gp1['nj'],gp1['grtyp'],gp1['grref'], gp1['ig1ref'],gp1['ig2ref'],gp1['ig3ref'],gp1['ig4ref'], gp1['ax'],gp1['ay']) gid2 = rmn.ezgdef_fmem(gp2['ni'],gp2['nj'],gp2['grtyp'],gp2['grref'], gp2['ig1ref'],gp2['ig2ref'],gp2['ig3ref'],gp2['ig4ref'], gp2['ax'],gp2['ay']) self.assertTrue(gid1>=0) self.assertTrue(gid2>=0) subgridid = [gid1,gid2] gp12 = { 'ni' : gp1['ni'], 'nj' : 2*gp1['nj'], 'grtyp' : 'U', 'grref' : 'F', 'vercode' : 1 } gid12 = rmn.ezgdef_supergrid(gp12['ni'],gp12['nj'], gp12['grtyp'],gp12['grref'], gp12['vercode'],subgridid) self.assertTrue(gid12>=0) ng = rmn.ezget_nsubgrids(gid12) self.assertEqual(ng,2) subgid = rmn.ezget_subgridids(gid12) self.assertEqual(len(subgid),2) self.assertEqual(subgid[0],gid1) self.assertEqual(subgid[1],gid2)
def test_ezqkdef_1subgrid(self): gp = self.getGridParams_L() gid1 = rmn.ezqkdef(gp) self.assertTrue(gid1>=0) ng = rmn.ezget_nsubgrids(gid1) self.assertEqual(ng,1) subgid = rmn.ezget_subgridids(gid1) self.assertEqual(subgid,[gid1]) rmn.gdrls(gid1)