#
# ---------------------------------------------------------------------
-from .PyDealII import *
-
-__all__ = ['PyDealII']
-__doc__ = PyDealII.__doc__
+__doc__ = 'PyDealII is just an empty shell. You need to either\n\
+ import PyDealII.Debug or PyDealII.Release. Do not\n\
+ import both of them.'
{
const CellAccessor<dim,spacedim> *cell =
static_cast<const CellAccessor<dim,spacedim>*>(cell_accessor);
- cell->manifold_id();
+ return cell->manifold_id();
}
}
int CellAccessorWrapper::get_manifold_id() const
{
if ((dim == 2) && (spacedim == 2))
- internal::get_manifold_id<2,2>(cell_accessor);
+ return internal::get_manifold_id<2,2>(cell_accessor);
else if ((dim== 2) && (spacedim == 3))
- internal::get_manifold_id<2,3>(cell_accessor);
+ return internal::get_manifold_id<2,3>(cell_accessor);
else
- internal::get_manifold_id<3,3>(cell_accessor);
+ return internal::get_manifold_id<3,3>(cell_accessor);
}
}
else
AssertThrow(false,
ExcMessage("The z coordinate is only available for three-dimensional points"));
+ // Silence a warning
+ return 0.;
}
" \n"
"PyDealII \n"
"======== \n"
- "Some interesting doc. \n"
+ "This module contains the python bindings to deal.II. \n"
+ "The Debug module uses deal.II compiled in Debug mode while \n"
+ "the Release module uses deal.II compiled in Release mode. \n"
;
-BOOST_PYTHON_MODULE(PyDealII)
+#ifdef DEBUG
+
+BOOST_PYTHON_MODULE(Debug)
{
boost::python::scope().attr("__doc__") = pydealii_docstring;
dealii::python::export_triangulation();
}
+#else
+
+BOOST_PYTHON_MODULE(Release)
+{
+ boost::python::scope().attr("__doc__") = pydealii_docstring;
+
+ boost::python::docstring_options doc_options;
+ doc_options.enable_user_defined();
+ doc_options.enable_py_signatures();
+ doc_options.disable_cpp_signatures();
+
+ dealii::python::export_cell_accessor();
+ dealii::python::export_point();
+ dealii::python::export_triangulation();
+}
+
+#endif
+
#endif
# ---------------------------------------------------------------------
import unittest
-from pydealii.PyDealII import *
+from PyDealII.Debug import *
class TestCellAccessorWrapper(unittest.TestCase):
# ---------------------------------------------------------------------
import unittest
-from pydealii.PyDealII import *
+from PyDealII.Debug import *
class TestPointWrapper(unittest.TestCase):
# ---------------------------------------------------------------------
import unittest
-from pydealii.PyDealII import *
+from PyDealII.Debug import *
class TestTriangulationWrapper(unittest.TestCase):