def __init__(self, formati, inputs=None): """ Parameters ---------- formati : str the file format (e.g., 'nastran', 'cart3d') inputs : None pass for the fake gui """ self._formati = formati FakeGUIMethods.__init__(self, inputs=inputs) #ADB_IO.__init__(self) #AvusIO.__init__(self) AbaqusIO.__init__(self) BEdge_IO.__init__(self) NastranIO.__init__(self) Cart3dIO.__init__(self) #DegenGeomIO.__init__(self) FastIO.__init__(self) LaWGS_IO.__init__(self) PanairIO.__init__(self) #Plot3d_io.__init__(self) STL_IO.__init__(self) ShabpIO.__init__(self) SurfIO.__init__(self) TetgenIO.__init__(self) TecplotIO.__init__(self) Usm3dIO.__init__(self) UGRID_IO.__init__(self) #AbaqusIO.__init__(self) SU2_IO.__init__(self)
def test_bottle(): """ Tests Nastran GUI loading """ test = NastranIO() add_dummy_gui_functions(test) #test.load_panair_geometry('SWB.INP','') test.load_nastran_geometry('bottle_shell_w_holes_pmc.bdf', '') test.load_nastran_results('bottle_shell_w_holes_pmc.op2', '') keys = test.result_cases.keys() assert (1, 'Stress1', 1, 'centroid', '%.3f') in keys, keys
def test_beam_modes_01(self): dirname = bdf_filename = os.path.join(model_path, "beam_modes") bdf_filename = os.path.join(dirname, "beam_modes.dat") op2_filename = os.path.join(dirname, "beam_modes_m1.op2") test = NastranIO() test.is_nodal = False test.is_centroidal = True add_dummy_gui_functions(test) test.load_nastran_geometry(bdf_filename, None) # test.load_nastran_results(op2_filename, None) test.load_nastran_geometry(bdf_filename, dirname) # test.load_nastran_results(op2_filename, dirname) with self.assertRaises(IOError): test.load_nastran_geometry(bdf_filename, "")
def test_fsi(self): bdf_filename = os.path.join(model_path, "fsi", "fsi.bdf") op2_filename = os.path.join(model_path, "fsi", "fsi.op2") test = NastranIO() test.is_nodal = False test.is_centroidal = True add_dummy_gui_functions(test) test.load_nastran_geometry(bdf_filename, None) test.load_nastran_results(op2_filename, None)
def test_solid_shell_bar_03(self): bdf_filename = os.path.join(model_path, "sol_101_elements", "static_solid_comp_bar.bdf") op2_filename = os.path.join(model_path, "sol_101_elements", "static_solid_comp_bar.op2") test = NastranIO() test.is_nodal = False test.is_centroidal = True add_dummy_gui_functions(test) test.load_nastran_geometry(bdf_filename, None) test.load_nastran_results(op2_filename, None)
def test_bottle(): """ Tests Nastran GUI loading """ test = NastranIO() test.is_nodal = False test.is_centroidal = True add_dummy_gui_functions(test) # test.load_panair_geometry('SWB.INP','') test.load_nastran_geometry("bottle_shell_w_holes_pmc.bdf", "") test.load_nastran_results("bottle_shell_w_holes_pmc.op2", "") keys = test.resultCases.keys() assert (1, "Stress1", 1, "centroid", "%.3f") in keys, keys
def __init__(self, inputs=None): GUIMethods.__init__(self, inputs=inputs) NastranIO.__init__(self)
def __init__(self): GUIMethods.__init__(self) NastranIO.__init__(self)