/[escript]/trunk/esys2/bruce/src/Bruce/brucecpp.cpp
ViewVC logotype

Diff of /trunk/esys2/bruce/src/Bruce/brucecpp.cpp

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

revision 149 by jgs, Thu Sep 1 03:31:39 2005 UTC revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC
# Line 14  Line 14 
14  */  */
15    
16  #include "bruce/Bruce/Bruce.h"  #include "bruce/Bruce/Bruce.h"
17    #include "bruce/Bruce/BruceFactory.h"
18    
19  #include <boost/python.hpp>  #include <boost/python.hpp>
20  #include <boost/python/module.hpp>  #include <boost/python/module.hpp>
# Line 46  using namespace boost::python; Line 47  using namespace boost::python;
47  BOOST_PYTHON_MODULE(brucecpp)  BOOST_PYTHON_MODULE(brucecpp)
48  {  {
49    
50      //
51      // NOTE: The return_value_policy is necessary for functions that
52      // return pointers.
53    
54      def ("Brick",bruce::brick,
55          (arg("n0")=1,arg("n1")=1,arg("n2")=1,
56          arg("l0")=1.0,arg("l1")=1.0,arg("l2")=1.0),
57          return_value_policy<manage_new_object>());
58    
59      def ("Rectangle",bruce::rectangle,
60          (arg("n0")=1,arg("n1")=1,
61          arg("l0")=1.0,arg("l1")=1.0),
62          return_value_policy<manage_new_object>());
63    
64    class_<bruce::Bruce, bases<escript::AbstractContinuousDomain> >("Bruce",init<>())    class_<bruce::Bruce, bases<escript::AbstractContinuousDomain> >("Bruce",init<>())
65        .def(init<const bruce::Bruce&>())        .def(init<const bruce::Bruce&>())
66        .def("getDim",&bruce::Bruce::getDim)        .def("getDim",&bruce::Bruce::getDim)

Legend:
Removed from v.149  
changed lines
  Added in v.150

  ViewVC Help
Powered by ViewVC 1.1.26