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

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

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

trunk/esys2/finley/src/CPPAdapter/finleycpp.cpp revision 110 by jgs, Mon Feb 14 04:14:42 2005 UTC trunk/finley/src/CPPAdapter/finleycpp.cpp revision 934 by gross, Tue Jan 23 09:52:45 2007 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 90  BOOST_PYTHON_MODULE(finleycpp) Line 93  BOOST_PYTHON_MODULE(finleycpp)
93        (arg("fileName"),arg("integrationOrder")=-1),        (arg("fileName"),arg("integrationOrder")=-1),
94        return_value_policy<manage_new_object>());        return_value_policy<manage_new_object>());
95    
96      def("ReadGmsh",finley::readGmsh,
97          (arg("fileName"),arg("numDim"), arg("integrationOrder")=-1, arg("reducedIntegrationOrder")=-1, arg("optimizeLabeling")=true),
98          return_value_policy<manage_new_object>());
99    
100    def ("Brick",finley::brick,    def ("Brick",finley::brick,
101        (arg("n0")=1,arg("n1")=1,arg("n2")=1,        (arg("n0")=1,arg("n1")=1,arg("n2")=1,
102        arg("order")=1,        arg("order")=1,
# Line 119  BOOST_PYTHON_MODULE(finleycpp) Line 126  BOOST_PYTHON_MODULE(finleycpp)
126    
127    def("GlueFaces",finley::glueFaces,    def("GlueFaces",finley::glueFaces,
128        (arg("safetyFactor")=0.2,        (arg("safetyFactor")=0.2,
129        arg("tolerance")=std::numeric_limits<double>::epsilon()),        arg("tolerance")=1.e-8),
130        return_value_policy<manage_new_object>());        return_value_policy<manage_new_object>());
131    
132    def("JoinFaces",finley::joinFaces,    def("JoinFaces",finley::joinFaces,
133        (arg("safetyFactor")=0.2,        (arg("safetyFactor")=0.2,
134        arg("tolerance")=std::numeric_limits<double>::epsilon()),        arg("tolerance")=1.e-8),
135        return_value_policy<manage_new_object>());        return_value_policy<manage_new_object>());
136    
137    register_exception_translator<esysUtils::EsysException>(&esysUtils::esysExceptionTranslator);    register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));
138    
139    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
140        ("MeshAdapter",init<optional <Finley_Mesh*> >())        ("MeshAdapter",init<optional <Finley_Mesh*> >())
# Line 143  BOOST_PYTHON_MODULE(finleycpp) Line 150  BOOST_PYTHON_MODULE(finleycpp)
150        .def("setX",&finley::MeshAdapter::setNewX)        .def("setX",&finley::MeshAdapter::setNewX)
151        .def("getX",&finley::MeshAdapter::getX)        .def("getX",&finley::MeshAdapter::getX)
152        .def("getNormal",&finley::MeshAdapter::getNormal)        .def("getNormal",&finley::MeshAdapter::getNormal)
153        .def("getSize",&finley::MeshAdapter::getSize);        .def("getSize",&finley::MeshAdapter::getSize)
154          .def("saveDX",&finley::MeshAdapter::saveDX)
155          .def("saveVTK",&finley::MeshAdapter::saveVTK);
156    
157    
158    class_<finley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >    class_<finley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >
159        ("OperatorAdapter",no_init)        ("OperatorAdapter",no_init)
160        .def("nullifyRowsAndCols",&finley::SystemMatrixAdapter::nullifyRowsAndCols)        .def("nullifyRowsAndCols",&finley::SystemMatrixAdapter::nullifyRowsAndCols)
161        .def("setValue",&finley::SystemMatrixAdapter::setValue)        .def("resetValues",&finley::SystemMatrixAdapter::resetValues)
162        .def("resetSolver",&finley::SystemMatrixAdapter::resetSolver)        .def("saveMM",&finley::SystemMatrixAdapter::saveMM)
163        .def("saveMM",&finley::SystemMatrixAdapter::saveMM);        .def("saveHB",&finley::SystemMatrixAdapter::saveHB);
164    
165  }  }

Legend:
Removed from v.110  
changed lines
  Added in v.934

  ViewVC Help
Powered by ViewVC 1.1.26