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

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

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

revision 3082 by jfenwick, Tue Aug 3 06:04:05 2010 UTC revision 3114 by jfenwick, Fri Aug 27 05:26:25 2010 UTC
# Line 25  extern "C" { Line 25  extern "C" {
25  #include "SystemMatrixAdapter.h"  #include "SystemMatrixAdapter.h"
26  #include "TransportProblemAdapter.h"  #include "TransportProblemAdapter.h"
27    
28  #include "FinleyAdapterException.h"  #include "DudleyAdapterException.h"
29  // #include "esysUtils/EsysException.h"  // #include "esysUtils/EsysException.h"
30  #include "esysUtils/esysExceptionTranslator.h"  #include "esysUtils/esysExceptionTranslator.h"
31    
# Line 41  using namespace boost::python; Line 41  using namespace boost::python;
41    
42  /**  /**
43     \page dudley Dudley     \page dudley Dudley
44     Finley is the python module name that contains the interfaces     Dudley is the python module name that contains the interfaces
45     to the C++ wrapper to dudley.     to the C++ wrapper to dudley.
46    
47     \version 1.0.0     \version 1.0.0
# Line 72  BOOST_PYTHON_MODULE(dudleycpp) Line 72  BOOST_PYTHON_MODULE(dudleycpp)
72    // NOTE: The return_value_policy is necessary for functions that    // NOTE: The return_value_policy is necessary for functions that
73    // return pointers.    // return pointers.
74    //    //
75    register_exception_translator<dudley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));    register_exception_translator<dudley::DudleyAdapterException>(&(esysUtils::esysExceptionTranslator));
76    
77    def("LoadMesh",dudley::loadMesh,    def("LoadMesh",dudley::loadMesh,
78        (arg("fileName")="file.nc"),":rtype: `Domain`"        (arg("fileName")="file.nc"),":rtype: `Domain`"
# Line 115  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)
         
 //       ,return_value_policy<manage_new_object>());  
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 rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2]."
119  "\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"
120  ":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"
# Line 139  BOOST_PYTHON_MODULE(dudleycpp) Line 137  BOOST_PYTHON_MODULE(dudleycpp)
137        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
138        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
139        arg("optimize")=false)        arg("optimize")=false)
 //       ,return_value_policy<manage_new_object>());  
140  ,"Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1]."  ,"Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1]."
141  "\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"
142  ":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"
# Line 178  BOOST_PYTHON_MODULE(dudleycpp) Line 175  BOOST_PYTHON_MODULE(dudleycpp)
175    
176    
177    class_<dudley::MeshAdapter, bases<escript::AbstractContinuousDomain> >    class_<dudley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
178        ("MeshAdapter","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<optional <Finley_Mesh*> >())        ("MeshAdapter","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<optional <Dudley_Mesh*> >())
179        .def(init<const dudley::MeshAdapter&>())        .def(init<const dudley::MeshAdapter&>())
180        .def("write",&dudley::MeshAdapter::write,args("filename"),        .def("write",&dudley::MeshAdapter::write,args("filename"),
181  "Write the current mesh to a file with the given name.")  "Write the current mesh to a file with the given name.")
# Line 195  BOOST_PYTHON_MODULE(dudleycpp) Line 192  BOOST_PYTHON_MODULE(dudleycpp)
192  ":return: the number of data points summed across all MPI processes\n"  ":return: the number of data points summed across all MPI processes\n"
193  ":rtype: ``int``")  ":rtype: ``int``")
194        .def("addPDEToSystem",&dudley::MeshAdapter::addPDEToSystem,        .def("addPDEToSystem",&dudley::MeshAdapter::addPDEToSystem,
195  args("mat", "rhs","A", "B", "C", "D", "X", "Y", "d", "y", "d_contact", "y_contact"),  args("mat", "rhs","A", "B", "C", "D", "X", "Y", "d", "y"),
196  "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"
197  ":param mat:\n:type mat: `OperatorAdapter`\n:param rhs:\n:type rhs: `Data`\n"  ":param mat:\n:type mat: `OperatorAdapter`\n:param rhs:\n:type rhs: `Data`\n"
198  ":param A:\n:type A: `Data`\n"  ":param A:\n:type A: `Data`\n"
# Line 205  args("mat", "rhs","A", "B", "C", "D", "X Line 202  args("mat", "rhs","A", "B", "C", "D", "X
202  ":param X:\n:type X: `Data`\n"  ":param X:\n:type X: `Data`\n"
203  ":param Y:\n:type Y: `Data`\n"  ":param Y:\n:type Y: `Data`\n"
204  ":param d:\n:type d: `Data`\n"  ":param d:\n:type d: `Data`\n"
 ":param d_contact:\n:type d_contact: `Data`\n"  
 ":param y_contact:\n:type y_contact: `Data`\n"  
205  )  )
206        .def("addPDEToLumpedSystem",&dudley::MeshAdapter::addPDEToLumpedSystem,        .def("addPDEToLumpedSystem",&dudley::MeshAdapter::addPDEToLumpedSystem,
207  args("mat", "D", "d"),  args("mat", "D", "d"),

Legend:
Removed from v.3082  
changed lines
  Added in v.3114

  ViewVC Help
Powered by ViewVC 1.1.26