/[escript]/branches/ripleygmg_from_3668/ripley/src/Rectangle.cpp
ViewVC logotype

Diff of /branches/ripleygmg_from_3668/ripley/src/Rectangle.cpp

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

revision 3745 by caltinay, Tue Dec 13 06:41:54 2011 UTC revision 3746 by caltinay, Thu Dec 15 00:02:22 2011 UTC
# Line 227  const int* Rectangle::borrowSampleRefere Line 227  const int* Rectangle::borrowSampleRefere
227      switch (fsType) {      switch (fsType) {
228          case Nodes:          case Nodes:
229              return &m_nodeId[0];              return &m_nodeId[0];
         case DegreesOfFreedom:  
         case ReducedDegreesOfFreedom: //FIXME: reduced  
             return &m_dofId[0];  
230          case Elements:          case Elements:
231          case ReducedElements:          case ReducedElements:
232              return &m_elementId[0];              return &m_elementId[0];
# Line 972  pair<double,double> Rectangle::getFirstC Line 969  pair<double,double> Rectangle::getFirstC
969  }  }
970    
971  //protected  //protected
 dim_t Rectangle::getNumDOF() const  
 {  
     return m_nodeDistribution[m_mpiInfo->rank+1]  
         -m_nodeDistribution[m_mpiInfo->rank];  
 }  
   
 //protected  
972  dim_t Rectangle::getNumFaceElements() const  dim_t Rectangle::getNumFaceElements() const
973  {  {
974      const IndexVector faces = getNumFacesPerBoundary();      const IndexVector faces = getNumFacesPerBoundary();
# Line 1037  void Rectangle::populateSampleIds() Line 1027  void Rectangle::populateSampleIds()
1027      }      }
1028      m_nodeDistribution[m_mpiInfo->size]=getNumDataPointsGlobal();      m_nodeDistribution[m_mpiInfo->size]=getNumDataPointsGlobal();
1029    
     m_dofId.resize(getNumDOF());  
1030      m_nodeId.resize(getNumNodes());      m_nodeId.resize(getNumNodes());
1031    
1032      // the bottom row and left column are not owned by this rank so the      // the bottom row and left column are not owned by this rank so the
# Line 1075  void Rectangle::populateSampleIds() Line 1064  void Rectangle::populateSampleIds()
1064  #pragma omp parallel for  #pragma omp parallel for
1065      for (dim_t i1=bottom; i1<m_N1; i1++) {      for (dim_t i1=bottom; i1<m_N1; i1++) {
1066          for (dim_t i0=left; i0<m_N0; i0++) {          for (dim_t i0=left; i0<m_N0; i0++) {
1067              const index_t idx=i0-left+(i1-bottom)*(m_N0-left);              m_nodeId[i0+i1*m_N0] = firstId+i0-left+(i1-bottom)*(m_N0-left);
             m_nodeId[i0+i1*m_N0] = firstId+idx;  
             m_dofId[idx] = firstId+idx;  
1068          }          }
1069      }      }
1070      m_nodeTags.assign(getNumNodes(), 0);      m_nodeTags.assign(getNumNodes(), 0);

Legend:
Removed from v.3745  
changed lines
  Added in v.3746

  ViewVC Help
Powered by ViewVC 1.1.26