source: XIOS/trunk/src/node/mesh.hpp @ 879

Last change on this file since 879 was 879, checked in by oabramkina, 8 years ago

Corrected submit for UGRID.

File size: 1.6 KB
Line 
1/*!
2  \file mesh.hpp
3  \author Olga Abramkina
4  \brief Declaration of class CMesh.
5*/
6
7#ifndef __XIOS_CMesh__
8#define __XIOS_CMesh__
9 
10#include "array_new.hpp"
11
12namespace xios {
13 
14   /// ////////////////////// Déclarations ////////////////////// ///
15
16   class CMesh;
17
18   ///--------------------------------------------------------------
19
20/*!
21  \class CMesh
22  \brief CMesh class.
23*/ 
24  class CMesh
25  {
26 
27    public:
28
29      CMesh(void);
30      ~CMesh(void);
31   
32      int nbNodes;
33      int nbEdges;
34      int nbFaces;
35      int nvertex; 
36     
37      bool nodesAreWritten;
38      bool edgesAreWritten;
39      bool facesAreWritten;
40     
41      CArray<double, 1> node_lon;
42      CArray<double, 1> node_lat;
43     
44      CArray<double, 1> edge_lon;
45      CArray<double, 1> edge_lat;
46      CArray<int, 2> edge_nodes;
47
48      CArray<double, 1> face_lon;
49      CArray<double, 1> face_lat;
50      CArray<int, 2> face_nodes;
51
52      void createMesh(const CArray<double, 1>&, const CArray<double, 1>&, 
53            const CArray<double, 2>&, const CArray<double, 2>& );
54                       
55      void createMeshEpsilon(const CArray<double, 1>&, const CArray<double, 1>&, 
56            const CArray<double, 2>&, const CArray<double, 2>& );
57           
58      bool isWritten (StdString);   
59      static CMesh* getMesh;
60         
61       private:
62
63      static std::map <StdString, CMesh*> meshList;
64
65      size_t nodeIndex (double, double);     
66      boost::unordered_map <size_t, size_t> hashed_map_nodes;
67      boost::unordered_map <pair<double,double>, int> map_nodes;
68      boost::unordered_map <pair<int,int>, int> map_edges;
69
70  }; 
71
72} // namespace xios
73
74#endif //__XIOS_CMesh__
Note: See TracBrowser for help on using the repository browser.