Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dolci/schedules application #56

Merged
merged 42 commits into from
Mar 1, 2024
Merged

Dolci/schedules application #56

merged 42 commits into from
Mar 1, 2024

Conversation

Ig-dolci
Copy link
Contributor

No description provided.

@Ig-dolci Ig-dolci marked this pull request as ready for review January 22, 2024 10:18
@Ig-dolci Ig-dolci assigned Ig-dolci, jrmaddison and dham and unassigned Ig-dolci Jan 22, 2024
Copy link
Contributor

@jrmaddison jrmaddison left a comment

Choose a reason for hiding this comment

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

Some general comments:

  • I think there is an error in the forward residual -- the boundary conditions don't seem to be applied.
  • The adjoint derivation is motivated by a continuous adjoint approach, but the later Taylor testing verifies discrete adjoint consistency.
  • The displayed adjoint sensitivity is a directional derivative rather than the full gradient.
  • I recommend reducing the number of example schedules.
  • I recommend removing all the code comments in the example schedules.
  • The disk storage schedules don't actually store checkpoints on disk.
  • I don't understand the single_storage behaviour.

docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
Copy link
Contributor

@jrmaddison jrmaddison left a comment

Choose a reason for hiding this comment

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

From checking mass and stiffness matrices:

  • There is an off-by-on error in the definition of $h$, which should be model["lx"] / (model["nx"] - 1). This appears in three places.
  • The _mass_matrix method returns the mass divided by $h$, which could be noted in a comment.
  • The _stiffness_matrix method returns the stiffness matrix multiplied by -\model["nu"] / h. There are sign errors when the result is used in _residual and _jacobian.

docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
@Ig-dolci Ig-dolci marked this pull request as draft February 14, 2024 11:50
@Ig-dolci Ig-dolci marked this pull request as ready for review February 15, 2024 10:25
@Ig-dolci Ig-dolci requested a review from jrmaddison February 15, 2024 10:34
Copy link
Contributor

@jrmaddison jrmaddison left a comment

Choose a reason for hiding this comment

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

Code should also be linted (e.g. using ruff).

docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
docs/notebooks/burger.ipynb Outdated Show resolved Hide resolved
@Ig-dolci Ig-dolci requested a review from jrmaddison February 27, 2024 12:01
@Ig-dolci Ig-dolci merged commit 2c140e2 into main Mar 1, 2024
8 checks passed
@Ig-dolci Ig-dolci deleted the dolci/schedules_application branch March 1, 2024 12:34
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.

3 participants