/[escript]/trunk/finley/src/CPPAdapter/finleycpp.cpp
ViewVC logotype

Diff of /trunk/finley/src/CPPAdapter/finleycpp.cpp

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

revision 1339 by ksteube, Wed Nov 7 01:53:12 2007 UTC revision 1364 by gross, Mon Dec 17 07:22:45 2007 UTC
# Line 23  extern "C" { Line 23  extern "C" {
23  #include "MeshAdapter.h"  #include "MeshAdapter.h"
24  #include "MeshAdapterFactory.h"  #include "MeshAdapterFactory.h"
25  #include "SystemMatrixAdapter.h"  #include "SystemMatrixAdapter.h"
26    #include "TransportProblemAdapter.h"
27    
28  #include "FinleyAdapterException.h"  #include "FinleyAdapterException.h"
29  // #include "esysUtils/EsysException.h"  // #include "esysUtils/EsysException.h"
# Line 88  BOOST_PYTHON_MODULE(finleycpp) Line 89  BOOST_PYTHON_MODULE(finleycpp)
89    // NOTE: The return_value_policy is necessary for functions that    // NOTE: The return_value_policy is necessary for functions that
90    // return pointers.    // return pointers.
91    
92    def("load",finley::loadMesh,    def("LoadMesh",finley::loadMesh,
93        (arg("fileName")="file.nc"),        (arg("fileName")="file.nc"),
94        return_value_policy<manage_new_object>());        return_value_policy<manage_new_object>());
95    def("ReadMesh",finley::readMesh,    def("ReadMesh",finley::readMesh,
96        (arg("fileName")="file.fly",arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,  arg("optimize")=true),        (arg("fileName")="file.fly",arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,  arg("optimize")=true),
97        return_value_policy<manage_new_object>());        return_value_policy<manage_new_object>());
98      def("ReadMeshMPI",finley::readMeshMPI,
99          (arg("fileName")="file.fly",arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,  arg("optimize")=true),
100          return_value_policy<manage_new_object>());
101    
102    def("ReadGmsh",finley::readGmsh,    def("ReadGmsh",finley::readGmsh,
103        (arg("fileName")="file.msh",arg("numDim"), arg("integrationOrder")=-1, arg("reducedIntegrationOrder")=-1, arg("optimize")=true),        (arg("fileName")="file.msh",arg("numDim"), arg("integrationOrder")=-1, arg("reducedIntegrationOrder")=-1, arg("optimize")=true),
# Line 135  BOOST_PYTHON_MODULE(finleycpp) Line 139  BOOST_PYTHON_MODULE(finleycpp)
139        arg("optimize")=true),        arg("optimize")=true),
140        return_value_policy<manage_new_object>());        return_value_policy<manage_new_object>());
141    
142    register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));  
143    
144    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
145        ("MeshAdapter",init<optional <Finley_Mesh*> >())        ("MeshAdapter",init<optional <Finley_Mesh*> >())
146        .def(init<const finley::MeshAdapter&>())        .def(init<const finley::MeshAdapter&>())
147        .def("write",&finley::MeshAdapter::write)        .def("write",&finley::MeshAdapter::write)
148        .def("print_mesh_info",&finley::MeshAdapter::Print_Mesh_Info,(arg("full")=false))        .def("print_mesh_info",&finley::MeshAdapter::Print_Mesh_Info,(arg("full")=false))
149        .def("dump",&finley::MeshAdapter::write)        .def("dump",&finley::MeshAdapter::dump)
150        .def("getDescription",&finley::MeshAdapter::getDescription)        .def("getDescription",&finley::MeshAdapter::getDescription)
151        .def("getDim",&finley::MeshAdapter::getDim)        .def("getDim",&finley::MeshAdapter::getDim)
152        .def("getDataShape",&finley::MeshAdapter::getDataShape)        .def("getDataShape",&finley::MeshAdapter::getDataShape)
# Line 172  BOOST_PYTHON_MODULE(finleycpp) Line 176  BOOST_PYTHON_MODULE(finleycpp)
176        .def("saveMM",&finley::SystemMatrixAdapter::saveMM)        .def("saveMM",&finley::SystemMatrixAdapter::saveMM)
177        .def("saveHB",&finley::SystemMatrixAdapter::saveHB);        .def("saveHB",&finley::SystemMatrixAdapter::saveHB);
178    
179      class_<finley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >
180          ("OperatorAdapter",no_init)
181          .def("resetTransport",&finley::TransportProblemAdapter::resetTransport);
182    
183    
184    
185      register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));
186    
187  }  }

Legend:
Removed from v.1339  
changed lines
  Added in v.1364

  ViewVC Help
Powered by ViewVC 1.1.26