/[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 106 by jgs, Thu Dec 23 07:20:12 2004 UTC revision 108 by jgs, Thu Jan 27 06:21:59 2005 UTC
# Line 460  Data::integrate() const Line 460  Data::integrate() const
460    // and load the array with the integral values    // and load the array with the integral values
461    boost::python::numeric::array bp_array(1.0);    boost::python::numeric::array bp_array(1.0);
462    if (rank==0) {    if (rank==0) {
463        bp_array.resize(1);
464      index = 0;      index = 0;
465      bp_array[0] = integrals[index];      bp_array[0] = integrals[index];
466    }    }
# Line 588  Data::sup() const Line 589  Data::sup() const
589  {  {
590    //    //
591    // set the initial maximum value to min possible double    // set the initial maximum value to min possible double
592    return algorithm(DataAlgorithmAdapter<FMax>(numeric_limits<double>::min()));    return algorithm(DataAlgorithmAdapter<FMax>(numeric_limits<double>::max()*-1));
593  }  }
594    
595  double  double
# Line 602  Data::inf() const Line 603  Data::inf() const
603  Data  Data
604  Data::maxval() const  Data::maxval() const
605  {  {
606    return dp_algorithm(DataAlgorithmAdapter<FMax>(numeric_limits<double>::min()));    return dp_algorithm(DataAlgorithmAdapter<FMax>(numeric_limits<double>::max()*-1));
607  }  }
608    
609  Data  Data
# Line 963  Data::setItemD(const boost::python::obje Line 964  Data::setItemD(const boost::python::obje
964    if (slice_region.size()!=view.getRank()) {    if (slice_region.size()!=view.getRank()) {
965      throw DataException("Error - slice size does not match Data rank.");      throw DataException("Error - slice size does not match Data rank.");
966    }    }
967    setSlice(value,slice_region);    if (getFunctionSpace()!=value.getFunctionSpace()) {
968         setSlice(Data(value,getFunctionSpace()),slice_region);
969      } else {
970         setSlice(value,slice_region);
971      }
972  }  }
973    
974  void  void

Legend:
Removed from v.106  
changed lines
  Added in v.108

  ViewVC Help
Powered by ViewVC 1.1.26