Re: [deal.II] Query about external meshing software

2021-03-09 Thread Zelu Xu
Hello Krishanu:
The error is made when you define the line/surface. You don’t have to check
the mesh file or each mesh element but the .geo file.
For example, here  my line loop defines the surface bounded by vertex in
the order of [3.7,8,4], but I defined my line as the following.
So when I define the surface, line 1 and 16 are negative.
Line(1) = {4, 8};
Line(16) = {3, 4};
Line(17) = {3, 7};
Line(18) = {7, 8};
Line Loop(53) = {17, 18, -1, -16};
Ruled Surface(54) = {53};
And you just need to make sure all line/surface are defined with the same
notation (left or right hand)

On Tue, Mar 9, 2021 at 9:31 PM krishan...@gmail.com <
krishanu.se...@gmail.com> wrote:

> Hello Jane,
>
> Thanks for the response. I understand why there could be an issue with the
> ordering. But I am using the GUI of Gmsh and the mesh created has about 400
> elements. So it is a little difficult to manually check the ordering of the
> vertices of each element. Do you know if there is any other way to enforce
> the ordering in the GUI?
>
> Thanks,
> Krishanu
>
> On Tuesday, 9 March 2021 at 15:33:55 UTC-5 Jane Xu wrote:
>
>> Hello Krishna:
>> I had this issue before. It just means that when you select mesh entities
>> (vertex) to form a surface, you have to pay attention to the order of which
>> entity goes first, second,... it would be clear if you look at the geometry
>> txt file.
>> Best regards
>> Jane
>>
>> On Tue, Mar 9, 2021 at 3:21 PM krishan...@gmail.com 
>> wrote:
>>
>>> Hello Paras,
>>>
>>> Thanks for your response. I have been using the GUI of Gmsh to generate
>>> the mesh. Do you have any suggestions about what to do in Gmsh to avoid the
>>> negative volume issue?
>>>
>>> Do meshes generated with Abaqus, are able to avoid the above-mentioned
>>> issue of negative volume?
>>>
>>> Thanks in advance.
>>>
>>> Krishanu
>>>
>>> On Tuesday, 9 March 2021 at 13:14:27 UTC-5 Paras Kumar wrote:
>>>
 I use the .inp format of Abaqus, since my code relies on material-IDs
 which (in my limited experience) are easy to handle with .inp format. I
 generate meshes using both GMSH (here as you mentioned, one needs to be
 careful to add curves/surface parts in the correct order to avoid negative
 volumes) and Abaqus CAE (works fine for relatively simple geometries) to
 generate such meshes. Not aware of other quad/hex generating open source
 codes. The dealii::GridGenerator namespace also offers possibilities to
 generate meshes for certain primitive shapes and combinations thereof.

 Best,
 Paras

 On Tue, Mar 9, 2021 at 6:33 PM krishan...@gmail.com <
 krishan...@gmail.com> wrote:

>
> I am wondering what meshing software produces output files that would
> work best with deal.ii. I have tried Gmsh, but it seems when this mesh
> (generated by Gmsh) is imported in deal.ii, it is facing the issue of
> negative volume fraction of a cell (could be because of the order of nodes
> written in Gmsh?). Any suggestion about any other meshing software that
> could be used which would avoid this issue?
>
> Thanks
>

> --
> 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/33e38481-07dd-487f-ba04-91ab2d456e5dn%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/f4809e7f-c770-43da-ac1d-3ec4268a97e0n%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.goog

Re: [deal.II] Query about external meshing software

2021-03-09 Thread krishan...@gmail.com
Hello Jane,

Thanks for the response. I understand why there could be an issue with the 
ordering. But I am using the GUI of Gmsh and the mesh created has about 400 
elements. So it is a little difficult to manually check the ordering of the 
vertices of each element. Do you know if there is any other way to enforce 
the ordering in the GUI?

Thanks,
Krishanu

On Tuesday, 9 March 2021 at 15:33:55 UTC-5 Jane Xu wrote:

> Hello Krishna:
> I had this issue before. It just means that when you select mesh entities 
> (vertex) to form a surface, you have to pay attention to the order of which 
> entity goes first, second,... it would be clear if you look at the geometry 
> txt file.
> Best regards
> Jane 
>
> On Tue, Mar 9, 2021 at 3:21 PM krishan...@gmail.com  
> wrote:
>
>> Hello Paras,
>>
>> Thanks for your response. I have been using the GUI of Gmsh to generate 
>> the mesh. Do you have any suggestions about what to do in Gmsh to avoid the 
>> negative volume issue?
>>
>> Do meshes generated with Abaqus, are able to avoid the above-mentioned 
>> issue of negative volume?
>>
>> Thanks in advance.
>>
>> Krishanu
>>
>> On Tuesday, 9 March 2021 at 13:14:27 UTC-5 Paras Kumar wrote:
>>
>>> I use the .inp format of Abaqus, since my code relies on material-IDs 
>>> which (in my limited experience) are easy to handle with .inp format. I 
>>> generate meshes using both GMSH (here as you mentioned, one needs to be 
>>> careful to add curves/surface parts in the correct order to avoid negative 
>>> volumes) and Abaqus CAE (works fine for relatively simple geometries) to 
>>> generate such meshes. Not aware of other quad/hex generating open source 
>>> codes. The dealii::GridGenerator namespace also offers possibilities to 
>>> generate meshes for certain primitive shapes and combinations thereof.
>>>
>>> Best,
>>> Paras
>>>
>>> On Tue, Mar 9, 2021 at 6:33 PM krishan...@gmail.com <
>>> krishan...@gmail.com> wrote:
>>>

 I am wondering what meshing software produces output files that would 
 work best with deal.ii. I have tried Gmsh, but it seems when this mesh 
 (generated by Gmsh) is imported in deal.ii, it is facing the issue of 
 negative volume fraction of a cell (could be because of the order of nodes 
 written in Gmsh?). Any suggestion about any other meshing software that 
 could be used which would avoid this issue?

 Thanks

>>>
 -- 
 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/33e38481-07dd-487f-ba04-91ab2d456e5dn%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/f4809e7f-c770-43da-ac1d-3ec4268a97e0n%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/850358c6-8c17-4eb8-8c2d-10940bdaceb4n%40googlegroups.com.


Re: [deal.II] Query about external meshing software

2021-03-09 Thread Zelu Xu
Hello Krishna:
I had this issue before. It just means that when you select mesh entities
(vertex) to form a surface, you have to pay attention to the order of which
entity goes first, second,... it would be clear if you look at the geometry
txt file.
Best regards
Jane

On Tue, Mar 9, 2021 at 3:21 PM krishan...@gmail.com <
krishanu.se...@gmail.com> wrote:

> Hello Paras,
>
> Thanks for your response. I have been using the GUI of Gmsh to generate
> the mesh. Do you have any suggestions about what to do in Gmsh to avoid the
> negative volume issue?
>
> Do meshes generated with Abaqus, are able to avoid the above-mentioned
> issue of negative volume?
>
> Thanks in advance.
>
> Krishanu
>
> On Tuesday, 9 March 2021 at 13:14:27 UTC-5 Paras Kumar wrote:
>
>> I use the .inp format of Abaqus, since my code relies on material-IDs
>> which (in my limited experience) are easy to handle with .inp format. I
>> generate meshes using both GMSH (here as you mentioned, one needs to be
>> careful to add curves/surface parts in the correct order to avoid negative
>> volumes) and Abaqus CAE (works fine for relatively simple geometries) to
>> generate such meshes. Not aware of other quad/hex generating open source
>> codes. The dealii::GridGenerator namespace also offers possibilities to
>> generate meshes for certain primitive shapes and combinations thereof.
>>
>> Best,
>> Paras
>>
>> On Tue, Mar 9, 2021 at 6:33 PM krishan...@gmail.com 
>> wrote:
>>
>>>
>>> I am wondering what meshing software produces output files that would
>>> work best with deal.ii. I have tried Gmsh, but it seems when this mesh
>>> (generated by Gmsh) is imported in deal.ii, it is facing the issue of
>>> negative volume fraction of a cell (could be because of the order of nodes
>>> written in Gmsh?). Any suggestion about any other meshing software that
>>> could be used which would avoid this issue?
>>>
>>> Thanks
>>>
>>
>>> --
>>> 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/33e38481-07dd-487f-ba04-91ab2d456e5dn%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/f4809e7f-c770-43da-ac1d-3ec4268a97e0n%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/CAAAchuXOYnBX4YztJLNWLcqn5qf5Zfqt7xK1XOh2pWzW9aiqMg%40mail.gmail.com.


Re: [deal.II] Query about external meshing software

2021-03-09 Thread krishan...@gmail.com
Hello Paras,

Thanks for your response. I have been using the GUI of Gmsh to generate the 
mesh. Do you have any suggestions about what to do in Gmsh to avoid the 
negative volume issue?

Do meshes generated with Abaqus, are able to avoid the above-mentioned 
issue of negative volume?

Thanks in advance.

Krishanu

On Tuesday, 9 March 2021 at 13:14:27 UTC-5 Paras Kumar wrote:

> I use the .inp format of Abaqus, since my code relies on material-IDs 
> which (in my limited experience) are easy to handle with .inp format. I 
> generate meshes using both GMSH (here as you mentioned, one needs to be 
> careful to add curves/surface parts in the correct order to avoid negative 
> volumes) and Abaqus CAE (works fine for relatively simple geometries) to 
> generate such meshes. Not aware of other quad/hex generating open source 
> codes. The dealii::GridGenerator namespace also offers possibilities to 
> generate meshes for certain primitive shapes and combinations thereof.
>
> Best,
> Paras
>
> On Tue, Mar 9, 2021 at 6:33 PM krishan...@gmail.com  
> wrote:
>
>>
>> I am wondering what meshing software produces output files that would 
>> work best with deal.ii. I have tried Gmsh, but it seems when this mesh 
>> (generated by Gmsh) is imported in deal.ii, it is facing the issue of 
>> negative volume fraction of a cell (could be because of the order of nodes 
>> written in Gmsh?). Any suggestion about any other meshing software that 
>> could be used which would avoid this issue?
>>
>> Thanks
>>
>> -- 
>> 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/33e38481-07dd-487f-ba04-91ab2d456e5dn%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/f4809e7f-c770-43da-ac1d-3ec4268a97e0n%40googlegroups.com.


Re: [deal.II] Query about external meshing software

2021-03-09 Thread Paras Kumar
I use the .inp format of Abaqus, since my code relies on material-IDs which
(in my limited experience) are easy to handle with .inp format. I generate
meshes using both GMSH (here as you mentioned, one needs to be careful to
add curves/surface parts in the correct order to avoid negative volumes)
and Abaqus CAE (works fine for relatively simple geometries) to generate
such meshes. Not aware of other quad/hex generating open source codes. The
dealii::GridGenerator namespace also offers possibilities to generate
meshes for certain primitive shapes and combinations thereof.

Best,
Paras

On Tue, Mar 9, 2021 at 6:33 PM krishan...@gmail.com <
krishanu.se...@gmail.com> wrote:

>
> I am wondering what meshing software produces output files that would work
> best with deal.ii. I have tried Gmsh, but it seems when this mesh
> (generated by Gmsh) is imported in deal.ii, it is facing the issue of
> negative volume fraction of a cell (could be because of the order of nodes
> written in Gmsh?). Any suggestion about any other meshing software that
> could be used which would avoid this issue?
>
> Thanks
>
> --
> 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/33e38481-07dd-487f-ba04-91ab2d456e5dn%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/CAEU6zmT7fG1fWUDAX92-%3D-t8Ho76Mh0w--crXfTXZGg%2BFKoCPw%40mail.gmail.com.


[deal.II] Query about external meshing software

2021-03-09 Thread krishan...@gmail.com

I am wondering what meshing software produces output files that would work 
best with deal.ii. I have tried Gmsh, but it seems when this mesh 
(generated by Gmsh) is imported in deal.ii, it is facing the issue of 
negative volume fraction of a cell (could be because of the order of nodes 
written in Gmsh?). Any suggestion about any other meshing software that 
could be used which would avoid this issue?

Thanks

-- 
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/33e38481-07dd-487f-ba04-91ab2d456e5dn%40googlegroups.com.


Re: [deal.II] boundary matrix

2021-03-09 Thread Wolfgang Bangerth

On 3/7/21 10:16 PM, Nikki Holtzer wrote:
Thank you for your input! That was my first attempt at tackling this. However, 
I run into problems with the line


for(const auto & face : cell-> face_iterators()).

No matter what member function I choose off of the DoFCellAccessor class 
template reference, I get some version of the following:


class dealii::DoFCellAccessor, false>’ has no member 
named ‘face_iterators’; did you mean ‘face_iterator’?


I'm pretty sure that function should exist. What deal.II version are you using?

But, if that doesn't work, you can always do this instead
```
for(const auto & cell : triangulation.active_cell_iterators())
  for (unsigned int f=0; f::faces_per_cell; ++f)
  {
const auto face = cell->face(f);
if(face->at_boundary() && face->boundary_id() == 1)
  // do something useful
  }
```

Best
 W.

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
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/64471cba-016b-9b98-5844-4ecf28ffd395%40colostate.edu.