[879] | 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" |
---|
[900] | 11 | #include "client_client_dht_template_impl.hpp" |
---|
| 12 | #include "dht_auto_indexing.hpp" |
---|
[879] | 13 | |
---|
| 14 | namespace xios { |
---|
| 15 | |
---|
| 16 | /// ////////////////////// Déclarations ////////////////////// /// |
---|
| 17 | |
---|
| 18 | class CMesh; |
---|
| 19 | |
---|
| 20 | ///-------------------------------------------------------------- |
---|
| 21 | |
---|
| 22 | /*! |
---|
| 23 | \class CMesh |
---|
| 24 | \brief CMesh class. |
---|
| 25 | */ |
---|
| 26 | class CMesh |
---|
| 27 | { |
---|
| 28 | |
---|
| 29 | public: |
---|
| 30 | |
---|
| 31 | CMesh(void); |
---|
| 32 | ~CMesh(void); |
---|
| 33 | |
---|
| 34 | int nbNodes; |
---|
| 35 | int nbEdges; |
---|
| 36 | int nbFaces; |
---|
| 37 | int nvertex; |
---|
[900] | 38 | |
---|
[879] | 39 | bool nodesAreWritten; |
---|
| 40 | bool edgesAreWritten; |
---|
| 41 | bool facesAreWritten; |
---|
| 42 | |
---|
| 43 | CArray<double, 1> node_lon; |
---|
| 44 | CArray<double, 1> node_lat; |
---|
| 45 | |
---|
| 46 | CArray<double, 1> edge_lon; |
---|
| 47 | CArray<double, 1> edge_lat; |
---|
| 48 | CArray<int, 2> edge_nodes; |
---|
| 49 | |
---|
| 50 | CArray<double, 1> face_lon; |
---|
| 51 | CArray<double, 1> face_lat; |
---|
| 52 | CArray<int, 2> face_nodes; |
---|
[900] | 53 | CArray<int, 2> face_edges; |
---|
| 54 | CArray<int, 2> edge_faces; |
---|
| 55 | CArray<int, 2> face_faces; |
---|
[879] | 56 | |
---|
| 57 | void createMesh(const CArray<double, 1>&, const CArray<double, 1>&, |
---|
| 58 | const CArray<double, 2>&, const CArray<double, 2>& ); |
---|
| 59 | |
---|
[900] | 60 | void createMeshEpsilon(const MPI_Comm&, const CArray<double, 1>&, const CArray<double, 1>&, |
---|
[879] | 61 | const CArray<double, 2>&, const CArray<double, 2>& ); |
---|
| 62 | |
---|
[881] | 63 | static CMesh* getMesh(StdString); |
---|
[879] | 64 | |
---|
[881] | 65 | private: |
---|
[879] | 66 | |
---|
[881] | 67 | static std::map <StdString, CMesh> meshList; |
---|
[900] | 68 | vector<size_t> createHashes (double, double); |
---|
[881] | 69 | |
---|
[900] | 70 | size_t nodeIndex (double, double); // redundant in parallel version with epsilon precision |
---|
| 71 | boost::unordered_map <size_t, size_t> hashed_map_nodes; // redundant in parallel version with epsilon precision |
---|
| 72 | boost::unordered_map <pair<double,double>, int> map_nodes; // redundant in parallel version with epsilon precision |
---|
| 73 | boost::unordered_map <pair<int,int>, int> map_edges; // redundant in parallel version with epsilon precision |
---|
[879] | 74 | |
---|
| 75 | }; |
---|
| 76 | |
---|
| 77 | } // namespace xios |
---|
| 78 | |
---|
| 79 | #endif //__XIOS_CMesh__ |
---|