[cig-commits] r13065 - cs/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Wed Oct 15 02:08:12 PDT 2008
Author: luis
Date: 2008-10-15 02:08:12 -0700 (Wed, 15 Oct 2008)
New Revision: 13065
Added:
cs/cigma/trunk/src/py_Cell.cpp
Log:
Testing python wrapper to cigma::tet4
Added: cs/cigma/trunk/src/py_Cell.cpp
===================================================================
--- cs/cigma/trunk/src/py_Cell.cpp (rev 0)
+++ cs/cigma/trunk/src/py_Cell.cpp 2008-10-15 09:08:12 UTC (rev 13065)
@@ -0,0 +1,26 @@
+#include "Cell.h"
+#include "fe_tet4.h"
+#include "numpy_util.h"
+#include <iostream>
+
+using namespace cigma;
+using namespace boost::python;
+
+class pyQuadrature;
+
+struct py_tet4 : tet4
+{
+ py_tet4() {}
+ ~py_tet4() {}
+};
+
+void export_Cell()
+{
+ using namespace boost::python;
+ class_<py_tet4, boost::noncopyable>("tet4")
+ .def("n_nodes", &py_tet4::n_nodes)
+ .def("n_celldim", &py_tet4::n_celldim)
+ .def("n_dim", &py_tet4::n_dim)
+ .def("default_quadrature", &py_tet4::default_quadrature)
+ ;
+}
More information about the cig-commits
mailing list