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

Diff of /branches/dirac/finley/src/CPPAdapter/finleycpp.cpp

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

trunk/esys2/finley/src/CPPAdapter/finleycpp.cpp revision 108 by jgs, Thu Jan 27 06:21:59 2005 UTC trunk/finley/src/CPPAdapter/finleycpp.cpp revision 817 by ksteube, Sat Aug 26 03:08:52 2006 UTC
# Line 14  Line 14 
14    
15  ******************************************************************************/  ******************************************************************************/
16    
17    #ifdef PASO_MPI
18    #include <mpi.h>
19    #endif
20  extern "C" {  extern "C" {
21  #include "finley/finleyC/Finley.h"  #include "../Finley.h"
22  }  }
 #include "finley/CPPAdapter/MeshAdapter.h"  
 #include "finley/CPPAdapter/MeshAdapterFactory.h"  
 #include "finley/CPPAdapter/SystemMatrixAdapter.h"  
23    
24  #include "esysUtils/EsysException.h"  #include "MeshAdapter.h"
25    #include "MeshAdapterFactory.h"
26    #include "SystemMatrixAdapter.h"
27    
28    #include "FinleyAdapterException.h"
29    // #include "esysUtils/EsysException.h"
30  #include "esysUtils/esysExceptionTranslator.h"  #include "esysUtils/esysExceptionTranslator.h"
31    
32  #include "escript/Data/AbstractContinuousDomain.h"  #include "escript/AbstractContinuousDomain.h"
33    
34  #include <boost/python.hpp>  #include <boost/python.hpp>
35  #include <boost/python/module.hpp>  #include <boost/python/module.hpp>
# Line 34  extern "C" { Line 39  extern "C" {
39  using namespace boost::python;  using namespace boost::python;
40    
41  /**  /**
42     @memo     \page finley Finley
43     finley is the python module name that contains the interfaces     Finley is the python module name that contains the interfaces
44     to the C++ wrapper to finley.     to the C++ wrapper to finley.
45    
46     @version 1.0.0     \version 1.0.0
   
    @doc  
47    
48     Class Description:     \section class_desc Class Description:
49     Data     Data
50    
51     Class Limitations:     \section class_limits Class Limitations:
52     None     None
53    
54     Class Conditions of Use:     \section class_conds Class Conditions of Use:
55     None     None
56    
57     Throws:     \section throws Throws:
58     None     None
59    
60  */  */
# Line 114  BOOST_PYTHON_MODULE(finleycpp) Line 117  BOOST_PYTHON_MODULE(finleycpp)
117        arg("useElementsOnFace")=false),        arg("useElementsOnFace")=false),
118        return_value_policy<manage_new_object>());        return_value_policy<manage_new_object>());
119    
120      def("Merge",finley::meshMerge,
121          return_value_policy<manage_new_object>());
122    
123    def("GlueFaces",finley::glueFaces,    def("GlueFaces",finley::glueFaces,
124        (arg("safetyFactor")=0.2,        (arg("safetyFactor")=0.2,
125        arg("tolerance")=std::numeric_limits<double>::epsilon()),        arg("tolerance")=std::numeric_limits<double>::epsilon()),
# Line 124  BOOST_PYTHON_MODULE(finleycpp) Line 130  BOOST_PYTHON_MODULE(finleycpp)
130        arg("tolerance")=std::numeric_limits<double>::epsilon()),        arg("tolerance")=std::numeric_limits<double>::epsilon()),
131        return_value_policy<manage_new_object>());        return_value_policy<manage_new_object>());
132    
133    register_exception_translator<esysUtils::EsysException>(&esysUtils::esysExceptionTranslator);    register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));
134    
135    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
136        ("MeshAdapter",init<optional <Finley_Mesh*> >())        ("MeshAdapter",init<optional <Finley_Mesh*> >())
# Line 137  BOOST_PYTHON_MODULE(finleycpp) Line 143  BOOST_PYTHON_MODULE(finleycpp)
143        .def("addPDEToRHS",&finley::MeshAdapter::addPDEToRHS)        .def("addPDEToRHS",&finley::MeshAdapter::addPDEToRHS)
144        .def("newOperator",&finley::MeshAdapter::newSystemMatrix)        .def("newOperator",&finley::MeshAdapter::newSystemMatrix)
145        .def("getSystemMatrixTypeId",&finley::MeshAdapter::getSystemMatrixTypeId)        .def("getSystemMatrixTypeId",&finley::MeshAdapter::getSystemMatrixTypeId)
146          .def("setX",&finley::MeshAdapter::setNewX)
147        .def("getX",&finley::MeshAdapter::getX)        .def("getX",&finley::MeshAdapter::getX)
148        .def("getNormal",&finley::MeshAdapter::getNormal)        .def("getNormal",&finley::MeshAdapter::getNormal)
149        .def("getSize",&finley::MeshAdapter::getSize);        .def("getSize",&finley::MeshAdapter::getSize)
150          .def("saveDX",&finley::MeshAdapter::saveDX)
151          .def("saveVTK",&finley::MeshAdapter::saveVTK);
152    
153    
154    class_<finley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >    class_<finley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >
155        ("OperatorAdapter",no_init)        ("OperatorAdapter",no_init)
156        .def("nullifyRowsAndCols",&finley::SystemMatrixAdapter::nullifyRowsAndCols)        .def("nullifyRowsAndCols",&finley::SystemMatrixAdapter::nullifyRowsAndCols)
157        .def("setValue",&finley::SystemMatrixAdapter::setValue)        .def("resetValues",&finley::SystemMatrixAdapter::resetValues)
158        .def("resetSolver",&finley::SystemMatrixAdapter::resetSolver)        .def("saveMM",&finley::SystemMatrixAdapter::saveMM)
159        .def("saveMM",&finley::SystemMatrixAdapter::saveMM);        .def("saveHB",&finley::SystemMatrixAdapter::saveHB);
160    
161  }  }

Legend:
Removed from v.108  
changed lines
  Added in v.817

  ViewVC Help
Powered by ViewVC 1.1.26