/[escript]/trunk/pasowrap/src/pasowrapcpp.cpp
ViewVC logotype

Annotation of /trunk/pasowrap/src/pasowrapcpp.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3991 - (hide annotations)
Tue Sep 25 23:52:22 2012 UTC (6 years, 11 months ago) by caltinay
File size: 2613 byte(s)
Updated doxygen cfg file and made a few first changes to doco.

1 jfenwick 3661
2 jfenwick 3981 /*****************************************************************************
3 jfenwick 3661 *
4 jfenwick 3911 * Copyright (c) 2003-2012 by University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 jfenwick 3661 *
7     * Primary Business: Queensland, Australia
8     * Licensed under the Open Software License version 3.0
9     * http://www.opensource.org/licenses/osl-3.0.php
10     *
11 jfenwick 3981 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12     * Development since 2012 by School of Earth Sciences
13     *
14     *****************************************************************************/
15 jfenwick 3661
16    
17 jfenwick 3676
18 jfenwick 3661 extern "C" {
19 jfenwick 3672 #include <paso/Paso.h>
20 jfenwick 3661 }
21    
22     #include "SystemMatrixAdapter.h"
23     #include "TransportProblemAdapter.h"
24    
25 jfenwick 3676 #include "PasoException.h"
26 jfenwick 3661 #include "esysUtils/esysExceptionTranslator.h"
27    
28     #include "escript/AbstractContinuousDomain.h"
29    
30     #include <boost/python.hpp>
31     #include <boost/python/module.hpp>
32     #include <boost/python/def.hpp>
33     #include <boost/python/detail/defaults_gen.hpp>
34     #include <boost/version.hpp>
35    
36     using namespace boost::python;
37    
38 jfenwick 3672 BOOST_PYTHON_MODULE(pasowrapcpp)
39 jfenwick 3661 {
40     // This feature was added in boost v1.34
41     #if ((BOOST_VERSION/100)%1000 > 34) || (BOOST_VERSION/100000 >1)
42     // params are: bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures
43     docstring_options docopt(true, true, false);
44     #endif
45    
46    
47 jfenwick 3672 register_exception_translator<paso::PasoException>(&(esysUtils::esysExceptionTranslator));
48 jfenwick 3661
49 jfenwick 3672 class_<paso::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >
50 jfenwick 3661 ("OperatorAdapter","A concrete class representing an operator. For more details, please see the c++ documentation.", no_init)
51 jfenwick 3672 .def("print_matrix_info",&paso::SystemMatrixAdapter::Print_Matrix_Info,(arg("full")=false),"prints information about a system matrix")
52     .def("nullifyRowsAndCols",&paso::SystemMatrixAdapter::nullifyRowsAndCols)
53     .def("resetValues",&paso::SystemMatrixAdapter::resetValues, "resets the matrix entries")
54     .def("saveMM",&paso::SystemMatrixAdapter::saveMM,args("fileName"),
55 jfenwick 3661 "writes the matrix to a file using the Matrix Market file format")
56 jfenwick 3672 .def("saveHB",&paso::SystemMatrixAdapter::saveHB, args("filename"),
57 jfenwick 3661 "writes the matrix to a file using the Harwell-Boeing file format");
58    
59 jfenwick 3672 class_<paso::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >
60 jfenwick 3661 ("TransportProblemAdapter","",no_init)
61 jfenwick 3672 .def("getSafeTimeStepSize",&paso::TransportProblemAdapter::getSafeTimeStepSize)
62     .def("getUnlimitedTimeStepSize",&paso::TransportProblemAdapter::getUnlimitedTimeStepSize)
63     .def("resetTransport",&paso::TransportProblemAdapter::resetTransport,
64 jfenwick 3661 "resets the transport operator typically as they have been updated");
65     }

  ViewVC Help
Powered by ViewVC 1.1.26