* - manifold id to numbers::flat_manifold_id
*/
CellData();
+
+ /**
+ * Boost serialization function
+ */
+ template <class Archive>
+ void
+ serialize(Archive &ar, const unsigned int version);
};
manifold_id = numbers::flat_manifold_id;
}
+template <int structdim>
+template <class Archive>
+void
+CellData<structdim>::serialize(Archive &ar, const unsigned int /*version*/)
+{
+ ar &vertices;
+ ar &material_id;
+ ar &boundary_id;
+ ar &manifold_id;
+}
+
namespace internal
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2019 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 serialization for CellData<structdim>
+
+#include <deal.II/grid/tria.h>
+
+#include <boost/serialization/vector.hpp>
+
+#include "serialization.h"
+
+namespace dealii
+{
+ template <int structdim>
+ bool
+ operator==(const CellData<structdim> &t1, const CellData<structdim> &t2)
+ {
+ for (unsigned int i = 0; i < GeometryInfo<structdim>::vertices_per_cell;
+ i++)
+ if (t1.vertices[i] != t2.vertices[i])
+ return false;
+
+ if (t1.material_id != t2.material_id)
+ return false;
+ if (t1.boundary_id != t2.boundary_id)
+ return false;
+ if (t1.manifold_id != t2.manifold_id)
+ return false;
+ return true;
+ }
+} // namespace dealii
+
+template <int structdim>
+void
+test()
+{
+ dealii::CellData<structdim> t1;
+
+ for (unsigned int i = 0; i < GeometryInfo<structdim>::vertices_per_cell; i++)
+ t1.vertices[i] = i;
+ t1.material_id = 0;
+ t1.boundary_id = 1;
+ t1.manifold_id = 2;
+
+ {
+ dealii::CellData<structdim> t2 = t1;
+ verify(t1, t2);
+ }
+
+ // test vertices
+ for (unsigned int i = 0; i < GeometryInfo<structdim>::vertices_per_cell; i++)
+ {
+ dealii::CellData<structdim> t2 = t1;
+ t2.vertices[i]++;
+ verify(t1, t2);
+ }
+
+ // test material_id
+ {
+ dealii::CellData<structdim> t2 = t1;
+ t2.material_id++;
+ verify(t1, t2);
+ }
+
+ // test boundary_id
+ {
+ dealii::CellData<structdim> t2 = t1;
+ t2.boundary_id++;
+ verify(t1, t2);
+ }
+
+ // test manifold_id
+ {
+ dealii::CellData<structdim> t2 = t1;
+ t2.manifold_id++;
+ verify(t1, t2);
+ }
+}
+
+
+int
+main()
+{
+ initlog();
+ deallog << std::setprecision(3);
+
+ test<1>();
+ test<2>();
+ test<3>();
+
+ deallog << "OK" << std::endl;
+}
--- /dev/null
+
+DEAL::0 0 2 0 1 1 1 2
+
+DEAL::0 0 2 0 1 1 1 2
+
+DEAL::0 0 2 0 1 1 1 2
+
+DEAL::0 0 2 0 1 1 1 2
+
+DEAL::0 0 2 0 1 1 1 2
+
+DEAL::0 0 2 0 1 1 1 2
+
+DEAL::0 0 4 0 1 2 3 1 1 2
+
+DEAL::0 0 4 0 1 2 3 1 1 2
+
+DEAL::0 0 4 0 1 2 3 1 1 2
+
+DEAL::0 0 4 0 1 2 3 1 1 2
+
+DEAL::0 0 4 0 1 2 3 1 1 2
+
+DEAL::0 0 4 0 1 2 3 1 1 2
+
+DEAL::0 0 4 0 1 2 3 1 1 2
+
+DEAL::0 0 4 0 1 2 3 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::0 0 8 0 1 2 3 4 5 6 7 1 1 2
+
+DEAL::OK