Hermes2D  2.0
mesh_reader_h2d.h
1 // This file is part of Hermes2D
2 //
3 // Hermes2D is free software; you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation; either version 2 of the License, or
6 // (at your option) any later version.
7 //
8 // Hermes2D is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with Hermes2D; if not, see <http://www.gnu.prg/licenses/>.
15 
16 #ifndef _MESH_READER_H2D_H_
17 #define _MESH_READER_H2D_H_
18 
19 #include "mesh_reader.h"
20 #include "mesh_data.h"
21 
22 namespace Hermes
23 {
24  namespace Hermes2D
25  {
41  class HERMES_API MeshReaderH2D : public MeshReader
42  {
43  public:
44  MeshReaderH2D();
45  virtual ~MeshReaderH2D();
46 
47  virtual bool load(const char *filename, Mesh *mesh);
48  virtual bool save(const char *filename, Mesh *mesh);
49 
50  protected:
51  Nurbs* load_nurbs(Mesh *mesh, MeshData *m, int id, Node** en, int &p1, int &p2);
52 
53  void save_refinements(Mesh *mesh, FILE* f, Element* e, int id, bool& first);
54  void save_nurbs(Mesh *mesh, FILE* f, int p1, int p2, Nurbs* nurbs);
55  };
56  }
57 }
58 #endif