/[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 1417 by gross, Mon Feb 25 04:45:48 2008 UTC revision 1811 by ksteube, Thu Sep 25 23:11:13 2008 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2008 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  #include "Data.h"  #include "Data.h"
16  #include "FunctionSpace.h"  #include "FunctionSpace.h"
# Line 23  Line 22 
22  #include "AbstractSystemMatrix.h"  #include "AbstractSystemMatrix.h"
23  #include "AbstractTransportProblem.h"  #include "AbstractTransportProblem.h"
24  #include "DataVector.h"  #include "DataVector.h"
25    #include "paso/Paso_MPI.h"
26    
27  extern "C" {  extern "C" {
28  #include "escript/blocktimer.h"  #include "escript/blocktimer.h"
# Line 84  BOOST_PYTHON_MODULE(escriptcpp) Line 84  BOOST_PYTHON_MODULE(escriptcpp)
84    def("blocktimer_increment",blocktimer_increment);    def("blocktimer_increment",blocktimer_increment);
85    def("blocktimer_time",blocktimer_time);    def("blocktimer_time",blocktimer_time);
86    def("getVersion",escript::getSvnVersion);    def("getVersion",escript::getSvnVersion);
87      def("printParallelThreadCounts",escript::printParallelThreadCnt);
88      def("getMPISizeWorld",escript::getMPISizeWorld);
89      def("getMPIRankWorld",escript::getMPIRankWorld);
90    
91    
92    //    //
# Line 95  BOOST_PYTHON_MODULE(escriptcpp) Line 98  BOOST_PYTHON_MODULE(escriptcpp)
98       .def("isValidTagName",&escript::AbstractDomain::isValidTagName)       .def("isValidTagName",&escript::AbstractDomain::isValidTagName)
99       .def("showTagNames",&escript::AbstractDomain::showTagNames)       .def("showTagNames",&escript::AbstractDomain::showTagNames)
100       .def("getX",&escript::AbstractDomain::getX)       .def("getX",&escript::AbstractDomain::getX)
101         .def("getDim",&escript::AbstractDomain::getDim)
102       .def("getNormal",&escript::AbstractDomain::getNormal)       .def("getNormal",&escript::AbstractDomain::getNormal)
103       .def("getSize",&escript::AbstractDomain::getSize)       .def("getSize",&escript::AbstractDomain::getSize)
104       .def("saveVTK",&escript::AbstractDomain::saveVTK)       .def("saveVTK",&escript::AbstractDomain::saveVTK)
# Line 114  BOOST_PYTHON_MODULE(escriptcpp) Line 118  BOOST_PYTHON_MODULE(escriptcpp)
118    //    //
119    // Interface for FunctionSpace    // Interface for FunctionSpace
120    //    //
121    class_<escript::FunctionSpace>("FunctionSpace",init<>())    class_<escript::FunctionSpace> fs_definer("FunctionSpace",init<>());
122       .def("getDim",&escript::FunctionSpace::getDim)    fs_definer.def("getDim",&escript::FunctionSpace::getDim);
123       .def("getDomain",&escript::FunctionSpace::getDomain,return_internal_reference<>())    fs_definer.def("getDomain",&escript::FunctionSpace::getDomain,
124       .def("getX",&escript::FunctionSpace::getX)                   return_internal_reference<>());
125       .def("getNormal",&escript::FunctionSpace::getNormal)    fs_definer.def("getX",&escript::FunctionSpace::getX);
126       .def("getSize",&escript::FunctionSpace::getSize)    fs_definer.def("getNormal",&escript::FunctionSpace::getNormal);
127       .def("setTags",&escript::FunctionSpace::setTags)    fs_definer.def("getSize",&escript::FunctionSpace::getSize);
128       .def("getTagFromDataPointNo",&escript::FunctionSpace::getTagFromDataPointNo)    fs_definer.def("setTags",&escript::FunctionSpace::setTags);
129       .def("__str__",&escript::FunctionSpace::toString)    fs_definer.def("getTagFromDataPointNo",
130       .def(self == self)                   &escript::FunctionSpace::getTagFromDataPointNo);
131       .def(self != self);    fs_definer.def("getReferenceIDFromDataPointNo", &escript::FunctionSpace::getReferenceIDFromDataPointNo);
132      fs_definer.def("getListOfTags",&escript::FunctionSpace::getListOfTags);
133      fs_definer.def("__str__", &escript::FunctionSpace::toString);
134      fs_definer.def(self == self);
135      fs_definer.def(self != self);
136    //    //
137    // Interface for Data    // Interface for Data
138    //    //
# Line 155  BOOST_PYTHON_MODULE(escriptcpp) Line 163  BOOST_PYTHON_MODULE(escriptcpp)
163      .def("expand",&escript::Data::expand)      .def("expand",&escript::Data::expand)
164      .def("tag",&escript::Data::tag)      .def("tag",&escript::Data::tag)
165      .def("copy",&escript::Data::copy)      .def("copy",&escript::Data::copy)
166        .def("copy",&escript::Data::copySelf,return_value_policy<manage_new_object>())
167      .def("setValueOfDataPoint",&escript::Data::setValueOfDataPointToPyObject)      .def("setValueOfDataPoint",&escript::Data::setValueOfDataPointToPyObject)
168      .def("setValueOfDataPoint",&escript::Data::setValueOfDataPointToArray)      .def("setValueOfDataPoint",&escript::Data::setValueOfDataPointToArray)
169      .def("setValueOfDataPoint",&escript::Data::setValueOfDataPoint)      .def("setValueOfDataPoint",&escript::Data::setValueOfDataPoint)
# Line 166  BOOST_PYTHON_MODULE(escriptcpp) Line 175  BOOST_PYTHON_MODULE(escriptcpp)
175      .def("saveDX",&escript::Data::saveDX)      .def("saveDX",&escript::Data::saveDX)
176      .def("saveVTK",&escript::Data::saveVTK)      .def("saveVTK",&escript::Data::saveVTK)
177      .def("getTagNumber",&escript::Data::getTagNumber)      .def("getTagNumber",&escript::Data::getTagNumber)
     .def("archiveData",&escript::Data::archiveData)  
     .def("extractData",&escript::Data::extractData)  
178      // Unary functions for Data      // Unary functions for Data
179      .def("_interpolate",&escript::Data::interpolate)      .def("_interpolate",&escript::Data::interpolate)
180      .def("_grad",&escript::Data::gradOn)      .def("_grad",&escript::Data::gradOn)

Legend:
Removed from v.1417  
changed lines
  Added in v.1811

  ViewVC Help
Powered by ViewVC 1.1.26