def test3(self): instance = QGmodelInterface() instance.initialize_code() instance.commit_parameters() psi, err = instance.get_psi1_state(1, 1, 1) self.assertEqual(psi, 0.) Nx, err = instance.get_Nx() Ny, err = instance.get_Ny() psi, err = instance.get_psi1_state(Nx, Ny, 1) self.assertEqual(psi, 0.) instance.stop()
def test2(self): instance = QGmodelInterface() instance.initialize_code() err = instance.set_Lx(100.) err = instance.set_dx(1) err = instance.set_Ly(1000.) err = instance.set_dy(20) instance.commit_parameters() Nx, err = instance.get_Nx() self.assertEquals(Nx, 101) Ny, err = instance.get_Ny() self.assertEquals(Ny, 51) instance.stop()
def test5(self): instance = QGmodelInterface() instance.initialize_code() instance.commit_parameters() Nx, err = instance.get_Nx() Ny, err = instance.get_Ny() Nm, err = instance.get_Nm() minx, maxx, miny, maxy, minz, maxz, err = instance.get_index_range_inclusive( ) self.assertEqual(minx, 1) self.assertEqual(miny, 1) self.assertEqual(minz, 1) self.assertEqual(maxx, Nx) self.assertEqual(maxy, Ny) self.assertEqual(maxz, Nm) instance.stop()