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

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

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

revision 5135 by caltinay, Thu Aug 21 04:32:39 2014 UTC revision 5136 by caltinay, Tue Sep 9 07:13:55 2014 UTC
# Line 18  Line 18 
18  #include "MeshAdapter.h"  #include "MeshAdapter.h"
19  #include "escript/Data.h"  #include "escript/Data.h"
20  #include "escript/DataFactory.h"  #include "escript/DataFactory.h"
 #ifdef USE_NETCDF  
 #include <netcdfcpp.h>  
 #endif  
21  #include "esysUtils/blocktimer.h"  #include "esysUtils/blocktimer.h"
22  #include "esysUtils/EsysRandom.h"  #include "esysUtils/EsysRandom.h"
23    
24  #include <boost/python/import.hpp>  #ifdef USE_NETCDF
25    #include <netcdfcpp.h>
26    #endif
27  #include <boost/python/tuple.hpp>  #include <boost/python/tuple.hpp>
28    
29  using namespace std;  using namespace std;
30  using namespace escript;  using namespace escript;
31  using namespace paso;  using namespace paso;
32    namespace bp = boost::python;
33    
34  namespace dudley {  namespace dudley {
35    
# Line 1758  bool MeshAdapter::operator!=(const Abstr Line 1758  bool MeshAdapter::operator!=(const Abstr
1758     return !(operator==(other));     return !(operator==(other));
1759  }  }
1760    
1761  int MeshAdapter::getSystemMatrixTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const  int MeshAdapter::getSystemMatrixTypeId(const bp::object& options) const
1762  {  {
1763     Dudley_Mesh* mesh=m_dudleyMesh.get();      const escript::SolverBuddy& sb = bp::extract<escript::SolverBuddy>(options);
1764     return SystemMatrixAdapter::getSystemMatrixTypeId(solver, preconditioner,  
1765             package, symmetry, mesh->MPIInfo);      return SystemMatrixAdapter::getSystemMatrixTypeId(sb.getSolverMethod(),
1766                    sb.getPreconditioner(), sb.getPackage(), sb.isSymmetric(),
1767                    m_dudleyMesh->MPIInfo);
1768  }  }
1769    
1770  int MeshAdapter::getTransportTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const  int MeshAdapter::getTransportTypeId(int solver, int preconditioner, int package, bool symmetry) const
1771  {  {
1772     Dudley_Mesh* mesh=m_dudleyMesh.get();     Dudley_Mesh* mesh=m_dudleyMesh.get();
1773     return TransportProblemAdapter::getTransportTypeId(solver, preconditioner,     return TransportProblemAdapter::getTransportTypeId(solver, preconditioner,
# Line 2083  bool MeshAdapter::supportsContactElement Line 2085  bool MeshAdapter::supportsContactElement
2085  }  }
2086    
2087  escript::Data MeshAdapter::randomFill(const escript::DataTypes::ShapeType& shape,  escript::Data MeshAdapter::randomFill(const escript::DataTypes::ShapeType& shape,
2088         const escript::FunctionSpace& what, long seed, const boost::python::tuple& filter) const         const escript::FunctionSpace& what, long seed, const bp::tuple& filter) const
2089  {  {
2090      Data towipe(0, shape, what, true);      Data towipe(0, shape, what, true);
2091      // since we just made this object, no sharing is possible and we don't need to check for      // since we just made this object, no sharing is possible and we don't need to check for

Legend:
Removed from v.5135  
changed lines
  Added in v.5136

  ViewVC Help
Powered by ViewVC 1.1.26