Changeset 1134 for XIOS/dev/branch_yushan_merged/src/node/mesh.cpp
- Timestamp:
- 05/16/17 17:54:30 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/src/node/mesh.cpp
r1002 r1134 34 34 std::map <StdString, vector<int> > CMesh::domainList = std::map <StdString, vector<int> >(); 35 35 36 std::map <StdString, CMesh> *CMesh::meshList_ptr = 0; 37 std::map <StdString, vector<int> > *CMesh::domainList_ptr = 0; 38 39 36 40 ///--------------------------------------------------------------- 37 41 /*! … … 41 45 * \param [in] nvertex Number of verteces (1 for nodes, 2 for edges, 3 and up for faces). 42 46 */ 47 48 /* bkp 43 49 CMesh* CMesh::getMesh (StdString meshName, int nvertex) 44 50 { … … 64 70 CMesh::meshList.insert( make_pair(meshName, newMesh) ); 65 71 return &meshList[meshName]; 72 } 73 } 74 */ 75 76 CMesh* CMesh::getMesh (StdString meshName, int nvertex) 77 { 78 if(CMesh::domainList_ptr == NULL) CMesh::domainList_ptr = new std::map <StdString, vector<int> >(); 79 if(CMesh::meshList_ptr == NULL) CMesh::meshList_ptr = new std::map <StdString, CMesh>(); 80 81 (*CMesh::domainList_ptr)[meshName].push_back(nvertex); 82 83 if ( (*CMesh::meshList_ptr).begin() != (*CMesh::meshList_ptr).end() ) 84 { 85 for (std::map<StdString, CMesh>::iterator it=(*CMesh::meshList_ptr).begin(); it!=(*CMesh::meshList_ptr).end(); ++it) 86 { 87 if (it->first == meshName) 88 return &((*CMesh::meshList_ptr)[meshName]); 89 else 90 { 91 CMesh newMesh; 92 (*CMesh::meshList_ptr).insert( make_pair(meshName, newMesh) ); 93 return &((*CMesh::meshList_ptr)[meshName]); 94 } 95 } 96 } 97 else 98 { 99 CMesh newMesh; 100 (*CMesh::meshList_ptr).insert( make_pair(meshName, newMesh) ); 101 return &((*CMesh::meshList_ptr)[meshName]); 66 102 } 67 103 } … … 488 524 * \param [in] bounds_lat Array of boundary latitudes. Its size depends on the element type. 489 525 */ 490 void CMesh::createMeshEpsilon(const MPI_Comm& comm,526 void CMesh::createMeshEpsilon(const ep_lib::MPI_Comm& comm, 491 527 const CArray<double, 1>& lonvalue, const CArray<double, 1>& latvalue, 492 528 const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat) … … 1688 1724 */ 1689 1725 1690 void CMesh::getGloNghbFacesNodeType(const MPI_Comm& comm, const CArray<int, 1>& face_idx,1726 void CMesh::getGloNghbFacesNodeType(const ep_lib::MPI_Comm& comm, const CArray<int, 1>& face_idx, 1691 1727 const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat, 1692 1728 CArray<int, 2>& nghbFaces) … … 1844 1880 */ 1845 1881 1846 void CMesh::getGloNghbFacesEdgeType(const MPI_Comm& comm, const CArray<int, 1>& face_idx,1882 void CMesh::getGloNghbFacesEdgeType(const ep_lib::MPI_Comm& comm, const CArray<int, 1>& face_idx, 1847 1883 const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat, 1848 1884 CArray<int, 2>& nghbFaces) … … 2025 2061 */ 2026 2062 2027 void CMesh::getGlobalNghbFaces(const int nghbType, const MPI_Comm& comm,2063 void CMesh::getGlobalNghbFaces(const int nghbType, const ep_lib::MPI_Comm& comm, 2028 2064 const CArray<int, 1>& face_idx, 2029 2065 const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
Note: See TracChangeset
for help on using the changeset viewer.