/[escript]/trunk/weipa/src/weipacpp.cpp
ViewVC logotype

Annotation of /trunk/weipa/src/weipacpp.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3981 - (hide annotations)
Fri Sep 21 02:47:54 2012 UTC (7 years ago) by jfenwick
File size: 2589 byte(s)
First pass of updating copyright notices
1 caltinay 2812
2 jfenwick 3981 /*****************************************************************************
3 caltinay 2812 *
4 jfenwick 3911 * Copyright (c) 2003-2012 by University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 caltinay 2812 *
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 caltinay 2812
16    
17 caltinay 3128 #include <escript/Data.h>
18    
19     #include <weipa/EscriptDataset.h>
20 caltinay 3096 #include <weipa/VisItControl.h>
21 caltinay 2812
22     #include <boost/python.hpp>
23     #include <boost/python/module.hpp>
24     #include <boost/python/def.hpp>
25     #include <boost/python/object.hpp>
26     #include <boost/version.hpp>
27    
28     using namespace boost::python;
29    
30 caltinay 3037 /*! \page weipa Weipa
31     * Weipa is the python module that contains the interfaces
32 caltinay 2812 * to the C++ side of the escript data exporter.
33     *
34     *
35     *
36     * \section class_desc Class Description:
37     * None
38     *
39     * \section class_limits Class Limitations:
40     * None
41     *
42     * \section class_conds Class Conditions of Use:
43     * None
44     *
45     * \section class_throws Throws:
46     * None
47     *
48     */
49    
50 caltinay 3037 BOOST_PYTHON_MODULE(weipacpp)
51 caltinay 2812 {
52     #if BOOST_VERSION >= 103500
53     // params are: bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures
54     docstring_options docopt(true,true,false);
55     #endif
56    
57 caltinay 3128 class_<weipa::EscriptDataset>("EscriptDataset","Represents an escript dataset including a domain and data variables for one timestep. It is used for exporting", init<>())
58     .def("setDomain", &weipa::EscriptDataset::setDomain)
59     .def("addData", &weipa::EscriptDataset::addData, (arg("data"), arg("name"), arg("units")=""))
60     .def("setCycleAndTime", &weipa::EscriptDataset::setCycleAndTime, args("cycle","time"))
61     .def("setMeshLabels", &weipa::EscriptDataset::setMeshLabels, (arg("x"),arg("y"),arg("z")=""))
62     .def("setMeshUnits", &weipa::EscriptDataset::setMeshUnits, (arg("x"),arg("y"),arg("z")=""))
63 caltinay 3361 .def("setMetadataSchemaString", &weipa::EscriptDataset::setMetadataSchemaString, (arg("schema")="", arg("metadata")=""))
64 caltinay 3623 .def("setSaveMeshData", &weipa::EscriptDataset::setSaveMeshData)
65 caltinay 3627 .def("saveSilo", &weipa::EscriptDataset::saveSilo, (arg("filename"), arg("useMultimesh")=true))
66     .def("saveVTK", &weipa::EscriptDataset::saveVTK, args("filename"));
67 caltinay 2812
68 caltinay 3128 // VisIt Control
69     def("visitInitialize", weipa::VisItControl::initialize, (arg("simFile"), arg("comment")=""));
70     def("visitPublishData", weipa::VisItControl::publishData, args("dataset"));
71 caltinay 2812 }
72    

  ViewVC Help
Powered by ViewVC 1.1.26