/[escript]/trunk-mpi-branch/escript/src/Data.cpp
ViewVC logotype

Diff of /trunk-mpi-branch/escript/src/Data.cpp

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

revision 1195 by ksteube, Mon Jun 4 01:52:07 2007 UTC revision 1196 by ksteube, Fri Jun 15 03:45:48 2007 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"
26    extern "C" {
27    #include "escript/blocktimer.h"
28    }
29    
30  #include <fstream>  #include <fstream>
31  #include <algorithm>  #include <algorithm>
# Line 462  Data::probeInterpolation(const FunctionS Line 465  Data::probeInterpolation(const FunctionS
465  Data  Data
466  Data::gradOn(const FunctionSpace& functionspace) const  Data::gradOn(const FunctionSpace& functionspace) const
467  {  {
468      double blocktimer_start = blocktimer_time();
469    if (functionspace.getDomain()!=getDomain())    if (functionspace.getDomain()!=getDomain())
470      throw DataException("Error - gradient cannot be calculated on different domains.");      throw DataException("Error - gradient cannot be calculated on different domains.");
471    DataArrayView::ShapeType grad_shape=getPointDataView().getShape();    DataArrayView::ShapeType grad_shape=getPointDataView().getShape();
472    grad_shape.push_back(functionspace.getDim());    grad_shape.push_back(functionspace.getDim());
473    Data out(0.0,grad_shape,functionspace,true);    Data out(0.0,grad_shape,functionspace,true);
474    getDomain().setToGradient(out,*this);    getDomain().setToGradient(out,*this);
475      blocktimer_increment("grad()", blocktimer_start);
476    return out;    return out;
477  }  }
478    

Legend:
Removed from v.1195  
changed lines
  Added in v.1196

  ViewVC Help
Powered by ViewVC 1.1.26