00001 #ifndef NASFILEIMPORTER_H
00002 #define NASFILEIMPORTER_H
00003
00004 #include <vector>
00005
00006 #include "MeshFileImporter.h"
00007
00008 namespace MeshRead
00009 {
00010
00011 class NasFileImporter
00012 : public MeshFileImporter
00013 {
00014 public:
00015 NasFileImporter();
00016 NasFileImporter(const std::string & file_name);
00017
00020 bool Init(const std::string & file_name);
00021
00024 bool Init();
00025
00026 bool doRead(hHybridMesh * mesh);
00027
00030 int GetCoordinatesDimension() const ;
00031
00034 int GetVerticesCount() ;
00035
00039 bool GetNextVertex(double coords[]) ;
00040
00043 void GetElementCount(int element_type[]) ;
00044
00050 bool GetNextElement(Tind vertices[], Tind neighbours[], Tind faces[], Tind & element_type , Tind & father, int8_t & material, int8_t & ref) ;
00051
00058 bool GetBoundaryConditions(double ** bc, int & bcCount) ;
00059
00060 bool LineParse(char const* str, std::vector<double>& v);
00061 bool VertexLineParse(char const* str, std::vector<double>& v);
00062
00063
00064 void GetFacesCount(int type_count[]);
00065 bool GetNextFace(Tind edges[],Tind & face_type, int8_t & bc, Tind neigh[]);
00066
00067
00068 protected:
00069 int _face_count,
00070 _face_readed,
00071 _edge_count,
00072 _edge_readed,
00073 _quads,
00074 _prisms;
00075
00076
00077 };
00078
00079 }
00080
00081 #endif // NASFILEIMPORTER_H