Changeset 1639 for XIOS/trunk/src/node/mesh.cpp
- Timestamp:
- 01/22/19 16:43:32 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/mesh.cpp
r1638 r1639 414 414 * \param [in] bounds_lat Array of boundary latitudes. Its size depends on the element type. 415 415 */ 416 void CMesh::createMeshEpsilon(const ep_lib::MPI_Comm& comm,416 void CMesh::createMeshEpsilon(const MPI_Comm& comm, 417 417 const CArray<double, 1>& lonvalue, const CArray<double, 1>& latvalue, 418 418 const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat) … … 421 421 int nvertex = (bounds_lon.numElements() == 0) ? 1 : bounds_lon.rows(); 422 422 int mpiRank, mpiSize; 423 ep_lib::MPI_Comm_rank(comm, &mpiRank);424 ep_lib::MPI_Comm_size(comm, &mpiSize);423 MPI_Comm_rank(comm, &mpiRank); 424 MPI_Comm_size(comm, &mpiSize); 425 425 double prec = 1e-11; // used in calculations of edge_lon/lat 426 426 … … 460 460 unsigned long nbEdgesOnProc = nbEdges_; 461 461 unsigned long nbEdgesAccum; 462 ep_lib::MPI_Scan(&nbEdgesOnProc, &nbEdgesAccum, 1, EP_UNSIGNED_LONG, EP_SUM, comm);462 MPI_Scan(&nbEdgesOnProc, &nbEdgesAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 463 463 nbEdgesAccum -= nbEdges_; 464 464 … … 590 590 unsigned long nodeCount = nodeIdx2Idx.size(); 591 591 unsigned long nodeStart, nbNodes; 592 ep_lib::MPI_Scan(&nodeCount, &nodeStart, 1, EP_UNSIGNED_LONG, EP_SUM, comm);592 MPI_Scan(&nodeCount, &nodeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 593 593 int nNodes = nodeStart; 594 ep_lib::MPI_Bcast(&nNodes, 1, EP_UNSIGNED_LONG, mpiSize-1, comm);594 MPI_Bcast(&nNodes, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm); 595 595 nbNodesGlo = nNodes; 596 596 … … 683 683 unsigned long nbFacesOnProc = nbFaces_; 684 684 unsigned long nbFacesAccum; 685 ep_lib::MPI_Scan(&nbFacesOnProc, &nbFacesAccum, 1, EP_UNSIGNED_LONG, EP_SUM, comm);685 MPI_Scan(&nbFacesOnProc, &nbFacesAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 686 686 nbFacesAccum -= nbFaces_; 687 687 … … 807 807 808 808 unsigned long edgeStart, nbEdges; 809 ep_lib::MPI_Scan(&edgeCount, &edgeStart, 1, EP_UNSIGNED_LONG, EP_SUM, comm);809 MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 810 810 int nEdges = edgeStart; 811 ep_lib::MPI_Bcast(&nEdges, 1, EP_UNSIGNED_LONG, mpiSize-1, comm);811 MPI_Bcast(&nEdges, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm); 812 812 nbEdgesGlo = nEdges; 813 813 … … 1028 1028 unsigned long edgeCount = edgeIdx2Idx.size(); 1029 1029 unsigned long edgeStart, nbEdges; 1030 ep_lib::MPI_Scan(&edgeCount, &edgeStart, 1, EP_UNSIGNED_LONG, EP_SUM, comm);1030 MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 1031 1031 int nEdges = edgeStart; 1032 ep_lib::MPI_Bcast(&nEdges, 1, EP_UNSIGNED_LONG, mpiSize-1, comm);1032 MPI_Bcast(&nEdges, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm); 1033 1033 nbEdgesGlo = nEdges; 1034 1034 … … 1298 1298 unsigned long nodeCount = nodeIdx2Idx.size(); 1299 1299 unsigned long nodeStart, nbNodes; 1300 ep_lib::MPI_Scan(&nodeCount, &nodeStart, 1, EP_UNSIGNED_LONG, EP_SUM, comm);1300 MPI_Scan(&nodeCount, &nodeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 1301 1301 int nNodes = nodeStart; 1302 ep_lib::MPI_Bcast(&nNodes, 1, EP_UNSIGNED_LONG, mpiSize-1, comm);1302 MPI_Bcast(&nNodes, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm); 1303 1303 nbNodesGlo = nNodes; 1304 1304 … … 1418 1418 unsigned long edgeCount = edgeIdx2Idx.size(); 1419 1419 unsigned long edgeStart, nbEdges; 1420 ep_lib::MPI_Scan(&edgeCount, &edgeStart, 1, EP_UNSIGNED_LONG, EP_SUM, comm);1420 MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 1421 1421 int nEdges = edgeStart; 1422 ep_lib::MPI_Bcast(&nEdges, 1, EP_UNSIGNED_LONG, mpiSize-1, comm);1422 MPI_Bcast(&nEdges, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm); 1423 1423 nbEdgesGlo = nEdges; 1424 1424 … … 1614 1614 */ 1615 1615 1616 void CMesh::getGloNghbFacesNodeType(const ep_lib::MPI_Comm& comm, const CArray<int, 1>& face_idx,1616 void CMesh::getGloNghbFacesNodeType(const MPI_Comm& comm, const CArray<int, 1>& face_idx, 1617 1617 const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat, 1618 1618 CArray<int, 2>& nghbFaces) … … 1623 1623 1624 1624 int mpiRank, mpiSize; 1625 ep_lib::MPI_Comm_rank(comm, &mpiRank);1626 ep_lib::MPI_Comm_size(comm, &mpiSize);1625 MPI_Comm_rank(comm, &mpiRank); 1626 MPI_Comm_size(comm, &mpiSize); 1627 1627 1628 1628 // (1) Generating unique node indexes … … 1770 1770 */ 1771 1771 1772 void CMesh::getGloNghbFacesEdgeType(const ep_lib::MPI_Comm& comm, const CArray<int, 1>& face_idx,1772 void CMesh::getGloNghbFacesEdgeType(const MPI_Comm& comm, const CArray<int, 1>& face_idx, 1773 1773 const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat, 1774 1774 CArray<int, 2>& nghbFaces) … … 1779 1779 1780 1780 int mpiRank, mpiSize; 1781 ep_lib::MPI_Comm_rank(comm, &mpiRank);1782 ep_lib::MPI_Comm_size(comm, &mpiSize);1781 MPI_Comm_rank(comm, &mpiRank); 1782 MPI_Comm_size(comm, &mpiSize); 1783 1783 1784 1784 // (1) Generating unique node indexes … … 1951 1951 */ 1952 1952 1953 void CMesh::getGlobalNghbFaces(const int nghbType, const ep_lib::MPI_Comm& comm,1953 void CMesh::getGlobalNghbFaces(const int nghbType, const MPI_Comm& comm, 1954 1954 const CArray<int, 1>& face_idx, 1955 1955 const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat,
Note: See TracChangeset
for help on using the changeset viewer.