/[escript]/trunk/ripley/src/Rectangle.cpp
ViewVC logotype

Diff of /trunk/ripley/src/Rectangle.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4002 by caltinay, Fri Sep 28 00:16:56 2012 UTC revision 4010 by caltinay, Tue Oct 2 06:57:11 2012 UTC
# Line 50  Rectangle::Rectangle(int n0, int n1, dou Line 50  Rectangle::Rectangle(int n0, int n1, dou
50      // ratio as the number of elements      // ratio as the number of elements
51      if (d0<=0 && d1<=0) {      if (d0<=0 && d1<=0) {
52          warn=true;          warn=true;
53          d0=(int)(sqrt(m_mpiInfo->size*(n0+1)/(float)(n1+1)));          d0=max(1, (int)(sqrt(m_mpiInfo->size*(n0+1)/(float)(n1+1))));
54          d1=m_mpiInfo->size/d0;          d1=m_mpiInfo->size/d0;
55          if (d0*d1 != m_mpiInfo->size) {          if (d0*d1 != m_mpiInfo->size) {
56              // ratios not the same so subdivide side with more elements only              // ratios not the same so subdivide side with more elements only

Legend:
Removed from v.4002  
changed lines
  Added in v.4010

  ViewVC Help
Powered by ViewVC 1.1.26