Hermes2D  2.0
mesh_reader.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 _MESHLOADER_H_
17 #define _MESHLOADER_H_
18 
19 #include "mesh.h"
20 
21 namespace Hermes
22 {
23  namespace Hermes2D
24  {
29 
30 
31 
32  class HERMES_API MeshReader : public Hermes::Mixins::Loggable
33  {
34  public:
35  virtual ~MeshReader() { }
36 
40  virtual bool load(const char *filename, Mesh *mesg) = 0;
41 
42  protected:
43  static bool is_twin_nurbs(Element* e, int i)
44  {
45  // on internal edges, where there are two Nurbs', we only save one of them
46  return e->cm->nurbs[i]->twin && e->en[i]->ref == 2;
47  }
48  };
49  }
50 }
51 #endif