template<int dim>
void check_parallelepiped (bool colorize, bool log)
{
- Tensor<2, dim> corners = Tensor<2, dim> ();
+ // Data structure defining dim coordinates that make up a
+ // parallelepiped.
+ Point<dim> (corners) [dim];
// build corners for this particular dim:
switch (dim)
// Here is the implementation in 1d:
void check_1d_parallelepiped_by_comparison (bool log)
{
- // build corners for this particular dim:
- Tensor<2, 1> corners = Tensor<2, 1> ();
+ // Data structure defining dim coordinates that make up a
+ // parallelepiped.
+ Point<1> (corners) [1];
corners[0] = Point<1> (0.5);
Triangulation<1> triangulation_parallelepiped;
triangulation_cube))
logfile << "OK" << std::endl;
else
- logfile << "not OK... coarse grid are different but they should be the same!"
+ logfile << "not OK... coarse grids are different but they should be the same"
<< std::endl;
}
}
+// @todo When the interface to parallelogram is updated, define TWO_D_TEST
+
+#ifdef TWO_D_TEST
// Here is the implementation in 2d:
void check_2d_parallelepiped_by_comparison (bool log)
{
// build corners for this particular dim that are known to give the
// same output order as parallelogram:
- Tensor<2, 2> corners = Tensor<2, 2> ();
+ Point<2> (corners) [2];
corners[0] = Point<2> (0.0, 0.5);
corners[1] = Point<2> (0.5, 0.0);
if (GridTools::have_same_coarse_mesh (triangulation_parallelepiped,
triangulation_parallelogram))
logfile << "OK" << std::endl;
+
else
- logfile << "not OK... coarse grid are different but they should be the same!"
+ logfile << "not OK... coarse grids are different but they should be the same"
<< std::endl;
}
}
+#endif
int main ()
{
// Check parallelepiped
check_1d_parallelepiped_by_comparison (true);
+#ifdef TWO_D_TEST
check_2d_parallelepiped_by_comparison (true);
+#endif
}