/[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 1384 by gross, Wed Dec 5 03:41:06 2007 UTC revision 1385 by trankine, Fri Jan 11 07:33:30 2008 UTC
# Line 23  Line 23 
23  #include "FunctionSpaceFactory.h"  #include "FunctionSpaceFactory.h"
24  #include "AbstractContinuousDomain.h"  #include "AbstractContinuousDomain.h"
25  #include "UnaryFuncs.h"  #include "UnaryFuncs.h"
 extern "C" {  
 #include "escript/blocktimer.h"  
 }  
26    
27  #include <fstream>  #include <fstream>
28  #include <algorithm>  #include <algorithm>
# Line 492  Data::probeInterpolation(const FunctionS Line 489  Data::probeInterpolation(const FunctionS
489  Data  Data
490  Data::gradOn(const FunctionSpace& functionspace) const  Data::gradOn(const FunctionSpace& functionspace) const
491  {  {
   double blocktimer_start = blocktimer_time();  
492    if (functionspace.getDomain()!=getDomain())    if (functionspace.getDomain()!=getDomain())
493      throw DataException("Error - gradient cannot be calculated on different domains.");      throw DataException("Error - gradient cannot be calculated on different domains.");
494    DataArrayView::ShapeType grad_shape=getPointDataView().getShape();    DataArrayView::ShapeType grad_shape=getPointDataView().getShape();
495    grad_shape.push_back(functionspace.getDim());    grad_shape.push_back(functionspace.getDim());
496    Data out(0.0,grad_shape,functionspace,true);    Data out(0.0,grad_shape,functionspace,true);
497    getDomain().setToGradient(out,*this);    getDomain().setToGradient(out,*this);
   blocktimer_increment("grad()", blocktimer_start);  
498    return out;    return out;
499  }  }
500    

Legend:
Removed from v.1384  
changed lines
  Added in v.1385

  ViewVC Help
Powered by ViewVC 1.1.26