Gmsh is a bit arbitrary on how elements are oriented. Deal.II, on the contrary, 
requires elements to be consistently ordered. If you have generated your 
geometries with some elementary geometry types, by specifying the bounding 
faces, make sure you list the faces always in the same order (i.e., clockwise, 
or anti-clockwise).

The error you see is related to the fact that different physical entities are 
meshed separately in gmsh, and their orientation is not guaranteed to be 
consistent. You have to make sure this is consistent by somehow forcing gmsh to 
use the same orientation everywhere.

L.

> On 2 Mar 2021, at 16:12, [email protected] <[email protected]> 
> wrote:
> 
> Hi Luca,
> 
> Thanks for the response. I recreated the mesh to make sure that there is no 
> two physical tag for the same object. I found that if I do not set any 
> physical tag, my code is able to read the mesh without any issue. But when I 
> am setting 4 different physical tags to 4 parts of the boundary, I am getting 
> a new error message:
> 
> An error occurred in line <2028> of file 
> </home/krishanu/Google_Drive/dealii/dealii_920/dealii-9.2.0/source/grid/grid_in.cc>
>  in function
>     void dealii::GridIn<dim, spacedim>::read_msh(std::istream&) [with int dim 
> = 2; int spacedim = 2; std::istream = std::basic_istream<char>]
> The violated condition was: 
>     cells.size() > 0
> Additional information: 
>     (none)
> 
> 
> On Monday, 1 March 2021 at 12:18:15 UTC-5 [email protected] wrote:
> The error message is telling you that you specified more than one physical 
> tag for the same object. This is not compatible with deal.II, at the moment, 
> as the physical tags are used by deal.II to specify what material id (on 
> cells) or boundary id (on faces and possibly edges) to assign to each 
> element. 
> 
> Make sure you only assign a single physical id to each volume (surface), and 
> a single physical id to each object on the boundary. 
> 
> Luca. 
> 
> 
> > On 28 Feb 2021, at 1:40, [email protected] <[email protected]> wrote: 
> > 
> > I am trying to read a mesh (.msh file) generated by Gmsh (version 4.7.1), 
> > but getting an error. I am using the following commands: 
> > 
> > GridIn<dim> grid_in; 
> > grid_in.attach_triangulation(triangulation); 
> > std::ifstream input_file("ma_mesh3.msh"); 
> > grid_in.read_msh(input_file); 
> > 
> > The issue is occurring while executing 
> > 
> > grid_in.read_msh(input_file) 
> > 
> > This is the error message: 
> > 
> > Exception on processing: 
> > 
> > -------------------------------------------------------- 
> > An error occurred in line <1534> of file 
> > </home/krishanu/Google_Drive/dealii/dealii_920/dealii-9.2.0/source/grid/grid_in.cc>
> >  in function 
> > void dealii::GridIn<dim, spacedim>::read_msh(std::istream&) [with int dim = 
> > 2; int spacedim = 2; std::istream = std::basic_istream<char>] 
> > The violated condition was: 
> > n_physicals < 2 
> > Additional information: 
> > More than one tag is not supported! 
> > 
> > 
> > Am I doing something wrong, or is there any particular version of Gmsh that 
> > should be used to generate meshes that are compatible with deal.ii? 
> > 
> > Thanks for any help or advice. 
> > 
> > 
> > 
> > -- 
> > 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/7760fdd1-43b7-41a2-a49c-3ae1e0d6bf7en%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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/5618975d-f6a4-4c81-8925-d69a1b2734d9n%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/96A1CE89-8B3E-469F-85F4-715938CF2374%40gmail.com.

Reply via email to