Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

## [Libmesh-users] Zero quadrature points in QGauss

 [Libmesh-users] Zero quadrature points in QGauss From: Vijay S. Mahadevan - 2009-05-01 14:03:57 ```Hi, This might sound ridiculous but I was wondering if there is a scenario when the quadrature rule you created for say, 2 dimensions and SIXTH order returns zero points ? Is there ever a need for initing quadrature rules explicitly ? To give you a background, I have an ImplicitSystem and an ExplicitSystem in my EquationSystems. I want to update the solution in ExplicitSystem (solution_exp) based on the solution in the ImplicitSystem (solution_imp). Hence, I loop over the local elements in the mesh, perform user code and compute solution_exp. But at the beginning of this loop, I attach the quadrature rule to the FEType of variable in ImplicitSystem which returns zero points (N_Q_Points=0). The order and dimension variables in the rule are correct but just that the points have not been computed. I have tried to debug this code for a while but I cannot get past the zero quadrature points. Any ideas or suggestions to get further on this will be extremely helpful. I am terribly sorry if I was vague or confusing or if this is downright absurd. I spent an entire day trying to get to the root of this problem but got nowhere. Please feel free to let me know if you need more details. Thanks a bunch in advance. Vijay ```

 [Libmesh-users] Zero quadrature points in QGauss From: Vijay S. Mahadevan - 2009-05-01 14:03:57 ```Hi, This might sound ridiculous but I was wondering if there is a scenario when the quadrature rule you created for say, 2 dimensions and SIXTH order returns zero points ? Is there ever a need for initing quadrature rules explicitly ? To give you a background, I have an ImplicitSystem and an ExplicitSystem in my EquationSystems. I want to update the solution in ExplicitSystem (solution_exp) based on the solution in the ImplicitSystem (solution_imp). Hence, I loop over the local elements in the mesh, perform user code and compute solution_exp. But at the beginning of this loop, I attach the quadrature rule to the FEType of variable in ImplicitSystem which returns zero points (N_Q_Points=0). The order and dimension variables in the rule are correct but just that the points have not been computed. I have tried to debug this code for a while but I cannot get past the zero quadrature points. Any ideas or suggestions to get further on this will be extremely helpful. I am terribly sorry if I was vague or confusing or if this is downright absurd. I spent an entire day trying to get to the root of this problem but got nowhere. Please feel free to let me know if you need more details. Thanks a bunch in advance. Vijay ```
 Re: [Libmesh-users] Zero quadrature points in QGauss From: John Peterson - 2009-05-01 14:07:11 ```On Fri, May 1, 2009 at 9:03 AM, Vijay S. Mahadevan wrote: > Hi, > > This might sound ridiculous but I was wondering if there is a scenario > when the quadrature rule you created for say, 2 dimensions and SIXTH > order returns zero points ? Is there ever a need for initing > quadrature rules explicitly ? > > To give you a background, I have an ImplicitSystem and an > ExplicitSystem in my EquationSystems. I want to update the solution in > ExplicitSystem (solution_exp) based on the solution in the > ImplicitSystem (solution_imp). Hence, I loop over the local elements > in the mesh, perform user code and compute solution_exp. But at the > beginning of this loop, I attach the quadrature rule to the FEType of > variable in ImplicitSystem which returns zero points (N_Q_Points=0). > The order and dimension variables in the rule are correct but just > that the points have not been computed. > > I have tried to debug this code for a while but I cannot get past the > zero quadrature points. Any ideas or suggestions to get further on > this will be extremely helpful. > > I am terribly sorry if I was vague or confusing or if this is > downright absurd. I spent an entire day trying to get to the root of > this problem but got nowhere. Please feel free to let me know if you > need more details. Thanks a bunch in advance. Which element type, triangles? We may need you to post your code or at least email it to one of us to take a closer look... -- John ```
 Re: [Libmesh-users] Zero quadrature points in QGauss From: Vijay S. Mahadevan - 2009-05-01 14:15:50 ```Yes, I use TRI3 with first order Lagrange basis functions. The code is part of a much bigger system. I am right now trying to create a test case to see if I can replicate the issue. I will get back to you with the code soon. Meanwhile, if you have any suggestions that could help me, that would be fantastic. Vijay On Fri, May 1, 2009 at 9:06 AM, John Peterson wrote: > On Fri, May 1, 2009 at 9:03 AM, Vijay S. Mahadevan wrote: >> Hi, >> >> This might sound ridiculous but I was wondering if there is a scenario >> when the quadrature rule you created for say, 2 dimensions and SIXTH >> order returns zero points ? Is there ever a need for initing >> quadrature rules explicitly ? >> >> To give you a background, I have an ImplicitSystem and an >> ExplicitSystem in my EquationSystems. I want to update the solution in >> ExplicitSystem (solution_exp) based on the solution in the >> ImplicitSystem (solution_imp). Hence, I loop over the local elements >> in the mesh, perform user code and compute solution_exp. But at the >> beginning of this loop, I attach the quadrature rule to the FEType of >> variable in ImplicitSystem which returns zero points (N_Q_Points=0). >> The order and dimension variables in the rule are correct but just >> that the points have not been computed. >> >> I have tried to debug this code for a while but I cannot get past the >> zero quadrature points. Any ideas or suggestions to get further on >> this will be extremely helpful. >> >> I am terribly sorry if I was vague or confusing or if this is >> downright absurd. I spent an entire day trying to get to the root of >> this problem but got nowhere. Please feel free to let me know if you >> need more details. Thanks a bunch in advance. > > Which element type, triangles?  We may need you to post your code or > at least email it to one of us to take a closer look... > > -- > John > ```
 Re: [Libmesh-users] Zero quadrature points in QGauss From: John Peterson - 2009-05-01 14:26:08 ```On Fri, May 1, 2009 at 9:15 AM, Vijay S. Mahadevan wrote: > Yes, I use TRI3 with first order Lagrange basis functions. The code is > part of a much bigger system. I am right now trying to create a test > case to see if I can replicate the issue. I will get back to you with > the code soon. Meanwhile, if you have any suggestions that could help > me, that would be fantastic. I've been updating the triangle quadrature rules recently, but I don't see anything obviously wrong with them and my simple test program is working. At a minimum, be sure that you are doing all of the following steps somewhere in your code... QGauss qrule (dim, qtest_order); FEType fe_type(FIRST,LAGRANGE); AutoPtr fe (FEBase::build(dim, fe_type)); fe->attach_quadrature_rule (&qrule); // Loop over elements, etc ... fe->reinit (elem); As far as I know, qrule.n_points() will not be set until after FE::reinit() -- John ```
 Re: [Libmesh-users] Zero quadrature points in QGauss From: Vijay S. Mahadevan - 2009-05-01 14:58:28 ```Ha. John, you nailed the problem. I was maintaining the dof_indices for the coupled system separately and was computing it at every quadrature point. But the call for this was before fe->reinit() and so the number of quadrature points were always zero. Once I moved this after reinit(), everything is working the way it is supposed to. Anyway, you have my most sincere appreciation for helping me with this. Looks like it won't be a crappy day after all. Thanks. Vijay On Fri, May 1, 2009 at 9:25 AM, John Peterson wrote: > On Fri, May 1, 2009 at 9:15 AM, Vijay S. Mahadevan wrote: >> Yes, I use TRI3 with first order Lagrange basis functions. The code is >> part of a much bigger system. I am right now trying to create a test >> case to see if I can replicate the issue. I will get back to you with >> the code soon. Meanwhile, if you have any suggestions that could help >> me, that would be fantastic. > > I've been updating the triangle quadrature rules recently, but I don't > see anything obviously wrong with them and my simple test program is > working.  At a minimum, be sure that you are doing all of the > following steps somewhere in your code... > > > QGauss qrule (dim, qtest_order); > > FEType fe_type(FIRST,LAGRANGE); > > AutoPtr fe (FEBase::build(dim, fe_type)); > > fe->attach_quadrature_rule (&qrule); > > // Loop over elements, etc > ... > > fe->reinit (elem); > > > As far as I know, qrule.n_points() will not be set until after FE::reinit() > > -- > John > ```