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

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

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

revision 3269 by jfenwick, Wed Oct 13 03:21:50 2010 UTC revision 3892 by jfenwick, Tue Apr 10 08:57:23 2012 UTC
# Line 19  extern "C" { Line 19  extern "C" {
19  #include "../Dudley.h"  #include "../Dudley.h"
20  }  }
21    
22    #include <pasowrap/SystemMatrixAdapter.h>
23    #include <pasowrap/TransportProblemAdapter.h>
24    
25  #include "MeshAdapter.h"  #include "MeshAdapter.h"
26  #include "MeshAdapterFactory.h"  #include "MeshAdapterFactory.h"
 #include "SystemMatrixAdapter.h"  
 #include "TransportProblemAdapter.h"  
27    
28  #include "DudleyAdapterException.h"  #include "DudleyAdapterException.h"
29  // #include "esysUtils/EsysException.h"  // #include "esysUtils/EsysException.h"
# Line 114  BOOST_PYTHON_MODULE(dudleycpp) Line 115  BOOST_PYTHON_MODULE(dudleycpp)
115        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
116        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
117        arg("optimize")=false)        arg("optimize")=false)
118  ,"Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2]."  ,"Creates a tetrahedral mesh by subdividing n0 x n1 x n2 rectangular elements over the brick [0,l0] x [0,l1] x [0,l2]."
119    "We accept floating point values for n0, n1 only to ease transition of scripts to python3 when the time comes."
120  "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n:param n2:\n:type n2:\n"  "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n:param n2:\n:type n2:\n"
121  ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"  ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"
122  ":param l0: length of side 0\n:param l1:\n:param l2:\n"  ":param l0: length of side 0\n:param l1:\n:param l2:\n"
# Line 136  BOOST_PYTHON_MODULE(dudleycpp) Line 138  BOOST_PYTHON_MODULE(dudleycpp)
138        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
139        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
140        arg("optimize")=false)        arg("optimize")=false)
141  ,"Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1]."  ,"Creates a triangular mesh by subdividing n0 x n1 rectangular elements over the brick [0,l0] x [0,l1]."
142    "We accept floating point values for n0, n1 only to ease transition of scripts to python3 when the time comes."
143  "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n"  "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n"
144  ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"  ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"
145  ":param l0: length of side 0\n:param l1:\n"  ":param l0: length of side 0\n:param l1:\n"
# Line 187  args("mat", "D", "d"), Line 190  args("mat", "D", "d"),
190  "adds a PDE onto the lumped stiffness matrix\n\n"  "adds a PDE onto the lumped stiffness matrix\n\n"
191  ":param mat:\n:type mat: `Data`\n"  ":param mat:\n:type mat: `Data`\n"
192  ":param D:\n:type D: `Data`\n"  ":param D:\n:type D: `Data`\n"
193  ":param d:\n:type d: `Data`\n")  ":param d:\n:type d: `Data`\n"
194    ":param useHRZ:\n:type useHRZ: bool\n"
195    )
196        .def("addPDEToRHS",&dudley::MeshAdapter::addPDEToRHS,        .def("addPDEToRHS",&dudley::MeshAdapter::addPDEToRHS,
197  args("rhs", "X", "Y", "y", "y_contact"),  args("rhs", "X", "Y", "y", "y_contact"),
198  "adds a PDE onto the stiffness matrix mat and a rhs\n\n"  "adds a PDE onto the stiffness matrix mat and a rhs\n\n"
# Line 282  args("filename" ,"arg",  "metadata", "me Line 287  args("filename" ,"arg",  "metadata", "me
287        .def("MPIBarrier",&dudley::MeshAdapter::MPIBarrier,"Wait until all processes have reached this point")        .def("MPIBarrier",&dudley::MeshAdapter::MPIBarrier,"Wait until all processes have reached this point")
288        .def("onMasterProcessor",&dudley::MeshAdapter::onMasterProcessor,":return: True if this code is executing on the master process\n:rtype: `bool`");        .def("onMasterProcessor",&dudley::MeshAdapter::onMasterProcessor,":return: True if this code is executing on the master process\n:rtype: `bool`");
289    
   class_<dudley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >  
       ("OperatorAdapter","A concrete class representing an operator. For more details, please see the c++ documentation.", no_init)  
       .def("print_matrix_info",&dudley::SystemMatrixAdapter::Print_Matrix_Info,(arg("full")=false),"prints information about a system matrix")  
       .def("nullifyRowsAndCols",&dudley::SystemMatrixAdapter::nullifyRowsAndCols)  
       .def("resetValues",&dudley::SystemMatrixAdapter::resetValues, "resets the matrix entries")  
       .def("saveMM",&dudley::SystemMatrixAdapter::saveMM,args("fileName"),  
 "writes the matrix to a file using the Matrix Market file format")  
       .def("saveHB",&dudley::SystemMatrixAdapter::saveHB, args("filename"),  
 "writes the matrix to a file using the Harwell-Boeing file format");  
   
   class_<dudley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >  
       ("TransportProblemAdapter","",no_init)  
       .def("getSafeTimeStepSize",&dudley::TransportProblemAdapter::getSafeTimeStepSize)  
       .def("getUnlimitedTimeStepSize",&dudley::TransportProblemAdapter::getUnlimitedTimeStepSize)  
       .def("resetTransport",&dudley::TransportProblemAdapter::resetTransport,  
 "resets the transport operator typically as they have been updated");  
290  }  }

Legend:
Removed from v.3269  
changed lines
  Added in v.3892

  ViewVC Help
Powered by ViewVC 1.1.26