# ODE solver for BVProblem never calls the provided function for boundary conditions

**URL:** <https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447>\
**Category:** General Usage\
**Tags:** question\
**Created:** [February 1, 2025, 7:58am UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447 "2025-02-01T07:58:16Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:07pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/21 "2025-02-03T18:07:56Z")

</div>

> [@ErikQQY](#):
>
> FIRK methods don’t have automatic step size choosing, so you must provide a `dt` in your `solve`

Please tell me where to find this information in the online Julia documentation.  
thanks.

---

<div class="post-metadata">

**Author:** ![ErikQQY](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erikqqy/32/23074_2.png) [@ErikQQY](https://discourse.julialang.org/u/ErikQQY)\
**Post date:** [February 3, 2025, 6:10pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/22 "2025-02-03T18:10:50Z")

</div>

> [@P0p5](#):
>
> > [@ErikQQY](#):
> >
> > - FIRK methods don’t have automatic step size choosing, so you must provide a `dt` in your `solve`
> > - To solve a BVP, you should use `RadauIIa5` instead of `RadauIIA5`
> 
> When I do that, while also saying “using BoundaryValueDiffEqFIRK, ArgCheck”,  
> I get:
> 
> ```ERROR: LoadError: UndefVarError: `RadauIIa5` not defined in `Main`  
> Suggestion: check for spelling errors or missing imports.  
> Stacktrace:  
> [1] top-level scope  
> @ ~/Applications/Julia/RealisticSeismology-main/BVProblem,Example2.jl:47  
> [2] include(fname::String)  
> @ Main ./sysimg.jl:38  
> [3] top-level scope  
> @ REPL[446]:1  
> in expression starting at /Users/andy 1/Applications/Julia/RealisticSeismology-main/BVProblem,Example2.jl:47
> 
> ```julia
> So which package contains "RadauIIa5"?
> 
> ```

Please try `using BoundaryValueDiffEqFIRK` in your REPL and check if there are errors.

---

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:11pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/23 "2025-02-03T18:11:42Z")

</div>

> [@ErikQQY](#):
>
> As for the commented part where you are trying to provide an initial guess, they should be provided as a function returning AbstractArray instead of a Tuple

And please tell me where to find this “obvious” information in the online Julia documentation.  
Thanks

---

<div class="post-metadata">

**Author:** ![ErikQQY](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erikqqy/32/23074_2.png) [@ErikQQY](https://discourse.julialang.org/u/ErikQQY)\
**Post date:** [February 3, 2025, 6:12pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/24 "2025-02-03T18:12:39Z")

</div>

> [@P0p5](#):
>
> > [@ErikQQY](#):
> >
> > FIRK methods don’t have automatic step size choosing, so you must provide a `dt` in your `solve`
> 
> Please tell me where to find this information in the online Julia documentation.  
> thanks.

See: [BVP Solvers · DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/latest/solvers/bvp_solve/#FIRK(Fully-Implicit-Runge-Kutta)-methods:~:text=All%20MIRK%20methods%20have%20defect%20control%20adaptivity%20by%20default%20which%20adapts%20the%20mesh%20(dt)%20automatically)

---

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:13pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/25 "2025-02-03T18:13:35Z")

</div>

> [@ErikQQY](#):
>
> Please try `using BoundaryValueDiffEqFIRK` in your REPL and check if there are errors.

Same result.

---

<div class="post-metadata">

**Author:** ![ErikQQY](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erikqqy/32/23074_2.png) [@ErikQQY](https://discourse.julialang.org/u/ErikQQY)\
**Post date:** [February 3, 2025, 6:19pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/26 "2025-02-03T18:19:04Z")

</div>

That is unlikely to happen, could you try in your REPL:

```julia
julia> using BoundaryValueDiffEqFIRK

julia> RadauIIa5
RadauIIa5

```

And if the `UndefVarError` still occurs, could you post your julia version and `Pkg.status(; mode = PKGMODE_MANIFEST)`?

---

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:23pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/27 "2025-02-03T18:23:27Z")

</div>

Here is the result:

```julia

julia> RadauIIa5
ERROR: UndefVarError: `RadauIIa5` not defined in `Main`
Suggestion: check for spelling errors or missing imports.

```

---

<div class="post-metadata">

**Author:** ![ErikQQY](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erikqqy/32/23074_2.png) [@ErikQQY](https://discourse.julialang.org/u/ErikQQY)\
**Post date:** [February 3, 2025, 6:24pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/28 "2025-02-03T18:24:22Z")

</div>

What about

```julia
julia> using BoundaryValueDiffEqFIRK

julia> RadauIIa5
RadauIIa5

```

---

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:25pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/29 "2025-02-03T18:25:00Z")

</div>

What appeared is less than I pasted. Trying again…

```julia

julia> using BoundaryValueDiffEqFIRK

julia> RadauIIa5
ERROR: UndefVarError: `RadauIIa5` not defined in `Main`
Suggestion: check for spelling errors or missing imports.

julia> 

```

---

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:26pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/30 "2025-02-03T18:26:58Z")

</div>

I suspect that you have also installed some other package containing RadauIIa5.

Try ]st

---

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:30pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/31 "2025-02-03T18:30:18Z")

</div>

> [@P0p5](#):
>
> > [@ErikQQY](#):
> >
> > As for the commented part where you are trying to provide an initial guess, they should be provided as a function returning AbstractArray instead of a Tuple
> 
> And please tell me where to find this “obvious” information in the online Julia documentation.  
> Thanks

And as I have yet to find any example of an initialguess function in the online documentation,  
could you please provide such an example?  
thanks

---

<div class="post-metadata">

**Author:** ![ErikQQY](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erikqqy/32/23074_2.png) [@ErikQQY](https://discourse.julialang.org/u/ErikQQY)\
**Post date:** [February 3, 2025, 6:30pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/32 "2025-02-03T18:30:38Z")

</div>

That’s really weird since I am using an empty environment with only BoundaryValueDiffEqFIRK.jl installed.

Could you share your `Pkg.status(; mode = PKGMODE_MANIFEST)`?

---

<div class="post-metadata">

**Author:** ![ErikQQY](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erikqqy/32/23074_2.png) [@ErikQQY](https://discourse.julialang.org/u/ErikQQY)\
**Post date:** [February 3, 2025, 6:32pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/33 "2025-02-03T18:32:31Z")

</div>

> [@P0p5](#):
>
> > [@P0p5](#):
> >
> > > [@ErikQQY](#):
> > >
> > > As for the commented part where you are trying to provide an initial guess, they should be provided as a function returning AbstractArray instead of a Tuple
> > 
> > And please tell me where to find this “obvious” information in the online Julia documentation.  
> > Thanks
> 
> And as I have yet to find any example of an initialguess function in the online documentation,  
> could you please provide such an example?  
> thanks

That’s indeed some issues with BoundaryValueDiffEq.jl for not having enough documentations on how to provide initial guesses, will fix this issue ASAP

> <https://github.com/SciML/BoundaryValueDiffEq.jl/issues/274>
>
> Got some complaints on the confusion of how to provide the initial guessings: ht…tps://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/2

---

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:33pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/34 "2025-02-03T18:33:49Z")

</div>

```julia

(@v1.11) pkg> status
Status `~/.julia/environments/v1.11/Project.toml`
  [dce04be8] ArgCheck v2.4.0
  [85d9eb09] BoundaryValueDiffEqFIRK v1.4.0
  [90137ffa] StaticArrays v1.9.11

(@v1.11) pkg> status(; mode = PKGMODE_MANIFEST)
ERROR: `status(` is not a recognized command. Type ? for help with available commands

```

---

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:35pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/35 "2025-02-03T18:35:28Z")

</div>

> [@ErikQQY](#):
>
> > [@P0p5](#):
> >
> > And as I have yet to find any example of an initialguess function in the online documentation,  
> > could you please provide such an example?  
> > thanks
> 
> That’s indeed some issues with [BoundaryValueDiffEq.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/BoundaryValueDiffEq) for not having enough documentations on how to provide initial guesses, will fix this issue ASAP
> 
> [Docs for providing initial guess · Issue #274 · SciML/BoundaryValueDiffEq.jl · GitHub](https://github.com/SciML/BoundaryValueDiffEq.jl/issues/274)

Ok, but could you perhaps provide such a (maximal) example right here in this discourse?

thanks

---

<div class="post-metadata">

**Author:** ![ErikQQY](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erikqqy/32/23074_2.png) [@ErikQQY](https://discourse.julialang.org/u/ErikQQY)\
**Post date:** [February 3, 2025, 6:41pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/36 "2025-02-03T18:41:28Z")

</div>

Sure, see

> <https://github.com/SciML/BoundaryValueDiffEq.jl/blob/508629f8362826b08b78ee12c5a9c4dd91872249/lib/BoundaryValueDiffEqFIRK/test/expanded/firk_basic_tests.jl#L386-L421>

---

<div class="post-metadata">

**Author:** ![ErikQQY](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erikqqy/32/23074_2.png) [@ErikQQY](https://discourse.julialang.org/u/ErikQQY)\
**Post date:** [February 3, 2025, 6:44pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/37 "2025-02-03T18:44:09Z")

</div>

> [@P0p5](#):
>
> ```julia
> 
> (@v1.11) pkg> status
> Status `~/.julia/environments/v1.11/Project.toml`
> [dce04be8] ArgCheck v2.4.0
> [85d9eb09] BoundaryValueDiffEqFIRK v1.4.0
> [90137ffa] StaticArrays v1.9.11
> 
> (@v1.11) pkg> status(; mode = PKGMODE_MANIFEST)
> ERROR: `status(` is not a recognized command. Type ? for help with available commands
> 
> ```

I have never encounter such error, and I can’t even reproduce this error. So you successfully `using BoundaryValueDiffEqFIRK`(‘successfully’ means no other errors), but when you try calling `RadauIIa5` and there is still `UndefVarError`?

---

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:49pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/38 "2025-02-03T18:49:45Z")

</div>

> [@ErikQQY](#):
>
> > [@P0p5](#):
> >
> > > [@ErikQQY](#):
> > >
> > > FIRK methods don’t have automatic step size choosing, so you must provide a `dt` in your `solve`
> > 
> > Please tell me where to find this information in the online Julia documentation.  
> > thanks.
> 
> See: [BVP Solvers · DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/latest/solvers/bvp_solve/#FIRK(Fully-Implicit-Runge-Kutta)-methods:~:text=All%20MIRK%20methods%20have%20defect%20control%20adaptivity%20by%20default%20which%20adapts%20the%20mesh%20(dt)%20automatically)

Thank you!

And may I suggest that the

> [@ErikQQY](#):
>
> I have never encounter such error, and I can’t even reproduce this error. So you successfully `using BoundaryValueDiffEqFIRK`(‘successfully’ means no other errors), but when you try calling `RadauIIa5` and there is still `UndefVarError`?

No other errors. And that package seems to be there…

```julia
julia> RadauIIA5
RadauIIA5

julia> 

```

---

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:51pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/39 "2025-02-03T18:51:42Z")

</div>

I guess this “RadauIIa5” may be hiding somewhere else in your system?

---

<div class="post-metadata">

**Author:** ![P0p5](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@P0p5](https://discourse.julialang.org/u/P0p5)\
**Post date:** [February 3, 2025, 6:53pm UTC](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447/40 "2025-02-03T18:53:42Z")

</div>

Whose idea was it to have two different modules with names differing only by the case of only one character in the middle of the names?

[Previous page](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447.md?page=1)

[Next page](https://discourse.julialang.org/t/ode-solver-for-bvproblem-never-calls-the-provided-function-for-boundary-conditions/125447.md?page=3)
