Skip to content

Conversation

@mscroggs
Copy link
Member

@mscroggs mscroggs commented May 6, 2025

Resolves #922

Comment on lines 4923 to 4928
for (std::size_t i = 0; i < wts.size(); ++i)
{
pts[i] += 1.0;
pts[i] /= 2.0;
wts[i] *= 0.5;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samuel0007 I've added this scaling so that the rule matches the [0,1] interval used everywhere else. Is this compatible with what you needed this for?

@samuel0007
Copy link
Contributor

For my application, I only need an exposed alpha and defined on [0,1] 👍

But I think from what I understand, one should have (for general alpha and beta) - as the weight function impacts when you pullback the integral:

$$ \zeta_{i} = \frac{1 + \widehat\zeta_{i}^{(\alpha,\beta)}}{2}, \qquad \omega_{i} = \frac{\widehat\omega_{i}^{(\alpha,\beta)}}{2^{\alpha+\beta+1}}. $$

Which also match this small example I found online https://www.math.umd.edu/~petersd/460/html/gaussjacobi_ex.html

Also maybe you might also want to use this rescaled function in the make_quadrature_tetrahedron_collapsed and make_quadrature_triangle_collapsed to make it consistent?

template std::vector<float> quadrature::get_gll_points(int);
template std::vector<double> quadrature::get_gll_points(int);

/// @cond DOXYGEN_SHOULD_SKIP_THIS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should go around all the explicit instantiations, e.g. if you look at get_gll_points in the generated docs, you will only see double at the moment, not T, because that was the last thing doxygen saw.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess there may be other explicit instantiations in other files... worth checking (maybe not in this PR).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opened #929 to remind me to do this

mscroggs and others added 5 commits May 6, 2025 17:02
Co-authored-by: Chris Richardson <chris@bpi.cam.ac.uk>
Co-authored-by: Chris Richardson <chris@bpi.cam.ac.uk>
Co-authored-by: Chris Richardson <chris@bpi.cam.ac.uk>
@chrisrichardson chrisrichardson self-requested a review May 6, 2025 16:20
@mscroggs mscroggs added this pull request to the merge queue May 7, 2025
Merged via the queue into main with commit f93b732 May 7, 2025
28 checks passed
@mscroggs mscroggs deleted the mscroggs/expose-gauss-jacobi branch May 7, 2025 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

expose Gauss-Jacobi rules

4 participants