## [Libmesh-users] adaptive refinements with linear elements

 [Libmesh-users] adaptive refinements with linear elements From: John Peterson - 2005-02-17 14:47:02 ```Hi, If possible, you should post your entire code to the list. I'm sure one of us could find any problems with boundary conditions, etc. fairly quickly that way. I think you mentioned you were not using the penalty method as in the examples. Is it possible you are not setting the BC's correctly on the triangular elements? -John Michael Povolotskyi writes: > Dear Libmesh developers, > with your help we are getting some progress. > > As you have suggested we tried linear elements (Tri3 and Quad4). > In this case the countour lines look continuous everywhere. > > However, we still see some differences between Tri3 and Quad4 elements. > The solution with Quad4 looks very nicely. > > The solution with Tri3 has some problems. > Namely, there are several nodes that lie at the boundary with the boundary condition u = 0.0 whose > value depends on the adaptive grid refinement. > > Without refinement the value is equal to 0.0, as it should be. > Then we did 5 adaptive refinements and the values were: > -0.004 1e-15 1e-15 1e-27 -0.001 . > > The futher refinements lead to a constant value at these nodes of about -0.002. > > The value of about 0.001 seems to be too much for the numerical error. > > Thank you very much, > we hope that our feedback is usefull. > > Michael. ```

 [Libmesh-users] adaptive refinements with linear elements From: Michael Povolotskyi - 2005-02-17 11:21:29 ```Dear Libmesh developers, with your help we are getting some progress. As you have suggested we tried linear elements (Tri3 and Quad4). In this case the countour lines look continuous everywhere. However, we still see some differences between Tri3 and Quad4 elements. The solution with Quad4 looks very nicely. The solution with Tri3 has some problems. Namely, there are several nodes that lie at the boundary with the boundary condition u = 0.0 whose value depends on the adaptive grid refinement. Without refinement the value is equal to 0.0, as it should be. Then we did 5 adaptive refinements and the values were: -0.004 1e-15 1e-15 1e-27 -0.001 . The futher refinements lead to a constant value at these nodes of about -0.002. The value of about 0.001 seems to be too much for the numerical error. Thank you very much, we hope that our feedback is usefull. Michael. ```
 Re: [Libmesh-users] adaptive refinements with linear elements From: Roy Stogner - 2005-02-17 15:21:46 ```On Thu, 17 Feb 2005, Michael Povolotskyi wrote: > Namely, there are several nodes that lie at the boundary with the boundary > condition u = 0.0 whose value depends on the adaptive grid refinement. > > Without refinement the value is equal to 0.0, as it should be. > Then we did 5 adaptive refinements and the values were: > -0.004 1e-15 1e-15 1e-27 -0.001 . > > The futher refinements lead to a constant value at these nodes of about > -0.002. > > The value of about 0.001 seems to be too much for the numerical error. How are you setting the boundary conditions? Are you reinforcing them at every solve? Are all your Dirichlet boundary nodes wrong, and if so are they wrong in the same direction? --- Roy Stogner ```
 Re: [Libmesh-users] adaptive refinements with linear elements From: Michael Povolotskyi - 2005-02-17 15:41:18 ```Hi, we set boundary condition in such a way that a row in the matrix that correspond to the boundary node i looks like this: 0 .... 0 1 0 .... 0, where 1 stands at the ith position. We apply the boundary condition while assembling the matrix. Not all the Dirichlet boundary points are wrong - just a few. And not always the same. Michael. Roy Stogner wrote: > On Thu, 17 Feb 2005, Michael Povolotskyi wrote: > >> Namely, there are several nodes that lie at the boundary with the >> boundary condition u = 0.0 whose value depends on the adaptive grid >> refinement. >> >> Without refinement the value is equal to 0.0, as it should be. >> Then we did 5 adaptive refinements and the values were: >> -0.004 1e-15 1e-15 1e-27 -0.001 . >> >> The futher refinements lead to a constant value at these nodes of >> about -0.002. >> >> The value of about 0.001 seems to be too much for the numerical error. > > > How are you setting the boundary conditions? Are you reinforcing them > at every solve? Are all your Dirichlet boundary nodes wrong, and if > so are they wrong in the same direction? > --- > Roy Stogner > -- ------------------------------------------------------------ Michael Povolotskyi, Ph.D. University of Rome "Tor Vergata" Department of Electronic Engineering Viale Politecnico, 1 - 00133 Rome - Italy Phone + 39 06 72597367 Fax + 39 06 2020519 http://www.optolab.uniroma2.it/pages/moshe/moshe.html ------------------------------------------------------------- ```
 Re: [Libmesh-users] adaptive refinements with linear elements From: Michael Povolotskyi - 2005-02-17 18:00:40 ```Hello, the situation gets clearer. I have just checked the matrix. It turnes that: a) if I don't call dof_map.constrain_element_matrix_and_vector(), then the matrix comes out as I intend; b) if I call dof_map.constrain_element_matrix_and_vector(), then the corresponding raw has additional elements. In case a) the boundary nodes are okay, but the solution is discontinuous. In case b) the solution is continuous, but the boundary conditions are disturbed. The question is: is it possible somehow to have both continuous solution and apply boundary conditions in our way (not with a penalty method)? Thank you for your help, Michael. Roy Stogner wrote: > On Thu, 17 Feb 2005, Michael Povolotskyi wrote: > >> we set boundary condition in such a way that a row in the matrix that >> correspond to >> the boundary node i looks like this: >> >> 0 .... 0 1 0 .... 0, >> >> where 1 stands at the ith position. >> >> We apply the boundary condition while assembling the matrix. >> Not all the Dirichlet boundary points are wrong - just a few. >> And not always the same. > > > Have you checked the assembled system matrix, to make sure those rows > came out the way you intended? Have you checked the solution vector, > to make sure the Dirichlet node errors are there and not just another > GMV-related glitch? Are you sure the nodes end up exactly right with > uniform refinement? > --- > Roy Stogner > -- ------------------------------------------------------------ Michael Povolotskyi, Ph.D. University of Rome "Tor Vergata" Department of Electronic Engineering Viale Politecnico, 1 - 00133 Rome - Italy Phone + 39 06 72597367 Fax + 39 06 2020519 http://www.optolab.uniroma2.it/pages/moshe/moshe.html ------------------------------------------------------------- ```
 [Libmesh-users] adaptive refinements with linear elements From: John Peterson - 2005-02-17 14:47:02 ```Hi, If possible, you should post your entire code to the list. I'm sure one of us could find any problems with boundary conditions, etc. fairly quickly that way. I think you mentioned you were not using the penalty method as in the examples. Is it possible you are not setting the BC's correctly on the triangular elements? -John Michael Povolotskyi writes: > Dear Libmesh developers, > with your help we are getting some progress. > > As you have suggested we tried linear elements (Tri3 and Quad4). > In this case the countour lines look continuous everywhere. > > However, we still see some differences between Tri3 and Quad4 elements. > The solution with Quad4 looks very nicely. > > The solution with Tri3 has some problems. > Namely, there are several nodes that lie at the boundary with the boundary condition u = 0.0 whose > value depends on the adaptive grid refinement. > > Without refinement the value is equal to 0.0, as it should be. > Then we did 5 adaptive refinements and the values were: > -0.004 1e-15 1e-15 1e-27 -0.001 . > > The futher refinements lead to a constant value at these nodes of about -0.002. > > The value of about 0.001 seems to be too much for the numerical error. > > Thank you very much, > we hope that our feedback is usefull. > > Michael. ```
 Re: [Libmesh-users] adaptive refinements with linear elements From: Michael Povolotskyi - 2005-02-17 15:32:02 Attachments: Poisson.C     Poisson.in ```Hi, this is the code (Poisson.C) and the input file (Poisson.in). As for the possibility to set BC in a wrong way ... of course, everything is possible but it worked well with a single grid and with uniform grid refinement. Michael. John Peterson wrote: > Hi, > > If possible, you should post your entire code to the list. > I'm sure one of us could find any problems with boundary > conditions, etc. fairly quickly that way. I think you > mentioned you were not using the penalty method as in > the examples. Is it possible you are not setting the > BC's correctly on the triangular elements? > > -John > > > Michael Povolotskyi writes: > > Dear Libmesh developers, > > with your help we are getting some progress. > > > > As you have suggested we tried linear elements (Tri3 and Quad4). > > In this case the countour lines look continuous everywhere. > > > > However, we still see some differences between Tri3 and Quad4 elements. > > The solution with Quad4 looks very nicely. > > > > The solution with Tri3 has some problems. > > Namely, there are several nodes that lie at the boundary with the boundary condition u = 0.0 whose > > value depends on the adaptive grid refinement. > > > > Without refinement the value is equal to 0.0, as it should be. > > Then we did 5 adaptive refinements and the values were: > > -0.004 1e-15 1e-15 1e-27 -0.001 . > > > > The futher refinements lead to a constant value at these nodes of about -0.002. > > > > The value of about 0.001 seems to be too much for the numerical error. > > > > Thank you very much, > > we hope that our feedback is usefull. > > > > Michael. > -- ------------------------------------------------------------ Michael Povolotskyi, Ph.D. University of Rome "Tor Vergata" Department of Electronic Engineering Viale Politecnico, 1 - 00133 Rome - Italy Phone + 39 06 72597367 Fax + 39 06 2020519 http://www.optolab.uniroma2.it/pages/moshe/moshe.html ------------------------------------------------------------- ```