Skip to content

Burgers#793

Open
GiovanniCanali wants to merge 2 commits intomathLab:0.3from
GiovanniCanali:burgers
Open

Burgers#793
GiovanniCanali wants to merge 2 commits intomathLab:0.3from
GiovanniCanali:burgers

Conversation

@GiovanniCanali
Copy link
Copy Markdown
Collaborator

Description

This PR fixes #792

Checklist

  • Code follows the project’s Code Style Guidelines
  • Tests have been added or updated
  • Documentation has been updated if necessary
  • Pull request is linked to an open issue

@GiovanniCanali GiovanniCanali self-assigned this Apr 24, 2026
@GiovanniCanali GiovanniCanali added enhancement New feature or request pr-to-review Label for PR that are ready to been reviewed 0.3 Related to 0.3 release labels Apr 24, 2026
@GiovanniCanali GiovanniCanali marked this pull request as ready for review April 24, 2026 13:41
@GiovanniCanali GiovanniCanali requested review from a team and dario-coscia as code owners April 24, 2026 13:41
Copy link
Copy Markdown
Collaborator

@dario-coscia dario-coscia left a comment

Choose a reason for hiding this comment

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

Two minor comments, otherwise all good.

PS. I thought we had burgers 🤯

class BurgersProblem(TimeDependentProblem, SpatialProblem):
r"""
Implementation of the burgers problem in the spatial interval
:math:`[-1, 1]` and temporal interval :math:`[0, 1]`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe let's add the equation here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have kept the same structure of other problems: the equation is described just in the corresponding class.

Maybe, we can add a more thorough description for all problems in the zoo (domain, boundary and initial conditions, pde, ...).

In such case, I will fix this for the BurgersProblem here and open a new PR for all other zoo members

f"{len(spatial_d)}."
)

# Ensure time is passed as input
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I guess this types of check we already do in grad. Maybe we can use fast_grad afterwards to speed up a bit?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Of course, grad already checks whether "t" is in the input labels. However, this error message is very explicit and I would keep it.

I can use fast_grad for the temporal derivative. Still, checks must be performed for the differential operators computed on spatial variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.3 Related to 0.3 release enhancement New feature or request pr-to-review Label for PR that are ready to been reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants