/[escript]/trunk/escript/src/Data.cpp
ViewVC logotype

Diff of /trunk/escript/src/Data.cpp

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

revision 2087 by jfenwick, Mon Nov 24 04:51:30 2008 UTC revision 2089 by jfenwick, Mon Nov 24 06:07:29 2008 UTC
# Line 1123  Data::integrateWorker() const Line 1123  Data::integrateWorker() const
1123    // calculate the integral values    // calculate the integral values
1124    vector<double> integrals(dataPointSize);    vector<double> integrals(dataPointSize);
1125    vector<double> integrals_local(dataPointSize);    vector<double> integrals_local(dataPointSize);
1126      const AbstractContinuousDomain* dom=dynamic_cast<const AbstractContinuousDomain*>(getDomain().get());
1127      if (dom==0)
1128      {            
1129        throw DataException("Can not integrate over non-continuous domains.");
1130      }
1131  #ifdef PASO_MPI  #ifdef PASO_MPI
1132    AbstractContinuousDomain::asAbstractContinuousDomain(*getDomain()).setToIntegrals(integrals_local,*this);    dom->setToIntegrals(integrals_local,*this);
1133    // Global sum: use an array instead of a vector because elements of array are guaranteed to be contiguous in memory    // Global sum: use an array instead of a vector because elements of array are guaranteed to be contiguous in memory
1134    double *tmp = new double[dataPointSize];    double *tmp = new double[dataPointSize];
1135    double *tmp_local = new double[dataPointSize];    double *tmp_local = new double[dataPointSize];
# Line 1134  Data::integrateWorker() const Line 1139  Data::integrateWorker() const
1139    delete[] tmp;    delete[] tmp;
1140    delete[] tmp_local;    delete[] tmp_local;
1141  #else  #else
1142    AbstractContinuousDomain::asAbstractContinuousDomain(*getDomain()).setToIntegrals(integrals,*this);    dom->setToIntegrals(integrals,*this);
1143  #endif  #endif
1144    
1145    //    //

Legend:
Removed from v.2087  
changed lines
  Added in v.2089

  ViewVC Help
Powered by ViewVC 1.1.26