]> https://gitweb.dealii.org/ - dealii.git/commit
TransfiniteInterpolationManifold: fix codimension one case
authorMatthias Maier <tamiko@43-1.org>
Mon, 16 May 2022 17:36:16 +0000 (12:36 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 16 May 2022 17:52:11 +0000 (12:52 -0500)
commitbddd1966f8fc2ddac7dce358c5c1bfd947d1b605
treeb7dc577339e7386f64c5b9409ddaaad8fdded8be
parent0c67ab635d6f2fd48df236f2dada60edd7c858eb
TransfiniteInterpolationManifold: fix codimension one case

The codimension one case currently fails with an assertion:
```
An error occurred in line <290> of file <source/grid/grid_tools.cc> in function
    std::pair<DerivativeForm<1, dim, spacedim>, Tensor<1, spacedim>> dealii::GridTools::affine_cell_approximation(const ArrayView<const Point<spacedim>> &) [dim = 2, spacedim = 3]
The violated condition was:
    ::dealii::deal_II_exceptions::internals::compare_for_equality(vertices.size(), GeometryInfo<dim>::vertices_per_cell)
Additional information:
    Dimension 9 not equal to 4.
```
This is triggered because we take a compatibility branch in case of
`dim < spacedim` (in `include/deal.II/fe/mapping_q_internal.h`):
```
908         if (real_support_points.size() ==
909               GeometryInfo<dim>::vertices_per_cell ||
910             dim < spacedim)
911           {
```
but still initialize the vector `unit_points` by a subdivided quadrature
(which is needed for the default quadratic approximation; in
`source/grid/manifold_lib.cc`):
```
1686   std::vector<Point<dim>> unit_points =
1687     QIterated<dim>(QTrapez<1>(), 2).get_points();
1688   std::vector<Point<spacedim>> real_points(unit_points.size());
```

Fix this by simply initializing `unit_points` with the right number of
interpolation points for the `dim < spacedim` variant.
include/deal.II/fe/mapping_q_internal.h
source/grid/manifold_lib.cc

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.