Пример #1
0
    def test_ugrid3d_gui_box(self):
        """simple UGRID3D box model"""
        ugrid_filename = os.path.join(UGRID_PATH, 'box.b8.ugrid')
        log = get_logger(level='warning')
        tecplot_filename2 = os.path.join(UGRID_PATH, 'box.plt')

        ugrid_model = read_ugrid(ugrid_filename, log=log)
        tecplot = ugrid3d_to_tecplot_filename(ugrid_filename, tecplot_filename2)
        tecplot = ugrid_to_tecplot(ugrid_filename)
        tecplot = ugrid_to_tecplot(ugrid_model)
        tecplot.write_tecplot(tecplot_filename2, res_types=None,
                              is_points=True,
                              adjust_nids=True)
        assert os.path.exists(tecplot_filename2), tecplot_filename2
Пример #2
0
    def test_tecplot_box(self):
        """simple UGRID3D box model"""
        ugrid_filename = os.path.join(UGRID_PATH, 'box.b8.ugrid')
        #log = get_logger(level='warning')
        log = None
        tecplot_filename2 = os.path.join(TECPLOT_PATH, 'box.plt')

        ugrid_model = read_ugrid(ugrid_filename, log=log)
        tecplot = ugrid3d_to_tecplot_filename(ugrid_filename, tecplot_filename2)
        tecplot.write_tecplot(tecplot_filename2, res_types=None,
                              is_points=True,
                              adjust_nids=True)

        test = TecplotGUI()
        tecplot_filename = os.path.join(TECPLOT_PATH, 'models', 'ascii', 'point_fetri_2d_02.dat')
        test.on_load_geometry(tecplot_filename, geometry_format='tecplot', raise_error=True)
Пример #3
0
    def test_ugrid3d_gui_box(self):
        """simple UGRID3D box model"""
        ugrid_filename = os.path.join(UGRID_PATH, 'box.b8.ugrid')
        log = get_logger(level='warning')
        tecplot_filename2 = os.path.join(UGRID_PATH, 'box.plt')
        tecplot_filename3 = os.path.join(UGRID_PATH, 'slice.plt')

        ugrid_model = read_ugrid(ugrid_filename, log=log)
        tecplot = ugrid3d_to_tecplot_filename(ugrid_filename, tecplot_filename2, log=log)
        tecplot, unused_zone = ugrid_to_tecplot(ugrid_filename, log=log)
        tecplot, unused_zone = ugrid_to_tecplot(ugrid_model, log=log)
        tecplot.write_tecplot(tecplot_filename2, res_types=None,
                              adjust_nids=True)
        assert os.path.exists(tecplot_filename2), tecplot_filename2

        argv = ['format_converter', 'ugrid', ugrid_filename, 'tecplot', tecplot_filename3, '-z 0.0']
        cmd_line_format_converter(argv=argv, quiet=True)
        os.remove(tecplot_filename2)
        os.remove(tecplot_filename3)