Skip to content

Add NonlinearSolve comparision in Goddard tutorial#29

Merged
ocots merged 7 commits intomainfrom
28-doc-add-newtonraphson
Jul 21, 2025
Merged

Add NonlinearSolve comparision in Goddard tutorial#29
ocots merged 7 commits intomainfrom
28-doc-add-newtonraphson

Conversation

@YouriRenoud
Copy link
Copy Markdown
Collaborator

No description provided.

@YouriRenoud YouriRenoud linked an issue Jul 1, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

hi @YouriRenoud Manifest.toml should not be synced on git

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For this one, it is ok. It is the one that is used for reproducibility:

mkpath("./docs/src/assets")
cp("./docs/Manifest.toml", "./docs/src/assets/Manifest.toml"; force=true)
cp("./docs/Project.toml", "./docs/src/assets/Project.toml"; force=true)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

However, the code that copy it should be replaced by:

# For reproducibility
mkpath(joinpath(@__DIR__, "src", "assets"))
cp(joinpath(@__DIR__, "Manifest.toml"), joinpath(@__DIR__, "src", "assets", "Manifest.toml"), force = true)
cp(joinpath(@__DIR__, "Project.toml"), joinpath(@__DIR__, "src", "assets", "Project.toml"), force = true)

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.

So I need to change these line in make.jl ? @ocots

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can

@ocots ocots marked this pull request as ready for review July 21, 2025 21:27
# NonlinearSolve resolution
nle_new!(s, ξ, p) = shoot!(s, ξ[1:3], ξ[4], ξ[5], ξ[6], ξ[7])
prob_nls = NonlinearProblem(nle_new!, ξ)
sol_nls = solve(prob_nls; show_trace=Val(true))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@YouriRenoud I think that to see the trace, you need to split in two blocks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Est-ce que tu vois

Algorithm: NewtonRaphson(
    descent = NewtonDescent(),
    autodiff = AutoForwardDiff(),
    vjp_autodiff = AutoReverseDiff(
        compile = false
    ),
    jvp_autodiff = AutoForwardDiff(),
    concrete_jac = Val{false}()
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can

@ocots ocots merged commit 7f3d157 into main Jul 21, 2025
3 checks passed
@ocots ocots deleted the 28-doc-add-newtonraphson branch July 21, 2025 21:55
@ocots
Copy link
Copy Markdown
Member

ocots commented Jul 21, 2025

Thanks @YouriRenoud ! I merge this PR and close the issue.

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.

[Doc] add NewtonRaphson

3 participants