/[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 1877 by ksteube, Tue Oct 14 02:58:39 2008 UTC revision 2064 by jfenwick, Thu Nov 20 04:06:34 2008 UTC
# Line 35  extern "C" { Line 35  extern "C" {
35  #include <boost/python/module.hpp>  #include <boost/python/module.hpp>
36  #include <boost/python/def.hpp>  #include <boost/python/def.hpp>
37  #include <boost/python/detail/defaults_gen.hpp>  #include <boost/python/detail/defaults_gen.hpp>
38    #include <boost/version.hpp>
39    
40  using namespace boost::python;  using namespace boost::python;
41    
# Line 78  using namespace boost::python; Line 79  using namespace boost::python;
79    
80  BOOST_PYTHON_MODULE(finleycpp)  BOOST_PYTHON_MODULE(finleycpp)
81  {  {
82    // This feature was added in boost v1.34
83    #if ((BOOST_VERSION/100)%1000 > 33) || (BOOST_VERSION/100000 >1)
84      // params are: bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures
85      docstring_options docopt(true, true, false);
86    #endif
87    
88    //    //
89    // NOTE: The return_value_policy is necessary for functions that    // NOTE: The return_value_policy is necessary for functions that
# Line 143  BOOST_PYTHON_MODULE(finleycpp) Line 149  BOOST_PYTHON_MODULE(finleycpp)
149    
150    
151    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
152        ("MeshAdapter",init<optional <Finley_Mesh*> >())        ("MeshAdapter","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<optional <Finley_Mesh*> >())
153        .def(init<const finley::MeshAdapter&>())        .def(init<const finley::MeshAdapter&>())
154        .def("write",&finley::MeshAdapter::write)        .def("write",&finley::MeshAdapter::write)
155        .def("print_mesh_info",&finley::MeshAdapter::Print_Mesh_Info,(arg("full")=false))        .def("print_mesh_info",&finley::MeshAdapter::Print_Mesh_Info,(arg("full")=false))
# Line 176  BOOST_PYTHON_MODULE(finleycpp) Line 182  BOOST_PYTHON_MODULE(finleycpp)
182        .def("onMasterProcessor",&finley::MeshAdapter::onMasterProcessor);        .def("onMasterProcessor",&finley::MeshAdapter::onMasterProcessor);
183    
184    class_<finley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >    class_<finley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >
185        ("OperatorAdapter",no_init)        ("OperatorAdapter","A concrete class representing an operator. For more details, please see the c++ documentation.", no_init)
186        .def("print_matrix_info",&finley::SystemMatrixAdapter::Print_Matrix_Info,(arg("full")=false))        .def("print_matrix_info",&finley::SystemMatrixAdapter::Print_Matrix_Info,(arg("full")=false))
187        .def("nullifyRowsAndCols",&finley::SystemMatrixAdapter::nullifyRowsAndCols)        .def("nullifyRowsAndCols",&finley::SystemMatrixAdapter::nullifyRowsAndCols)
188        .def("resetValues",&finley::SystemMatrixAdapter::resetValues)        .def("resetValues",&finley::SystemMatrixAdapter::resetValues)
# Line 184  BOOST_PYTHON_MODULE(finleycpp) Line 190  BOOST_PYTHON_MODULE(finleycpp)
190        .def("saveHB",&finley::SystemMatrixAdapter::saveHB);        .def("saveHB",&finley::SystemMatrixAdapter::saveHB);
191    
192    class_<finley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >    class_<finley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >
193        ("TransportProblemAdapter",no_init)        ("TransportProblemAdapter","",no_init)
194        .def("getSafeTimeStepSize",&finley::TransportProblemAdapter::getSafeTimeStepSize)        .def("getSafeTimeStepSize",&finley::TransportProblemAdapter::getSafeTimeStepSize)
195        .def("getUnlimitedTimeStepSize",&finley::TransportProblemAdapter::getUnlimitedTimeStepSize)        .def("getUnlimitedTimeStepSize",&finley::TransportProblemAdapter::getUnlimitedTimeStepSize)
196        .def("resetTransport",&finley::TransportProblemAdapter::resetTransport);        .def("resetTransport",&finley::TransportProblemAdapter::resetTransport);

Legend:
Removed from v.1877  
changed lines
  Added in v.2064

  ViewVC Help
Powered by ViewVC 1.1.26