From 556f0199bfd47f00448209b91e63c9bb04f98053 Mon Sep 17 00:00:00 2001 From: heister Date: Mon, 18 Nov 2013 01:43:40 +0000 Subject: [PATCH] fix template instantiations for GridGenerator::parallelogram, do not pass array as a reference git-svn-id: https://svn.dealii.org/trunk@31695 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/grid/grid_generator.h | 2 +- deal.II/source/grid/grid_generator.cc | 40 ++++++++++++++++++- deal.II/source/grid/grid_generator.inst.in | 11 +++++ 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/deal.II/include/deal.II/grid/grid_generator.h b/deal.II/include/deal.II/grid/grid_generator.h index a3f4021278..7307374abe 100644 --- a/deal.II/include/deal.II/grid/grid_generator.h +++ b/deal.II/include/deal.II/grid/grid_generator.h @@ -205,7 +205,7 @@ namespace GridGenerator template void parallelogram (Triangulation &tria, - const Point (&corners) [dim], + const Point corners[dim], const bool colorize=false); /** diff --git a/deal.II/source/grid/grid_generator.cc b/deal.II/source/grid/grid_generator.cc index 298de0aac3..b129a9d711 100644 --- a/deal.II/source/grid/grid_generator.cc +++ b/deal.II/source/grid/grid_generator.cc @@ -629,11 +629,30 @@ namespace GridGenerator } + + template<> + void + parallelogram (Triangulation<3> &tria, + const Point<3> corners[3], + const bool colorize) + { + Assert (false, ExcNotImplemented()); + } + + template<> + void + parallelogram (Triangulation<1> &tria, + const Point<1> corners[1], + const bool colorize) + { + Assert (false, ExcNotImplemented()); + } + // Implementation for 2D only template<> void parallelogram (Triangulation<2> &tria, - const Point<2> (&corners)[2], + const Point<2> corners[2], const bool colorize) { std::vector > vertices (GeometryInfo<2>::vertices_per_cell); @@ -655,6 +674,25 @@ namespace GridGenerator } + template<> + void + parallelogram (Triangulation<1> &tria, + const Tensor<2,1> &corners, + const bool colorize) + { + Assert (false, ExcNotImplemented()); + } + + template<> + void + parallelogram (Triangulation<3> &tria, + const Tensor<2,3> &corners, + const bool colorize) + { + Assert (false, ExcNotImplemented()); + } + + template<> void parallelogram (Triangulation<2> &tria, diff --git a/deal.II/source/grid/grid_generator.inst.in b/deal.II/source/grid/grid_generator.inst.in index 5ce5fcc0f4..ff179bd53e 100644 --- a/deal.II/source/grid/grid_generator.inst.in +++ b/deal.II/source/grid/grid_generator.inst.in @@ -50,6 +50,17 @@ namespace GridGenerator \{ Triangulation &, const unsigned int, const double, const double); + template + void + parallelogram (Triangulation &, + const Tensor<2,deal_II_dimension> &, + const bool ); + template + void + parallelogram (Triangulation &, + const Point [deal_II_dimension], + const bool); + template void subdivided_hyper_rectangle (Triangulation &, -- 2.39.5