Hi Dr. Bangerth,

Thanks for your message. 

I think the error is like Marc said. And if I call 
triangulation.refine_global() before set_manifold(), the error will go 
away. 

Best,
LU
在2023年3月24日星期五 UTC+8 00:32:04<RUIJIAN LU> 写道:

> Hi Marc!
> Thanks, you are right. Therefore, when I just create a triangulation by 
> cylinder(), have the coordinates of its vertices already been in 
> cylindrical coordinate(r, phi, z) system?(Of course, the 'z' should be x.) 
> If it is right, is fe_values.quadrature_point(q_index)(0) equal to ‘r’, 
> fe_values.quadrature_point(q_index)(1)equal to 'phi' and 
> fe_values.quadrature_point(q_index)(0) equal to 'x'? 
> Best,
> LU
>
> 在2023年3月23日星期四 UTC+8 18:11:42<mafe...@gmail.com> 写道:
>
>> 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/60160db2-9f80-4951-8a45-a853d9637905n%40googlegroups.com.

Reply via email to