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

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

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

revision 6008 by caltinay, Mon Feb 22 06:59:27 2016 UTC revision 6009 by caltinay, Wed Mar 2 04:13:26 2016 UTC
# Line 14  Line 14 
14  *  *
15  *****************************************************************************/  *****************************************************************************/
16    
17  #define ESNEEDPYTHON  #include <dudley/Dudley.h>
 #include "esysUtils/first.h"  
18    
 #include "../Dudley.h"  
 #include "DudleyAdapterException.h"  
19  #include "MeshAdapter.h"  #include "MeshAdapter.h"
20  #include "MeshAdapterFactory.h"  #include "MeshAdapterFactory.h"
21    
 #include "esysUtils/Esys_MPI.h"  
 #include <escript/ExceptionTranslators.h>  
22  #include <escript/AbstractContinuousDomain.h>  #include <escript/AbstractContinuousDomain.h>
23    #include <escript/ExceptionTranslators.h>
24    
25  #include <boost/python.hpp>  #include <boost/python.hpp>
26  #include <boost/python/def.hpp>  #include <boost/python/def.hpp>
# Line 44  BOOST_PYTHON_MODULE(dudleycpp) Line 40  BOOST_PYTHON_MODULE(dudleycpp)
40    
41    scope().attr("__doc__") = "To use this module, please import esys.dudley";      scope().attr("__doc__") = "To use this module, please import esys.dudley";  
42        
43    register_exception_translator<dudley::DudleyAdapterException>(&escript::RuntimeErrorTranslator);      // register escript's default translators
44        REGISTER_ESCRIPT_EXCEPTION_TRANSLATORS;
45        register_exception_translator<dudley::DudleyException>(&escript::RuntimeErrorTranslator);
46    
47    //    //
48    // NOTE: The return_value_policy is necessary for functions that    // NOTE: The return_value_policy is necessary for functions that
# Line 70  BOOST_PYTHON_MODULE(dudleycpp) Line 68  BOOST_PYTHON_MODULE(dudleycpp)
68         arg("numDim"),         arg("numDim"),
69         arg("integrationOrder")=-1,         arg("integrationOrder")=-1,
70         arg("reducedIntegrationOrder")=-1,         arg("reducedIntegrationOrder")=-1,
71         arg("optimize")=true,           arg("optimize")=true)
        arg("useMacroElements")=false)  
72  //       ,return_value_policy<manage_new_object>());  //       ,return_value_policy<manage_new_object>());
73  ,"Read a gmsh mesh file\n\n"  ,"Read a gmsh mesh file\n\n"
74  ":rtype: `Domain`\n:param fileName:\n:type fileName: ``string``\n"  ":rtype: `Domain`\n:param fileName:\n:type fileName: ``string``\n"
# Line 79  BOOST_PYTHON_MODULE(dudleycpp) Line 76  BOOST_PYTHON_MODULE(dudleycpp)
76  ":type integrationOrder: ``int``\n"  ":type integrationOrder: ``int``\n"
77  ":param reducedIntegrationOrder: order of the quadrature scheme. If *reducedIntegrationOrder<0* the integration order is selected independently.\n"  ":param reducedIntegrationOrder: order of the quadrature scheme. If *reducedIntegrationOrder<0* the integration order is selected independently.\n"
78  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``\n"  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``\n"
 ":param useMacroElements: Enable the usage of macro elements instead of second order elements.\n:type useMacroElements: ``bool``"  
79  );  );
80    
81    def ("__Brick_driver",dudley::brick_driver,    def ("__Brick_driver",dudley::brick_driver,
# Line 145  BOOST_PYTHON_MODULE(dudleycpp) Line 141  BOOST_PYTHON_MODULE(dudleycpp)
141  );  );
142    
143    class_<dudley::MeshAdapter, bases<escript::AbstractContinuousDomain> >    class_<dudley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
144        ("MeshAdapter","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<optional <Dudley_Mesh*> >())        ("MeshAdapter","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<optional <dudley::Dudley_Mesh*> >())
145        .def(init<const dudley::MeshAdapter&>())        .def(init<const dudley::MeshAdapter&>())
146        .def("write",&dudley::MeshAdapter::write,args("filename"),        .def("write",&dudley::MeshAdapter::write,args("filename"),
147  "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.6008  
changed lines
  Added in v.6009

  ViewVC Help
Powered by ViewVC 1.1.26