/[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 1351 by matt, Thu Nov 22 01:54:26 2007 UTC revision 1353 by matt, Thu Nov 22 06:05:35 2007 UTC
# Line 492  Data::probeInterpolation(const FunctionS Line 492  Data::probeInterpolation(const FunctionS
492  Data  Data
493  Data::gradOn(const FunctionSpace& functionspace) const  Data::gradOn(const FunctionSpace& functionspace) const
494  {  {
495    // double blocktimer_start = blocktimer_time();    double blocktimer_start = blocktimer_time();
496    if (functionspace.getDomain()!=getDomain())    if (functionspace.getDomain()!=getDomain())
497      throw DataException("Error - gradient cannot be calculated on different domains.");      throw DataException("Error - gradient cannot be calculated on different domains.");
498    DataArrayView::ShapeType grad_shape=getPointDataView().getShape();    DataArrayView::ShapeType grad_shape=getPointDataView().getShape();
499    grad_shape.push_back(functionspace.getDim());    grad_shape.push_back(functionspace.getDim());
500    Data out(0.0,grad_shape,functionspace,true);    Data out(0.0,grad_shape,functionspace,true);
501    getDomain().setToGradient(out,*this);    getDomain().setToGradient(out,*this);
502    // blocktimer_increment("grad()", blocktimer_start);    blocktimer_increment("grad()", blocktimer_start);
503    return out;    return out;
504  }  }
505    

Legend:
Removed from v.1351  
changed lines
  Added in v.1353

  ViewVC Help
Powered by ViewVC 1.1.26