def test_make_plot(self, mock): h = Hgrid(self.nodes, self.elements) h.make_plot( show=True, extent=[0, 1, 0, 1], title='test', cbar_label='elevation [m]', vmax=0. ) self.assertIsInstance(h, Hgrid)
def test_make_plot_wet_only(self): nodes = { 0: ((0., 0.), 0.), 1: ((1., 0.), -1.), 2: ((1., 1.), -2.), 3: ((0., 1.), -3.), 4: ((0.5, 1.5), -4.), } elements = { 0: [2, 4, 3], 1: [0, 1, 2, 3], } h = Hgrid(nodes, elements) h.make_plot() self.assertIsInstance(h, Hgrid)
def test_make_plot_flat_domain(self): nodes = {id: (coord, 0.) for id, (coord, _) in self.nodes.items()} h = Hgrid(nodes, self.elements, self.boundaries) h.make_plot()