def read(filename, file_format=None):
<EOL>assert isinstance(filename, str)<EOL>if not file_format:<EOL><INDENT>file_format = _filetype_from_filename(filename)<EOL><DEDENT>format_to_reader = {<EOL>"<STR_LIT>": ansys_io,<EOL>"<STR_LIT>": ansys_io,<EOL>"<STR_LIT>": ansys_io,<EOL>"<STR_LIT>": msh_io,<EOL>"<STR_LIT>": msh_io,<EOL>"<STR_LIT>": msh_io,<EOL>"<STR_LIT>": msh_io,<EOL>"<STR_LIT>": msh_io,<EOL>"<STR_LIT>": msh_io,<EOL>"<STR_LIT>": msh_io,<EOL>"<STR_LIT>": msh_io,<EOL>"<STR_LIT>": msh_io,<EOL>"<STR_LIT>": med_io,<EOL>"<STR_LIT>": medit_io,<EOL>"<STR_LIT>": dolfin_io,<EOL>"<STR_LIT>": permas_io,<EOL>"<STR_LIT>": h5m_io,<EOL>"<STR_LIT>": off_io,<EOL>"<STR_LIT>": stl_io,<EOL>"<STR_LIT>": stl_io,<EOL>"<STR_LIT>": stl_io,<EOL>"<STR_LIT>": vtu_io,<EOL>"<STR_LIT>": vtu_io,<EOL>"<STR_LIT>": vtk_io,<EOL>"<STR_LIT>": vtk_io,<EOL>"<STR_LIT>": xdmf_io,<EOL>"<STR_LIT>": exodus_io,<EOL>"<STR_LIT>": abaqus_io,<EOL>"<STR_LIT>": mdpa_io,<EOL>}<EOL>assert file_format in format_to_reader, "<STR_LIT>".format(<EOL>file_format, filename<EOL>)<EOL>return format_to_reader[file_format].read(filename)<EOL>
Reads an unstructured mesh with added data.

    :param filenames: The files to read from.
    :type filenames: str

    :returns mesh{2,3}d: The mesh data.