/[escript]/branches/diaplayground/finley/src/CPPAdapter/MeshAdapter.cpp
ViewVC logotype

Diff of /branches/diaplayground/finley/src/CPPAdapter/MeshAdapter.cpp

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

revision 4657 by jfenwick, Thu Feb 6 06:12:20 2014 UTC revision 4687 by jfenwick, Wed Feb 19 00:03:29 2014 UTC
# Line 20  Line 20 
20  #include "escript/Data.h"  #include "escript/Data.h"
21  #include "escript/DataFactory.h"  #include "escript/DataFactory.h"
22  #include "esysUtils/blocktimer.h"  #include "esysUtils/blocktimer.h"
23    #include "esysUtils/EsysRandom.h"
24    
25  #include <boost/python/import.hpp>  #include <boost/python/import.hpp>
26  #ifdef USE_NETCDF  #ifdef USE_NETCDF
# Line 2163  bool MeshAdapter::supportsContactElement Line 2164  bool MeshAdapter::supportsContactElement
2164      return true;      return true;
2165  }  }
2166    
2167    escript::Data MeshAdapter::randomFill(const escript::DataTypes::ShapeType& shape,
2168           const escript::FunctionSpace& what, long seed, const boost::python::tuple& filter) const
2169    {
2170        escript::Data towipe(0, shape, what, true);
2171        // since we just made this object, no sharing is possible and we don't need to check for
2172        // exlusive write
2173        escript::DataTypes::ValueType& dv=towipe.getExpandedVectorReference();
2174        const size_t dvsize=dv.size();
2175        esysUtils::randomFillArray(seed, &(dv[0]), dvsize);
2176        return towipe;  
2177    }
2178    
2179    
2180  void MeshAdapter::addDiracPoints(const vector<double>& points,  void MeshAdapter::addDiracPoints(const vector<double>& points,
2181                                   const vector<int>& tags) const                                   const vector<int>& tags) const
2182  {  {

Legend:
Removed from v.4657  
changed lines
  Added in v.4687

  ViewVC Help
Powered by ViewVC 1.1.26