--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+#ifndef dealii_boost_adaptor_point_h
+#define dealii_boost_adaptor_point_h
+
+#include <deal.II/base/point.h>
+
+#include <boost/geometry.hpp>
+
+
+namespace boost
+{
+ namespace geometry
+ {
+ namespace traits
+ {
+ /**
+ * Tag adaptor for dealii::Point.
+ */
+ template <int dim, class Number>
+ struct tag<dealii::Point<dim, Number>>
+ {
+ typedef point_tag type;
+ };
+
+ /**
+ * Coordinate type adaptor for dealii::Point.
+ */
+ template <int dim, class Number>
+ struct coordinate_type<dealii::Point<dim, Number>>
+ {
+ typedef Number type;
+ };
+
+ /**
+ * Coordinate system adaptor for dealii::Point. By default, we assume
+ * that a dealii Point is cartesian point.
+ */
+ template <int dim, class Number>
+ struct coordinate_system<dealii::Point<dim, Number>>
+ {
+ typedef cs::cartesian type;
+ };
+
+ /**
+ * Dimension adaptor.
+ */
+ template <int dim, class Number>
+ struct dimension<dealii::Point<dim, Number>> : boost::mpl::int_<dim>
+ {};
+
+ /**
+ * Getter function for D-th coordinate of a dealii Point.
+ */
+ template <size_t D, int dim, class Number>
+ struct access<dealii::Point<dim, Number>, D>
+ {
+ static inline double
+ get(dealii::Point<dim, Number> const &p)
+ {
+ return p[D];
+ }
+
+ /**
+ * Setter function for D-th coordinate of a dealii Point.
+ */
+ static inline void
+ set(dealii::Point<dim, Number> &p, Number value)
+ {
+ p[D] = value;
+ }
+ };
+ } // namespace traits
+ } // namespace geometry
+} // namespace boost
+
+
+
+#endif
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+// Check that boost adaptors for points work
+
+#include <deal.II/boost_adaptors/point.h>
+
+#include "../tests.h"
+
+namespace bg = boost::geometry;
+
+using bgPoint = bg::model::point<double, 3, bg::cs::cartesian>;
+
+int
+main(int argc, char **argv)
+{
+ initlog();
+
+ Point<3> p(1, 2, 3);
+ if (bg::equals(p, bg::make<Point<3>>(1, 2, 3)) == false)
+ deallog << "NOT OK" << std::endl;
+ else
+ deallog << "OK" << std::endl;
+
+ if (bg::equals(p, bg::make<bgPoint>(1., 2., 3.)) == false)
+ deallog << "NOT OK" << std::endl;
+ else
+ deallog << "OK" << std::endl;
+}