Changeset 1146 for XIOS/dev/branch_yushan_merged/extern/remap/src
- Timestamp:
- 05/24/17 16:59:40 (7 years ago)
- Location:
- XIOS/dev/branch_yushan_merged/extern/remap/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/extern/remap/src/clipper.cpp
r919 r1146 1047 1047 1048 1048 //create a new edge array ... 1049 TEdge *edges = new TEdge [highI+1];1049 TEdge *edges = new TEdge[highI+1]; 1050 1050 1051 1051 bool IsFlat = true; … … 4274 4274 { 4275 4275 //The equation of a line in general form (Ax + By + C = 0) 4276 //given 2 points (x ¹,y¹) & (x²,y²) is ...4277 //(y ¹ - y²)x + (x² - x¹)y + (y² - y¹)x¹ - (x² - x¹)y¹= 04278 //A = (y ¹ - y²); B = (x² - x¹); C = (y² - y¹)x¹ - (x² - x¹)y¹4279 //perpendicular distance of point (x ³,y³) = (Ax³ + By³ + C)/Sqrt(A² + B²)4276 //given 2 points (x,y) & (x,y) is ... 4277 //(y - y)x + (x - x)y + (y - y)x - (x - x)y = 0 4278 //A = (y - y); B = (x - x); C = (y - y)x - (x - x)y 4279 //perpendicular distance of point (x,y) = (Ax + By + C)/Sqrt(A + B) 4280 4280 //see http://en.wikipedia.org/wiki/Perpendicular_distance 4281 4281 double A = double(ln1.Y - ln2.Y); -
XIOS/dev/branch_yushan_merged/extern/remap/src/mapper.cpp
r1141 r1146 548 548 } 549 549 550 MPI_Waitall(nbSendRequest, sendRequest, status); 550 551 MPI_Waitall(nbRecvRequest, recvRequest, status); 551 MPI_Waitall(nbSendRequest, sendRequest, status);552 552 553 553 for (int rank = 0; rank < mpiSize; rank++) … … 620 620 } 621 621 622 MPI_Waitall(nbSendRequest, sendRequest, status); 622 623 MPI_Waitall(nbRecvRequest, recvRequest, status); 623 MPI_Waitall(nbSendRequest, sendRequest, status); 624 624 625 625 int nbNeighbourNodes = 0; 626 626 for (int rank = 0; rank < mpiSize; rank++) … … 803 803 } 804 804 } 805 805 806 MPI_Waitall(nbSendRequest, sendRequest, status); 806 807 MPI_Waitall(nbRecvRequest, recvRequest, status); 807 MPI_Waitall(nbSendRequest, sendRequest, status);808 808 809 char **sendBuffer2 = new char*[mpiSize]; 809 810 char **recvBuffer2 = new char*[mpiSize]; … … 886 887 } 887 888 } 888 889 890 MPI_Waitall(nbSendRequest, sendRequest, status); 889 891 MPI_Waitall(nbRecvRequest, recvRequest, status); 890 MPI_Waitall(nbSendRequest, sendRequest, status);892 891 893 892 894 delete [] sendRequest; -
XIOS/dev/branch_yushan_merged/extern/remap/src/timerRemap.cpp
r694 r1146 9 9 using namespace std; 10 10 11 map<string,CTimer*> CTimer::allTimer;11 map<string,CTimer*> *CTimer::allTimer = 0; 12 12 13 13 CTimer::CTimer(const string& name_) : name(name_) … … 55 55 CTimer& CTimer::get(const string name) 56 56 { 57 if(allTimer == 0) allTimer = new map<string,CTimer*>; 57 58 map<string,CTimer*>::iterator it; 58 it= allTimer.find(name);59 if (it== allTimer.end()) it=allTimer.insert(pair<string,CTimer*>(name,new CTimer(name))).first;59 it=(*allTimer).find(name); 60 if (it==(*allTimer).end()) it=(*allTimer).insert(pair<string,CTimer*>(name,new CTimer(name))).first; 60 61 return *(it->second); 61 62 } -
XIOS/dev/branch_yushan_merged/extern/remap/src/timerRemap.hpp
r694 r1146 26 26 double getCumulatedTime(void); 27 27 void print(void); 28 static map<string,CTimer*> allTimer; 28 //static map<string,CTimer*> allTimer; 29 static map<string,CTimer*> *allTimer; 30 #pragma omp threadprivate(allTimer) 31 29 32 static double getTime(void); 30 33 static CTimer& get(string name);
Note: See TracChangeset
for help on using the changeset viewer.