* further details.
*
*
- * @sect3{Supported input formats}
+ * <h3>Supported input formats</h3>
*
* At present, the following input formats are supported:
* <ul>
* </ul>
*
*
- * @sect3{Structure of input grid data. The GridReordering class}
+ * <h3>Structure of input grid data. The GridReordering class</h3>
*
* It is your duty to use a correct numbering of vertices in the cell
* list, i.e. for lines in 1d, you have to first give the vertex with
/**
* Open the file given by the
* string and call the previous
- * function read().
+ * function read(). This function
+ * uses the PathSearch mechanism
+ * to find files. The file class
+ * used is <code>MESH</code>.
*/
void read (const std::string&, Format format=Default);
//
//---------------------------------------------------------------------------
+#include <base/path_search.h>
#include <grid/grid_in.h>
#include <grid/tria.h>
void GridIn<dim>::read (const std::string& filename,
Format format)
{
- std::ifstream in(filename.c_str());
-
- Assert (in.is_open(), ExcFileNotOpen(filename.c_str()));
-
-//TODO:[GK] Do we really need the following, which does not compile with gcc 2.95?
-// if (!in)
-// {
-// std::ios_base::iostate state = in.rdstate();
-// std::cerr << "File open, but error " << state << std::endl;
-// exit(1);
-// }
-
+ PathSearch search("MESH");
+ std::istream& in = search.open(filename.c_str());
read(in, format);
- in.close();
}