Hi!

The manifold should be attached only to the hull of the cylinder, but in 
your code snippet you attach it to all cells. This leads to problems when 
new vertices need to be created on the symmetry axis.

After a look in the GridGenerator::cylinder() 
<https://www.dealii.org/current/doxygen/deal.II/namespaceGridGenerator.html#a5cdda7b4a76d509af7d1a8dc1320ddb0>
 
documentation, you will notice that a CylindricalManifold object is already 
attached to those faces with a manifold ID 0. So you don't have to attach 
an additional one yourself!

Marc

On Wednesday, March 22, 2023 at 8:47:47 AM UTC+1 luruij...@gmail.com wrote:

> Hi everyone, 
> I am a beginner to dealii, now I want to solve an equation on a 
> cylindrical coordinate system. I create a triangulation by cylinder() and 
> use CylindricalManifold for it, but it has some error. How can I do with it?
>
> error:
> Number dealii::Physics::VectorRelations::signed_angle(const 
> dealii::Tensor<1, dim, Number>&, const dealii::Tensor<1, dim, Number>&, 
> const dealii::Tensor<1, dim, Number>&) [with int spacedim = 3; Number = 
> double]
> The violated condition was: 
>     std::abs(axis * a) < 1.e-12 * a.norm() && std::abs(axis * b) < 1.e-12 
> * b.norm()
> Additional information: 
>     The vectors are not perpendicular to the axial vector.
>
> code:
>     const Tensor<1, 3> axis({1.0, 0.0, 0.0});
>     const Point<3> axial_point(0.0, 0.0, 0.0);
>     const CylindricalManifold<3> cylinder(axis, axial_point);
>     
>     GridGenerator::cylinder(triangulation, 2.5, 2.5);
>     for (auto cell : triangulation.active_cell_iterators())
>         cell->set_all_manifold_ids(2);
>     triangulation.set_manifold(2, cylinder);
>

-- 
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/f13e8e86-f9d1-41c9-a9be-162db100f448n%40googlegroups.com.

Reply via email to