> CylindricalManifold<2> cylman(0);
> triangulation.set_manifold(numbers::flat_manifold_id, cylman);
The flat_manifold_id is usually reserved for the flat manifold, and yours is not a flat manifold. Setting the flat manifold to the cylindrical manifold implies
You should set the manifold ids of the cells that you want to deform.
What triangulation are you using? if the Triangulation you are using contains the axis, then the CylindricalManifold is not well posed in the cells that touch or contain the axis, since the cylindrical transformation is not well posed there.
> QGauss<2> quadrature_formula(fe.degree + 1);
> MappingManifold<2> mapping;
> FEValues<2> fe_values(mapping, fe, quadrature_formula, update_values | update_gradients | update_JxW_values);
>
> The fe_values object seems to have nonsense inside.
Have you called fe_values.reinit(cell)?
> All the shape_gradients are nans and the JxW values are zeros. I also tried to check whether the internaldata of the MappingManifold are correct, but they seem to not be initialized.
The internal data is initialized by calls to fe_values.reinit(cell), and it is *not* owned by the mapping, but by the fevalues object. These are not thought to be used directly by the user.
> I guess I am not initializing something correctly, but I can't find what.
Take a look at the way this is used in the tests directory:
tests/mappings/mapping_manifold_*.cc