[MOAB-dev] commit/MOAB: iulian07: zoltan partition for gcrm

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed May 7 09:20:06 CDT 2014


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/1de4a4102553/
Changeset:   1de4a4102553
Branch:      master
User:        iulian07
Date:        2014-05-07 16:18:50
Summary:     zoltan partition for gcrm

reversed lat and lon in computing cartesian coords of cell centers
now it works fine

Affected #:  1 file

diff --git a/src/io/NCHelperGCRM.cpp b/src/io/NCHelperGCRM.cpp
index d420f33..7229aeb 100644
--- a/src/io/NCHelperGCRM.cpp
+++ b/src/io/NCHelperGCRM.cpp
@@ -885,13 +885,13 @@ ErrorCode NCHelperGCRM::redistribute_local_cells(int start_cell_idx)
     std::vector<double> zCell(nLocalCells);
     // convert to xyz cartesian coordinates
 
-    double rad=8000; // this is just approx
+    double rad=8000; // this is just approx x is lat, y is lon
     for (int i=0; i<nLocalCells; i++)
     {
-      double cosphi = cos(yCell[i]);
-      double zmult = sin(yCell[i]);
-      double xmult = cosphi * cos(xCell[i]);
-      double ymult = cosphi * sin(xCell[i]);
+      double cosphi = cos(xCell[i]);
+      double zmult = sin(xCell[i]);
+      double xmult = cosphi * cos(yCell[i]);
+      double ymult = cosphi * sin(yCell[i]);
       xCell[i] = rad * xmult;
       yCell[i] = rad * ymult;
       zCell[i] = rad * zmult;

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list