Dear Luca,

Thank you very much for your help. I tried to use your recommendation, but 
it does not seem to work correctly. My code is:
  
CylindricalManifold<2> cylman(0);
triangulation.set_manifold(numbers::flat_manifold_id, cylman);

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. 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. I printed

auto &data = dynamic_cast< MappingManifold<2>::InternalData 
&>(*mapping.get_data(update_values | update_gradients | update_JxW_values, 
quadrature_formula));
std::cout << "MappingManifold manifold location:" << data.manifold << 
std::endl;
for (auto vol : data.volume_elements)
  std::cout << "volume elements :" << vol << std::endl;

The data.manifold seems to be a NULL while the data.volume_elements is 
empty. I guess I am not initializing something correctly, but I can't find 
what. 

Any help would be very much appreciated.

Best regards,
Andreas



On Tuesday, November 12, 2019 at 8:04:04 PM UTC+2, luca.heltai wrote:
>
> You don’t need to do anything special. Just create a MappingManifold, and 
> pass it where required. The manifold that is used is the one associated to 
> the triangulation. You don’t need to associate it to the Mapping, since the 
> mapping is used on *all* objects of the triangulation, and it will know how 
> to construct the data from the underlying manifold objects. 
>
> Best, 
> Luca. 
>
> > On 12 Nov 2019, at 15:37, Andreas Kyritsakis <akyri...@gmail.com 
> <javascript:>> wrote: 
> > 
> > 
> > Hi, 
> > 
> > I want to use a real-to-reference-cell mapping which corresponds to 
> cylindrical symmetry in 2D. In other words, the integration jacobian and 
> the shape function gradients should contain the scale factor of the 
> cylindrical coordinates. I tried to do it with the following code: 
> > 
> >   QGauss<2> quadrature_formula(fe.degree + 1); 
> >   CylindricalManifold<2> cyl_man(0); 
> >   MappingManifold<2> mapping; 
> >   auto &data = dynamic_cast< MappingManifold<2>::InternalData 
> &>(*mapping.get_data(update_values | update_gradients | update_JxW_values, 
> quadrature_formula)); 
> >   data.manifold = &cyl_man; 
> > 
> > but it does not seem to work. I am afraid that this is not the correct 
> way to associate the Manifold object  with the Mapping object, but I can't 
> figure out how it should be done. 
> > 
> > Can anyone help? 
> > 
> > Best regards, 
> > Andreas 
> > 
> > -- 
> > The deal.II project is located at http://www.dealii.org/ 
> > For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups "deal.II User Group" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to dea...@googlegroups.com <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/9d0b3e81-6559-4dc9-bc89-0f4a74ec4921%40googlegroups.com.
>  
>
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/da45ae15-fd2b-4002-aacf-70f3e569bcc2%40googlegroups.com.

Reply via email to