/[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 921 by gross, Fri Jan 5 00:54:37 2007 UTC revision 922 by gross, Fri Jan 5 04:23:05 2007 UTC
# Line 772  Data:: getValueOfDataPoint(int dataPoint Line 772  Data:: getValueOfDataPoint(int dataPoint
772    return numArray;    return numArray;
773    
774  }  }
   
775  void  void
776  Data::setValueOfDataPoint(int dataPointNo, const boost::python::numeric::array num_array)  Data::setValueOfDataPointToArray(int dataPointNo, const boost::python::numeric::array num_array)
777  {  {
778    if (isProtected()) {    if (isProtected()) {
779          throw DataException("Error - attempt to update protected Data object.");          throw DataException("Error - attempt to update protected Data object.");
# Line 804  Data::setValueOfDataPoint(int dataPointN Line 803  Data::setValueOfDataPoint(int dataPointN
803    }    }
804  }  }
805    
806    void
807    Data::setValueOfDataPoint(int dataPointNo, const double value)
808    {
809      if (isProtected()) {
810            throw DataException("Error - attempt to update protected Data object.");
811      }
812      //
813      // make sure data is expanded:
814      if (!isExpanded()) {
815        expand();
816      }
817      if (getNumDataPointsPerSample()>0) {
818           int sampleNo = dataPointNo/getNumDataPointsPerSample();
819           int dataPointNoInSample = dataPointNo - sampleNo * getNumDataPointsPerSample();
820           m_data->copyToDataPoint(sampleNo, dataPointNoInSample,value);
821      } else {
822           m_data->copyToDataPoint(-1, 0,value);
823      }
824    }
825    
826  const  const
827  boost::python::numeric::array  boost::python::numeric::array
828  Data::getValueOfGlobalDataPoint(int procNo, int dataPointNo)  Data::getValueOfGlobalDataPoint(int procNo, int dataPointNo)

Legend:
Removed from v.921  
changed lines
  Added in v.922

  ViewVC Help
Powered by ViewVC 1.1.26