/[escript]/branches/domexper/dudley/src/CPPAdapter/finleycpp.cpp
ViewVC logotype

Diff of /branches/domexper/dudley/src/CPPAdapter/finleycpp.cpp

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

trunk/finley/src/CPPAdapter/finleycpp.cpp revision 1345 by ksteube, Wed Nov 14 07:53:34 2007 UTC temp_trunk_copy/finley/src/CPPAdapter/finleycpp.cpp revision 1384 by phornby, Fri Jan 11 02:29:38 2008 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 78  using namespace boost::python; Line 79  using namespace boost::python;
79  BOOST_PYTHON_MODULE(finleycpp)  BOOST_PYTHON_MODULE(finleycpp)
80  {  {
81    
   // def("ReadMesh",finley::readMesh,readMesh_overloads());  
   // def("Brick",finley::brick,brick_overloads());  
   // def("Rectangle",finley::rectangle,rectangle_overloads());  
   // def("Interval",finley::interval,interval_overloads());  
   // def("GlueFaces",finley::glueFaces,glueFaces_overloads());  
   // def("JoinFaces",finley::joinFaces,joinFaces_overloads());  
82    //    //
83    // NOTE: The return_value_policy is necessary for functions that    // NOTE: The return_value_policy is necessary for functions that
84    // return pointers.    // return pointers.
85      //
86      register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));
87    
88    def("LoadMesh",finley::loadMesh,    def("LoadMesh",finley::loadMesh,
89        (arg("fileName")="file.nc"),        (arg("fileName")="file.nc"),
# Line 94  BOOST_PYTHON_MODULE(finleycpp) Line 91  BOOST_PYTHON_MODULE(finleycpp)
91    def("ReadMesh",finley::readMesh,    def("ReadMesh",finley::readMesh,
92        (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),
93        return_value_policy<manage_new_object>());        return_value_policy<manage_new_object>());
94      def("ReadMeshMPI",finley::readMeshMPI,
95          (arg("fileName")="file.fly",arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,  arg("optimize")=true),
96          return_value_policy<manage_new_object>());
97    
98    def("ReadGmsh",finley::readGmsh,    def("ReadGmsh",finley::readGmsh,
99        (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 135  BOOST_PYTHON_MODULE(finleycpp)
135        arg("optimize")=true),        arg("optimize")=true),
136        return_value_policy<manage_new_object>());        return_value_policy<manage_new_object>());
137    
138    register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));  
139    
140    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
141        ("MeshAdapter",init<optional <Finley_Mesh*> >())        ("MeshAdapter",init<optional <Finley_Mesh*> >())
# Line 149  BOOST_PYTHON_MODULE(finleycpp) Line 149  BOOST_PYTHON_MODULE(finleycpp)
149        .def("addPDEToSystem",&finley::MeshAdapter::addPDEToSystem)        .def("addPDEToSystem",&finley::MeshAdapter::addPDEToSystem)
150        .def("addPDEToLumpedSystem",&finley::MeshAdapter::addPDEToLumpedSystem)        .def("addPDEToLumpedSystem",&finley::MeshAdapter::addPDEToLumpedSystem)
151        .def("addPDEToRHS",&finley::MeshAdapter::addPDEToRHS)        .def("addPDEToRHS",&finley::MeshAdapter::addPDEToRHS)
152          .def("addPDEToTransportProblem",&finley::MeshAdapter::addPDEToTransportProblem)
153        .def("newOperator",&finley::MeshAdapter::newSystemMatrix)        .def("newOperator",&finley::MeshAdapter::newSystemMatrix)
154          .def("newTransportProblem",&finley::MeshAdapter::newTransportProblem)
155        .def("getSystemMatrixTypeId",&finley::MeshAdapter::getSystemMatrixTypeId)        .def("getSystemMatrixTypeId",&finley::MeshAdapter::getSystemMatrixTypeId)
156        .def("setX",&finley::MeshAdapter::setNewX)        .def("setX",&finley::MeshAdapter::setNewX)
157        .def("getX",&finley::MeshAdapter::getX)        .def("getX",&finley::MeshAdapter::getX)
# Line 172  BOOST_PYTHON_MODULE(finleycpp) Line 174  BOOST_PYTHON_MODULE(finleycpp)
174        .def("saveMM",&finley::SystemMatrixAdapter::saveMM)        .def("saveMM",&finley::SystemMatrixAdapter::saveMM)
175        .def("saveHB",&finley::SystemMatrixAdapter::saveHB);        .def("saveHB",&finley::SystemMatrixAdapter::saveHB);
176    
177      class_<finley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >
178          ("OperatorAdapter",no_init)
179          .def("resetTransport",&finley::TransportProblemAdapter::resetTransport);
180    
181    
182    
183    
184  }  }

Legend:
Removed from v.1345  
changed lines
  Added in v.1384

  ViewVC Help
Powered by ViewVC 1.1.26