create_polar(const PointWrapper center);
/**
- * Create CylindricalManifold.
+ * Create CylindricalManifold along the fixed axis.
*/
void
create_cylindrical(const int axis = 0, const double tolerance = 1e-10);
+ /**
+ * Create CylindricalManifold with the given orientation.
+ */
+ void
+ create_cylindrical(const boost::python::list &direction,
+ const boost::python::list &axial_point);
+
/**
* Create FunctionManifold with string expressions for the push
* forward and pull back functions.
" forward and pull back functions. \n";
- const char create_cylindrical_docstring[] =
- " Create cylindrical manifold along a given axis \n"
+ const char create_cylindrical_fixed_docstring[] =
+ " Create cylindrical manifold oriented along a given axis \n"
" (0 - x, 1 - y, 2 - z). \n";
+ const char create_cylindrical_direction_docstring[] =
+ " Create cylindrical manifold with an axis that points in \n"
+ " direction direction and goes through the given point on \n"
+ " axis. \n";
+
void
export_manifold()
create_polar_docstring,
boost::python::args("self", "center"))
.def("create_cylindrical",
- &ManifoldWrapper::create_cylindrical,
+ static_cast<void (ManifoldWrapper::*)(const int, const double)>(
+ &ManifoldWrapper::create_cylindrical),
create_cylindrical_overloads(
boost::python::args("self", "axis", "tolerance"),
- create_cylindrical_docstring))
+ create_cylindrical_fixed_docstring))
+ .def("create_cylindrical",
+ static_cast<void (ManifoldWrapper::*)(const boost::python::list &,
+ const boost::python::list &)>(
+ &ManifoldWrapper::create_cylindrical),
+ create_cylindrical_direction_docstring,
+ boost::python::args("self", "direction", "axial_point"))
.def("create_function",
&ManifoldWrapper::create_function,
create_function_docstring,
const char barycenter_docstring[] =
"Return the barycenter of the current face \n";
+ const char center_docstring[] =
+ "Return the center of the current face taking into account manifold.\n";
+
const char set_vertex_docstring[] =
" Set the ith vertex of the face to point_wrapper \n";
&TriaAccessorWrapper::get_barycenter,
barycenter_docstring,
boost::python::args("self"))
+ .def("center",
+ &TriaAccessorWrapper::get_center,
+ barycenter_docstring,
+ boost::python::args("self"))
.def("set_vertex",
&TriaAccessorWrapper::set_vertex,
set_vertex_docstring,
+ template <int dim, int spacedim>
+ Manifold<dim, spacedim> *
+ create_cylindrical_manifold(const boost::python::list &direction_list,
+ const boost::python::list &axial_point_list)
+ {
+ Tensor<1, spacedim> direction;
+ for (int d = 0; d < spacedim; ++d)
+ direction[d] = boost::python::extract<double>(direction_list[d]);
+
+ Point<spacedim> axial_point;
+ for (int d = 0; d < spacedim; ++d)
+ axial_point[d] = boost::python::extract<double>(axial_point_list[d]);
+
+ return new CylindricalManifold<dim, spacedim>(direction, axial_point);
+ }
+
+
+
template <int dim, int spacedim>
Manifold<dim, spacedim> *
create_function_manifold(const std::string &push_forward,
+ void
+ ManifoldWrapper::create_cylindrical(const boost::python::list &direction,
+ const boost::python::list &axial_point)
+ {
+ if ((dim == 2) && (spacedim == 3))
+ {
+ manifold_ptr =
+ internal::create_cylindrical_manifold<2, 3>(direction, axial_point);
+ }
+ else if ((dim == 3) && (spacedim == 3))
+ {
+ manifold_ptr =
+ internal::create_cylindrical_manifold<3, 3>(direction, axial_point);
+ }
+ else
+ AssertThrow(false,
+ ExcMessage(
+ "Given dim-spacedim combination is not implemented."));
+ }
+
+
+
void
ManifoldWrapper::create_function_string(const std::string &push_forward,
const std::string &pull_back)