GithubHelp home page GithubHelp logo

Comments (7)

inducer avatar inducer commented on August 29, 2024 1

I agree with this. This would allow quadrature_rule for the derived classes to return mp.Quadrature(self.weights, self.unit_nodes, exact_to=self.order), correct?

Yep. At least as long as the polynomial space contains P^N (see the current, kinda hokey, definition of exact_to).

Though is this not well-conditioned, right? You mentioned at one point that this is equivalent to Newton-Cotes, which is... problematic for high order

Newton-Cotes with equispaced nodes is obviously terrible. Newton-Cotes with edge-clustered nodes is not that bad. (After all, Newton-Cotes with Legendre nodes is just Gaussian quadrature.)

Here's a demo: https://gist.github.com/inducer/19eb49ff7702d4bf5b12477208540731

from meshmode.

inducer avatar inducer commented on August 29, 2024

Thanks for writing up a summary of this! Suppose we go with the direction that inducer/modepy#33 seems to be leaning (?) (i.e. allow feeding exact_to to the Quadrature constructor), I claim that the resulting "mass matrix quadrature" is exact to the order of the reference polynomial space, by definition of the mass matrix as long as:

  • the DOFs are nodal, and
  • 1 is represented exactly, by a DOF vector of all ones.

from meshmode.

inducer avatar inducer commented on August 29, 2024

(Opinions?) cc @alexfikl

from meshmode.

thomasgibson avatar thomasgibson commented on August 29, 2024

I claim that the resulting "mass matrix quadrature" is exact to the order of the reference polynomial space, by definition of the mass matrix as long as:

  • the DOFs are nodal, and
  • 1 is represented exactly, by a DOF vector of all ones.

I agree with this. This would allow quadrature_rule for the derived classes to return mp.Quadrature(self.weights, self.unit_nodes, exact_to=self.order), correct?

Though is this not well-conditioned, right? You mentioned at one point that this is equivalent to Newton-Cotes, which is... problematic for high order 😅

from meshmode.

inducer avatar inducer commented on August 29, 2024

(Note how even the weights stay positive in the demo.)

from meshmode.

inducer avatar inducer commented on August 29, 2024

(But how the rule has obviously lost the 2*n accuracy of Gauss.)

from meshmode.

thomasgibson avatar thomasgibson commented on August 29, 2024

Here's a demo: https://gist.github.com/inducer/19eb49ff7702d4bf5b12477208540731

Very nice!

I've also gone ahead and started working on this issue: 44606a7

from meshmode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.