/[escript]/branches/diaplayground/ripley/src/Brick.cpp
ViewVC logotype

Diff of /branches/diaplayground/ripley/src/Brick.cpp

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

revision 3796 by gross, Thu Feb 2 06:26:15 2012 UTC revision 3800 by caltinay, Fri Feb 3 01:18:06 2012 UTC
# Line 1199  void Brick::assembleIntegrate(vector<dou Line 1199  void Brick::assembleIntegrate(vector<dou
1199      const index_t left = (m_offset0==0 ? 0 : 1);      const index_t left = (m_offset0==0 ? 0 : 1);
1200      const index_t bottom = (m_offset1==0 ? 0 : 1);      const index_t bottom = (m_offset1==0 ? 0 : 1);
1201      const index_t front = (m_offset2==0 ? 0 : 1);      const index_t front = (m_offset2==0 ? 0 : 1);
1202      if (arg.getFunctionSpace().getTypeCode() == Elements) {      const int fs = arg.getFunctionSpace().getTypeCode();
1203        if (fs == Elements && arg.actsExpanded()) {
1204          const double w_0 = h0*h1*h2/8.;          const double w_0 = h0*h1*h2/8.;
1205  #pragma omp parallel  #pragma omp parallel
1206          {          {
# Line 1228  void Brick::assembleIntegrate(vector<dou Line 1229  void Brick::assembleIntegrate(vector<dou
1229              for (index_t i=0; i<numComp; i++)              for (index_t i=0; i<numComp; i++)
1230                  integrals[i]+=int_local[i];                  integrals[i]+=int_local[i];
1231          } // end of parallel section          } // end of parallel section
1232      } else if (arg.getFunctionSpace().getTypeCode() == ReducedElements) {  
1233        } else if (fs==ReducedElements || (fs==Elements && !arg.actsExpanded())) {
1234          const double w_0 = h0*h1*h2;          const double w_0 = h0*h1*h2;
1235  #pragma omp parallel  #pragma omp parallel
1236          {          {
# Line 1249  void Brick::assembleIntegrate(vector<dou Line 1251  void Brick::assembleIntegrate(vector<dou
1251              for (index_t i=0; i<numComp; i++)              for (index_t i=0; i<numComp; i++)
1252                  integrals[i]+=int_local[i];                  integrals[i]+=int_local[i];
1253          } // end of parallel section          } // end of parallel section
1254      } else if (arg.getFunctionSpace().getTypeCode() == FaceElements) {  
1255        } else if (fs == FaceElements && arg.actsExpanded()) {
1256          const double w_0 = h1*h2/4.;          const double w_0 = h1*h2/4.;
1257          const double w_1 = h0*h2/4.;          const double w_1 = h0*h2/4.;
1258          const double w_2 = h0*h1/4.;          const double w_2 = h0*h1/4.;
# Line 1357  void Brick::assembleIntegrate(vector<dou Line 1360  void Brick::assembleIntegrate(vector<dou
1360                  integrals[i]+=int_local[i];                  integrals[i]+=int_local[i];
1361          } // end of parallel section          } // end of parallel section
1362    
1363      } else if (arg.getFunctionSpace().getTypeCode() == ReducedFaceElements) {      } else if (fs==ReducedFaceElements || (fs==FaceElements && !arg.actsExpanded())) {
1364          const double w_0 = h1*h2;          const double w_0 = h1*h2;
1365          const double w_1 = h0*h2;          const double w_1 = h0*h2;
1366          const double w_2 = h0*h1;          const double w_2 = h0*h1;
# Line 1440  void Brick::assembleIntegrate(vector<dou Line 1443  void Brick::assembleIntegrate(vector<dou
1443              for (index_t i=0; i<numComp; i++)              for (index_t i=0; i<numComp; i++)
1444                  integrals[i]+=int_local[i];                  integrals[i]+=int_local[i];
1445          } // end of parallel section          } // end of parallel section
1446        } // function space selector
     }  
1447  }  }
1448    
1449  //protected  //protected

Legend:
Removed from v.3796  
changed lines
  Added in v.3800

  ViewVC Help
Powered by ViewVC 1.1.26