/[escript]/branches/refine/buckley/src/buckleycpp.cpp
ViewVC logotype

Diff of /branches/refine/buckley/src/buckleycpp.cpp

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

revision 3681 by jfenwick, Wed Nov 16 04:01:53 2011 UTC revision 3682 by jfenwick, Mon Nov 21 01:56:45 2011 UTC
# Line 50  using namespace boost::python; Line 50  using namespace boost::python;
50    
51  */  */
52    
53    namespace buckley
54    {
55      
56    escript::Domain_ptr buckley(double x, double y, double z)
57    {
58        BuckleyDomain* temp=new BuckleyDomain(x, y, z);  
59        return temp->getPtr();
60    }
61      
62      
63      
64    }
65    
66    
67  BOOST_PYTHON_MODULE(buckleycpp)  BOOST_PYTHON_MODULE(buckleycpp)
68  {  {
69  // This feature was added in boost v1.34  // This feature was added in boost v1.34
# Line 78  BOOST_PYTHON_MODULE(buckleycpp) Line 92  BOOST_PYTHON_MODULE(buckleycpp)
92  // ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``");  // ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``");
93    
94    
95         def("Buckley", buckley::buckley, (arg("n0")=1, arg("n1")=1, arg("n2")=1), "Creates an OctTree mesh for a box with the specified dimensions");
96  //   def ("Brick",buckley::brick,  //   def ("Brick",buckley::brick,
97  //       (arg("n0")=1,arg("n1")=1,arg("n2")=1,  //       (arg("n0")=1,arg("n1")=1,arg("n2")=1,
98  //       arg("order")=1,  //       arg("order")=1,
# Line 104  BOOST_PYTHON_MODULE(buckleycpp) Line 118  BOOST_PYTHON_MODULE(buckleycpp)
118    
119    
120    class_<buckley::BuckleyDomain, bases<escript::AbstractContinuousDomain> >    class_<buckley::BuckleyDomain, bases<escript::AbstractContinuousDomain> >
121        ("BuckleyDomain","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<double, double, double>())        ("BuckleyDomain","A concrete class representing a domain. For more details, please consult the c++ documentation.",no_init)
122        .def(init<const buckley::BuckleyDomain&>())        .def(init<const buckley::BuckleyDomain&>())
123        .def("write",&buckley::BuckleyDomain::write,args("filename"),        .def("write",&buckley::BuckleyDomain::write,args("filename"),
124  "Write the current mesh to a file with the given name.")  "Write the current mesh to a file with the given name.")

Legend:
Removed from v.3681  
changed lines
  Added in v.3682

  ViewVC Help
Powered by ViewVC 1.1.26