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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2012 by University of Queensland
5 * http://www.uq.edu.au
6 *
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 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15
16
17 #include <escript/Data.h>
18
19 #include <weipa/EscriptDataset.h>
20 #include <weipa/VisItControl.h>
21
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 BOOST_PYTHON_MODULE(weipacpp)
31 {
32 #if BOOST_VERSION >= 103500
33 // params are: bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures
34 docstring_options docopt(true,true,false);
35 #endif
36
37 class_<weipa::EscriptDataset>("EscriptDataset","Represents an escript dataset including a domain and data variables for one timestep. It is used for exporting", init<>())
38 .def("setDomain", &weipa::EscriptDataset::setDomain)
39 .def("addData", &weipa::EscriptDataset::addData, (arg("data"), arg("name"), arg("units")=""))
40 .def("setCycleAndTime", &weipa::EscriptDataset::setCycleAndTime, args("cycle","time"))
41 .def("setMeshLabels", &weipa::EscriptDataset::setMeshLabels, (arg("x"),arg("y"),arg("z")=""))
42 .def("setMeshUnits", &weipa::EscriptDataset::setMeshUnits, (arg("x"),arg("y"),arg("z")=""))
43 .def("setMetadataSchemaString", &weipa::EscriptDataset::setMetadataSchemaString, (arg("schema")="", arg("metadata")=""))
44 .def("setSaveMeshData", &weipa::EscriptDataset::setSaveMeshData)
45 .def("saveSilo", &weipa::EscriptDataset::saveSilo, (arg("filename"), arg("useMultimesh")=true))
46 .def("saveVTK", &weipa::EscriptDataset::saveVTK, args("filename"));
47
48 // VisIt Control
49 def("visitInitialize", weipa::VisItControl::initialize, (arg("simFile"), arg("comment")=""));
50 def("visitPublishData", weipa::VisItControl::publishData, args("dataset"));
51 }
52

  ViewVC Help
Powered by ViewVC 1.1.26