Re: [deal.II] Setting manifold for a truncated cone mesh

2021-04-06 Thread vachanpo...@gmail.com
Daniel,

Thanks a lot. This will be of great help to me.

On Tuesday, April 6, 2021 at 7:26:05 PM UTC+5:30 d.arnd...@gmail.com wrote:

> 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  : 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 vachanpo...@gmail.com <
> vachanpo...@gmail.com>:
>
>> 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 d.arnd...@gmail.com 
>> 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 vachanpo...@gmail.com <
>>> vachanpo...@gmail.com>:
>>>
 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() 
 
  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() 

 
  to 
set manifold id of all faces
3. Assign CylindricalManifold 

 
  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 dealii+un...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/dealii/0706d404-af7b-4fab-beab-362d0a71b17en%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+un...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/752eaf3a-cb86-4192-bae2-11035d033238n%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/b9268ba4-0f2b-48bd-a9e0-b20d9a54132en%40googlegroups.com.


Re: [deal.II] Setting manifold for a truncated cone mesh

2021-04-06 Thread Daniel Arndt
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  : 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 vachanpo...@gmail.com <
vachanpotluri1...@gmail.com>:

> 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 d.arnd...@gmail.com
> 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 vachanpo...@gmail.com <
>> vachanpo...@gmail.com>:
>>
>>> 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()
>>> 
>>>  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()
>>>
>>> 
>>>  to
>>>set manifold id of all faces
>>>3. Assign CylindricalManifold
>>>
>>> 
>>>  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 dealii+un...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/dealii/0706d404-af7b-4fab-beab-362d0a71b17en%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/752eaf3a-cb86-4192-bae2-11035d033238n%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/CAOYDWb%2BhePceJFVnP2AhUqmKy8Y%2Bi7RYLsyaeU9HG0ZoSTLrkQ%40mail.gmail.com.


Re: [deal.II] Setting manifold for a truncated cone mesh

2021-04-06 Thread vachanpo...@gmail.com
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 d.arnd...@gmail.com 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 vachanpo...@gmail.com <
> vachanpo...@gmail.com>:
>
>> 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() 
>> 
>>  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() 
>>
>> 
>>  to 
>>set manifold id of all faces
>>3. Assign CylindricalManifold 
>>
>> 
>>  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 dealii+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/0706d404-af7b-4fab-beab-362d0a71b17en%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/752eaf3a-cb86-4192-bae2-11035d033238n%40googlegroups.com.


Re: [deal.II] Setting manifold for a truncated cone mesh

2021-04-06 Thread Daniel Arndt
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 vachanpo...@gmail.com <
vachanpotluri1...@gmail.com>:

> 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()
> 
>  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()
>
> 
>  to
>set manifold id of all faces
>3. Assign CylindricalManifold
>
> 
>  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 dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/0706d404-af7b-4fab-beab-362d0a71b17en%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/CAOYDWbJVjXApnY9HGWOGSqqup1f%2BV%3DXYta_q5O513hhtZZoKqw%40mail.gmail.com.


[deal.II] Re: CUDA without nVidia

2021-04-06 Thread Michał Wichrowski


Michal,
>
> Support for AMD through HIP is very high on my todo list but the compiler 
> is not that great right now, i.e. the compiler can (and will) generate 
> buggy code.
>
Ok, so even if Deal.II will be ported I can assume so for other libraries.  
Good to know that HIP does  require porting.

I've tried to hipify the code a few months ago but it didn't go too well. 
> My plan is to work on support for AMD after we branch the release so that 
> we don't have to support buggy compilers. I am pretty confident that we 
> will have support for HIP by the end of the Summer maybe earlier.
>
Great news! 

>  
>
Best,
>
> Bruno
>
> Thanks!
Michał

-- 
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/c1855148-6990-4d68-aed0-03adc90ea838n%40googlegroups.com.


[deal.II] Setting manifold for a truncated cone mesh

2021-04-06 Thread vachanpo...@gmail.com
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() 

 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() 
   

 to 
   set manifold id of all faces
   3. Assign CylindricalManifold 
   
 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/0706d404-af7b-4fab-beab-362d0a71b17en%40googlegroups.com.


Re: [deal.II] 2d meshes and orientation

2021-04-06 Thread Konrad Simon
Dear Wolfgang,

On Tuesday, April 6, 2021 at 5:53:15 AM UTC+2 Wolfgang Bangerth wrote:

> It's possible this is indeed a bug. In most cases, we run the 2d meshes 
> through the mesh orienter, so we rarely see 2d meshes that are not 
> correctly 
> oriented and it wouldn't surprise me if we have the kind of bug you 
> describe 
> where things almost but not quite work correctly.


I see. Many thanks for the input. This is my impression as well. These 
things rarely happen in 2d.
One example would be simple periodic meshes which cause line orientations 
not to match (this case is caught). In more
complicated scenarios involving periodicity and rotations of faces it can 
happen though that lines do match but normals do not.


> The questions then are (i) where does this need to be fixed, and (ii) how 
> many 
> tests fail if we apply the fix? One of the things I learned (and I think 
> you 
> did as well) is that for bugs in these kinds of layers, it is quite 
> possible 
> that one ends up with 100 failing tests and then it takes a *lot* of work 
> to 
> look through all of these to figure out whether the new output is correct 
> or 
> not. But then, as mentioned above, it's also possible that only one or two 
> tests fail because we almost never see these kinds of meshes.
>

Sound worth trying. Please see also this new PR 
 which is work in progress.

-- 
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/0125f6dc-b61c-4db6-84da-b101b6759f1bn%40googlegroups.com.