00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef U2D_LOAD_UMESH2D_H
00025 #define U2D_LOAD_UMESH2D_H
00026
00027 #include <string>
00028 #include <stdio.h>
00029 #include <fstream>
00030 #include <iostream>
00031
00032 #include "u2d_mesh.h"
00033 #include "exceptions.h"
00034
00035 using namespace std;
00036
00037 class u2d_Load_Umesh2d {
00038 public:
00039 u2d_Load_Umesh2d(string path, string probname);
00040 ~u2d_Load_Umesh2d();
00041 u2d_Mesh *getMesh();
00042 void destoryMesh(u2d_Mesh *mesh);
00043
00044
00045 private:
00046 void open_umesh2d_file();
00047 void close_umesh2d_file();
00048 void parse_umesh2d_file();
00049 void parse_grid_size() throw (u2d_Parse_Error_Exception &);
00050 void parse_nodes_size() throw (u2d_Parse_Error_Exception &);
00051 void parse_grid();
00052 void parse_nodes();
00053 string grid_filename;
00054 string nodes_filename;
00055 ifstream grid_file;
00056 ifstream nodes_file;
00057 u2d_Mesh *mesh;
00058 int d_elem_n;
00059 int b_elem_n;
00060 int d_nodes_n;
00061 int b_nodes_n;
00062 int spatial_dim;
00063 };
00064
00065
00066
00067
00068
00069
00070
00071 #endif
00072