You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use QGaussLogR with the factor_out_singular_weights=true flag, the quadrature weights does not sum to one. From the documentation, it looks like they should.
Is this a bug? Or should the sum of the weights only converge to 1 when we increase the order? Do you know @luca-heltai ?
#include<deal.II/base/quadrature_lib.h>usingnamespacedealii;intmain()
{
constint dim = 1;
constPoint<dim> ref_space_singularity;
constdouble singularity_scaling = 1;
constbool factor_out_singular_weight = true;
constunsignedint max_order = 12;
for (unsignedint order = 1; order <= max_order; order++)
{
QGaussLogR<dim> quadrature(order,
ref_space_singularity,
singularity_scaling,
factor_out_singular_weight);
double sum_of_weights = 0;
for (unsignedint i = 0; i < quadrature.size(); ++i)
sum_of_weights += quadrature.weight(i);
std::cout <<"order = "<<order <<", sum_of_weights = " << sum_of_weights << std::endl;
}
}
order = 1, sum_of_weights = 0.910239
order = 2, sum_of_weights = 0.883331
order = 3, sum_of_weights = 0.936294
order = 4, sum_of_weights = 0.95993
order = 5, sum_of_weights = 0.972484
order = 6, sum_of_weights = 0.979941
order = 7, sum_of_weights = 0.984729
order = 8, sum_of_weights = 0.987986
order = 9, sum_of_weights = 0.990301
order = 10, sum_of_weights = 0.992005
order = 11, sum_of_weights = 0.993296
order = 12, sum_of_weights = 0.994298
The text was updated successfully, but these errors were encountered:
Sorry, I'm late to the party. Summing the weights with factor_out_singular_weight=true does not make any sense, since you are not supposed to integrate smooth functions with it (and the constant is such a function). The documentation states
Notice that this quadrature rule is worthless if you try to use it for regular functions once you factored out the singularity.
I hope this is clear enough, but you are welcome to suggest any changes you think are appropriate in the documentation. I must admit it does not read well (I think I wrote this some 10 to 15 years ago, and I would have probably written it differently today).
If I use
QGaussLogR
with thefactor_out_singular_weights=true
flag, the quadrature weights does not sum to one. From the documentation, it looks like they should.Is this a bug? Or should the sum of the weights only converge to 1 when we increase the order? Do you know @luca-heltai ?
The text was updated successfully, but these errors were encountered: