## [Libmesh-users] 2D triangular mesh - extra points inside

 [Libmesh-users] 2D triangular mesh - extra points inside From: robert - 2011-06-22 17:51:30 ```Hi to all, I want to build a triangular mesh with TriangleInterface. Within my region I have different materials and starting temperatures (solving heat equation). I want to start with a coarse grid and refine it adaptively. Although I use a coarse grid at the beginning I want to define my starting temperatures in a relatively exact way. Thus, I thought I could try to add a polygon within my domain and try to tell the program, that the triangles are not allowed to cross these lines. Since I have no idea how to do so I tried the following: I created a mesh with holes in it (the holes represent different materials). Then I created a second mesh with the exact shape of the hole. In a third step I loop through the elements of my second mesh and add them to the first mesh. However, this method did not work. I think the problem is that I did not keep track of the nodes and, that I did not add nodes, resp. Is there a better way to do so? Wouldn't it maybe smarter to solve both meshes in seperate systems and to combine them with the boundary conditions (although I have problems to figure out how to set the boundary conditions)? Thanks for your help, Robert ```

 [Libmesh-users] 2D triangular mesh - extra points inside From: robert - 2011-06-22 17:51:30 ```Hi to all, I want to build a triangular mesh with TriangleInterface. Within my region I have different materials and starting temperatures (solving heat equation). I want to start with a coarse grid and refine it adaptively. Although I use a coarse grid at the beginning I want to define my starting temperatures in a relatively exact way. Thus, I thought I could try to add a polygon within my domain and try to tell the program, that the triangles are not allowed to cross these lines. Since I have no idea how to do so I tried the following: I created a mesh with holes in it (the holes represent different materials). Then I created a second mesh with the exact shape of the hole. In a third step I loop through the elements of my second mesh and add them to the first mesh. However, this method did not work. I think the problem is that I did not keep track of the nodes and, that I did not add nodes, resp. Is there a better way to do so? Wouldn't it maybe smarter to solve both meshes in seperate systems and to combine them with the boundary conditions (although I have problems to figure out how to set the boundary conditions)? Thanks for your help, Robert ```
 Re: [Libmesh-users] 2D triangular mesh - extra points inside From: John Peterson - 2011-06-22 18:25:49 ```On Wed, Jun 22, 2011 at 11:49 AM, robert wrote: > Hi to all, > > I want to build a triangular mesh with TriangleInterface. Within my > region I have different materials and starting temperatures (solving > heat equation). I want to start with a coarse grid and refine it > adaptively. > > Although I use a coarse grid at the beginning I want to define my > starting temperatures in a relatively exact way. Thus, I thought I could > try to add a polygon within my domain and try to tell the program, that > the triangles are not allowed to cross these lines. > > Since I have no idea how to do so I tried the following: I created a > mesh with holes in it (the holes represent different materials). Then I > created a second mesh with the exact shape of the hole. In a third step > I loop through the elements of my second mesh and add them to the first > mesh. > However, this method did not work. I think the problem is that I did not > keep track of the nodes and, that I did not add nodes, resp. Have you see the relatively new ex29? It shows how you can specify holes in the triangulation using the TriangleInterface. -- John ```