Vachan,

the source code to GridGenerator::truncated_cone() related to manifold_is,
boundary_ids and manifolds looks like

// Set boundary ids at -half_length to 1 and at half_length to 2. Set the
// manifold id on hull faces (i.e., faces not on either end) to 0.
for (const auto &face : triangulation.active_face_iterators())
  if (face->at_boundary())
    {
      if (std::abs(face->center()[0] - -half_length) < 1e-8 * half_length)
        face->set_boundary_id(1);
      else if (std::abs(face->center()[0] - half_length) <
               1e-8 * half_length)
        face->set_boundary_id(2);
      else
        face->set_all_manifold_ids(0);
    }
triangulation.set_manifold(0, CylindricalManifold<3>());

set_all_manifold_ids() makes sure that also the inner cells use the
manifold when refining. You should be able to copy the code above and
modify it according to your needs.

Best,
Daniel

Am Di., 6. Apr. 2021 um 09:16 Uhr schrieb [email protected] <
[email protected]>:

> Daniel,
>
> Thank you for the response. Just to confirm, will the inner cell edges
> also have proper curvature?
>
> Pease pardon the triviality. I am just too doubtful about the working of
> manifolds.
>
> On Tuesday, April 6, 2021 at 6:24:48 PM UTC+5:30 [email protected]
> wrote:
>
>> Vachan,
>>
>> that should work. There is nothing special about using GridGenerator to
>> create geometries that can not be achieved by reading in a custom mesh and
>> setting the boundary ids, manifold ids and manifold.
>>
>> Best,
>> Daniel
>>
>> Am Di., 6. Apr. 2021 um 07:42 Uhr schrieb [email protected] <
>> [email protected]>:
>>
>>> Dear all,
>>>
>>> I have a rather silly question; I am not confident about my
>>> understanding of manifolds.
>>>
>>> Suppose I want to replicate what GridGenerator::truncated_cone()
>>> <https://www.dealii.org/current/doxygen/deal.II/namespaceGridGenerator.html#ae63c93351f77276c20de07c91d3c1e48>
>>>  does,
>>> but I have a mesh file from which I want to read the vertices. Currently I
>>> plan to:
>>>
>>>    1. Read the mesh (using GridIn)
>>>    2. Use set_all_manifold_ids()
>>>    
>>> <https://www.dealii.org/current/doxygen/deal.II/group__manifold.html#gae2acfbef517fd03855c4b371f3e182f7>
>>>  to
>>>    set manifold id of all faces
>>>    3. Assign CylindricalManifold
>>>    
>>> <https://www.dealii.org/current/doxygen/deal.II/classCylindricalManifold.html>
>>>  to
>>>    the triangulation
>>>
>>> Will this work?
>>>
>>> Thanking in anticipation
>>> Vachan
>>>
>>> --
>>> 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 [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/dealii/0706d404-af7b-4fab-beab-362d0a71b17en%40googlegroups.com
>>> <https://groups.google.com/d/msgid/dealii/0706d404-af7b-4fab-beab-362d0a71b17en%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/752eaf3a-cb86-4192-bae2-11035d033238n%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/752eaf3a-cb86-4192-bae2-11035d033238n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWb%2BhePceJFVnP2AhUqmKy8Y%2Bi7RYLsyaeU9HG0ZoSTLrkQ%40mail.gmail.com.

Reply via email to