Skip to content

Update Brusselators with Multiple Shooting#1228

Open
sharvmurgai wants to merge 9 commits into
SciML:masterfrom
sharvmurgai:brusselators
Open

Update Brusselators with Multiple Shooting#1228
sharvmurgai wants to merge 9 commits into
SciML:masterfrom
sharvmurgai:brusselators

Conversation

@sharvmurgai
Copy link
Copy Markdown
Contributor

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

CI Failure Analysis

The documentation build is timing out (16+ hours) because the training example runs for 10,000 iterations during the docs build.

Issues Found

  1. Line 304: maxiters=10000 is too high for documentation builds - this causes the timeout
  2. Line 61: Stray 'f' character in the Numerical Discretization section
  3. Line 16: Incomplete equation - missing 'V' at the end of \nabla^2

Fixes Required

Apply this patch to fix the issues:

diff --git a/docs/src/examples/pde/brusselator.md b/docs/src/examples/pde/brusselator.md
index 48503b8e..791822df 100644
--- a/docs/src/examples/pde/brusselator.md
+++ b/docs/src/examples/pde/brusselator.md
@@ -13,7 +13,7 @@ The Brusselator PDE is defined on a unit square periodic domain as follows:
 \`\`\`
 
 \`\`\`math
-\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2 
+\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2 V
 \`\`\`
 
 where $A=3.4, B=1$ and the forcing term is:
@@ -58,7 +58,7 @@ V(x, y + 1, t) = V(x, y, t)
 \`\`\`
 
 ## Numerical Discretization
-f
+
 To numerically solve this PDE, we discretize the unit square domain using $N$ grid points along each spatial dimension. The variables $U[i,j]$ and $V[i,j]$ then denote the concentrations at the grid point $(i, j)$ at a given time $t$.
 
 We represent the spatially discretized fields as:
@@ -301,7 +301,7 @@ end
 Finally to run everything:
 
 \`\`\`@example bruss
-res = solve(optprob, Optimisers.Adam(0.01), callback=callback, maxiters=10000)
+res = solve(optprob, Optimisers.Adam(0.01), callback=callback, maxiters=100)
 \`\`\`
 
 \`\`\`@example bruss

The main fix is reducing maxiters back to 100 (what it was before). This will allow the documentation build to complete in a reasonable time while still demonstrating the multiple shooting approach.

cc @ChrisRackauckas

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Action Required

@sharvmurgai The CI is failing because the documentation build times out. Please apply these three changes to docs/src/examples/pde/brusselator.md:

Change 1 (Line 16): Fix incomplete equation

-\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2 
+\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2 V

Change 2 (Line 61): Remove stray 'f' character

 ## Numerical Discretization
-f
+
 To numerically solve this PDE, we discretize the unit square domain using...

Change 3 (Line 304): Reduce training iterations for docs build

-res = solve(optprob, Optimisers.Adam(0.01), callback=callback, maxiters=10000)
+res = solve(optprob, Optimisers.Adam(0.01), callback=callback, maxiters=100)

After making these changes, commit and push to your branch. The CI should complete successfully.

cc @ChrisRackauckas

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Documentation Errors Found

I've identified two documentation errors that are likely causing the CI build to fail:

1. Incomplete equation (line 16)

The second PDE equation is missing V at the end:

$$\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2$$

Should be:

$$\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2 V$$

2. Stray character (line 61)

There's a stray f character before the "Numerical Discretization" section text:

## Numerical Discretization
f
To numerically solve this PDE...

Should be:

## Numerical Discretization

To numerically solve this PDE...

Suggested Fix

Please update docs/src/examples/pde/brusselator.md:

  1. Add V to complete the second equation on line 16
  2. Remove the stray f character on line 61

These should resolve the CI failures.

cc @ChrisRackauckas @sharvmurgai

🤖 Generated with Claude Code

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

CI Failure Analysis

The documentation build is failing due to two typos in docs/src/examples/pde/brusselator.md:

Issues Found

  1. Line 61: Stray character f in the "Numerical Discretization" section
  2. Line 16: Incomplete equation - missing V after the Laplacian operator \nabla^2

Fixes Needed

Line 16 - Change:

$$\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2$$

To:

$$\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2 V$$

Line 61 - Remove the standalone f character between "## Numerical Discretization" and "To numerically solve this PDE..."

Diff

-\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2 
+\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2 V

 ## Numerical Discretization
-f
+
 To numerically solve this PDE, we discretize the unit square domain...

These fixes should resolve the CI failures. Once applied, the documentation should build successfully.

cc @ChrisRackauckas @sharvmurgai

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Documentation Build Timeout Issue

The CI is failing because the documentation build is timing out (ran for 16+ hours). I've identified three issues in docs/src/examples/pde/brusselator.md that need to be fixed:

Issues Found:

  1. Line 16: Incomplete equation - missing V in the Laplacian term

    -\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2 
    +\frac{\partial V}{\partial t} = AU - U^2V + \alpha \nabla^2 V
  2. Line 61: Stray character - there's an "f" that shouldn't be there

    ## Numerical Discretization
    -f
    +
    To numerically solve this PDE...
  3. Line 304: Too many iterations causing timeout - maxiters=10000 should be reduced to 100

    -res = solve(optprob, Optimisers.Adam(0.01), callback=callback, maxiters=10000)
    +res = solve(optprob, Optimisers.Adam(0.01), callback=callback, maxiters=100)

The 10000 iterations is causing the documentation build to run for many hours and timeout. The original brusselator example used 100 iterations, which is sufficient to demonstrate the methodology while allowing docs to build in a reasonable time.

@ChrisRackauckas Could you please apply these fixes? They should resolve the CI timeout issue.

🤖 Generated with Claude Code

Updated the PDE equations and adjusted the maximum iterations for the solver.
@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

PR Status: Needs Rebase

This PR is currently 183 commits behind master and includes outdated source code changes that conflict with the current codebase. The branch was forked from an old version of SciMLSensitivity.jl.

Key Issues:

  1. Version downgrade: The PR downgrades the package version from 7.91.0 to 7.84.0
  2. Removed features: Several exports have been removed (GaussKronrodAdjoint, MooncakeAdjoint, EnzymeAdjoint)
  3. Dependency conflicts: Removes SciMLLogging dependency and downgrades multiple package compat versions
  4. Source code conflicts: Many source files have been modified that have since been updated in master

What's Valuable:

The Multiple Shooting documentation for the Brusselator example in docs/src/examples/pde/brusselator.md is the main contribution from this PR. This content could be useful for the documentation.

Recommended Next Steps:

  1. Create a fresh branch from current master
  2. Apply only the brusselator.md documentation changes to the new branch
  3. Open a new PR with just those changes

Alternatively, rebase this branch onto current master and resolve the conflicts, keeping only the brusselator documentation additions.

@ChrisRackauckas @sharvmurgai

🤖 Generated with Claude Code

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.

2 participants