/[escript]/trunk/escript/src/escriptcpp.cpp
ViewVC logotype

Diff of /trunk/escript/src/escriptcpp.cpp

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

revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC revision 1796 by jfenwick, Wed Sep 17 01:45:46 2008 UTC
# Line 21  Line 21 
21  #include "AbstractDomain.h"  #include "AbstractDomain.h"
22  #include "Utils.h"  #include "Utils.h"
23  #include "AbstractSystemMatrix.h"  #include "AbstractSystemMatrix.h"
24    #include "AbstractTransportProblem.h"
25  #include "DataVector.h"  #include "DataVector.h"
26    
27  extern "C" {  extern "C" {
# Line 82  BOOST_PYTHON_MODULE(escriptcpp) Line 83  BOOST_PYTHON_MODULE(escriptcpp)
83    def("blocktimer_reportSortByTime",blocktimer_reportSortByTime);    def("blocktimer_reportSortByTime",blocktimer_reportSortByTime);
84    def("blocktimer_increment",blocktimer_increment);    def("blocktimer_increment",blocktimer_increment);
85    def("blocktimer_time",blocktimer_time);    def("blocktimer_time",blocktimer_time);
   def("blocktimer_reportSystemInfo",blocktimer_reportSystemInfo);  
86    def("getVersion",escript::getSvnVersion);    def("getVersion",escript::getSvnVersion);
87      def("printParallelThreadCounts",escript::printParallelThreadCnt);
88    
89    
90    //    //
# Line 114  BOOST_PYTHON_MODULE(escriptcpp) Line 115  BOOST_PYTHON_MODULE(escriptcpp)
115    //    //
116    // Interface for FunctionSpace    // Interface for FunctionSpace
117    //    //
118    class_<escript::FunctionSpace>("FunctionSpace",init<>())    class_<escript::FunctionSpace> fs_definer("FunctionSpace",init<>());
119       .def("getDim",&escript::FunctionSpace::getDim)    fs_definer.def("getDim",&escript::FunctionSpace::getDim);
120       .def("getDomain",&escript::FunctionSpace::getDomain,return_internal_reference<>())    fs_definer.def("getDomain",&escript::FunctionSpace::getDomain,
121       .def("getX",&escript::FunctionSpace::getX)                   return_internal_reference<>());
122       .def("getNormal",&escript::FunctionSpace::getNormal)    fs_definer.def("getX",&escript::FunctionSpace::getX);
123       .def("getSize",&escript::FunctionSpace::getSize)    fs_definer.def("getNormal",&escript::FunctionSpace::getNormal);
124       .def("setTags",&escript::FunctionSpace::setTags)    fs_definer.def("getSize",&escript::FunctionSpace::getSize);
125       .def("getTagFromDataPointNo",&escript::FunctionSpace::getTagFromDataPointNo)    fs_definer.def("setTags",&escript::FunctionSpace::setTags);
126       .def("__str__",&escript::FunctionSpace::toString)    fs_definer.def("getTagFromDataPointNo",
127       .def(self == self)                   &escript::FunctionSpace::getTagFromDataPointNo);
128       .def(self != self);    fs_definer.def("getReferenceIDFromDataPointNo", &escript::FunctionSpace::getReferenceIDFromDataPointNo);
129      fs_definer.def("getListOfTags",&escript::FunctionSpace::getListOfTags);
130      fs_definer.def("__str__", &escript::FunctionSpace::toString);
131      fs_definer.def(self == self);
132      fs_definer.def(self != self);
133    //    //
134    // Interface for Data    // Interface for Data
135    //    //
# Line 166  BOOST_PYTHON_MODULE(escriptcpp) Line 171  BOOST_PYTHON_MODULE(escriptcpp)
171      .def("saveDX",&escript::Data::saveDX)      .def("saveDX",&escript::Data::saveDX)
172      .def("saveVTK",&escript::Data::saveVTK)      .def("saveVTK",&escript::Data::saveVTK)
173      .def("getTagNumber",&escript::Data::getTagNumber)      .def("getTagNumber",&escript::Data::getTagNumber)
     .def("archiveData",&escript::Data::archiveData)  
     .def("extractData",&escript::Data::extractData)  
174      // Unary functions for Data      // Unary functions for Data
175      .def("_interpolate",&escript::Data::interpolate)      .def("_interpolate",&escript::Data::interpolate)
176      .def("_grad",&escript::Data::gradOn)      .def("_grad",&escript::Data::gradOn)
# Line 319  BOOST_PYTHON_MODULE(escriptcpp) Line 322  BOOST_PYTHON_MODULE(escriptcpp)
322       .def("saveHB",&escript::AbstractSystemMatrix::saveHB)       .def("saveHB",&escript::AbstractSystemMatrix::saveHB)
323       .def("resetValues",&escript::AbstractSystemMatrix::resetValues)       .def("resetValues",&escript::AbstractSystemMatrix::resetValues)
324       .def(self*other<escript::Data>());       .def(self*other<escript::Data>());
325      //
326      // Interface for AbstractTransportProblem
327      //
328      class_<escript::AbstractTransportProblem>("TransportProblem",init<>())
329         .def("isEmpty",&escript::AbstractTransportProblem::isEmpty)
330         .def("solve",&escript::AbstractTransportProblem::solve)
331         .def("setInitialValue",&escript::AbstractTransportProblem::setInitialValue)
332         .def("insertConstraint",&escript::AbstractTransportProblem::insertConstraint)
333         .def("reset",&escript::AbstractTransportProblem::resetTransport)
334         .def("getSafeTimeStepSize",&escript::AbstractTransportProblem::getSafeTimeStepSize);
335    
336    //    //
337    // Register esysExceptionTranslator    // Register esysExceptionTranslator

Legend:
Removed from v.1312  
changed lines
  Added in v.1796

  ViewVC Help
Powered by ViewVC 1.1.26