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

Cannot construct a ConjugateGradientPoissonSolver with a default preconditioner #3829

Closed
ali-ramadhan opened this issue Oct 7, 2024 · 2 comments
Labels
bug 🐞 Even a perfect program still has bugs

Comments

@ali-ramadhan
Copy link
Member

I'll open a PR to add a test that covers this.


MWE:

using Oceananigans
using Oceananigans.Solvers: ConjugateGradientPoissonSolver

grid = RectilinearGrid(
    CPU(),
    Float64,
    topology = (Bounded, Bounded, Bounded),
    size = (16, 16, 16),
    x = (0, 1),
    y = (0, 1),
    z = (-1, 0)
)

ConjugateGradientPoissonSolver(grid)

Error:

ERROR: UndefVarError: `ImmersedBoundaryGrid` not defined
Stacktrace:
 [1] ConjugateGradientPoissonSolver(grid::RectilinearGrid{…}; preconditioner::Oceananigans.Solvers.DefaultPreconditioner, reltol::Float64, abstol::Float64, kw::@Kwargs{})
   @ Oceananigans.Solvers ~/atdepth/Oceananigans.jl/src/Solvers/conjugate_gradient_poisson_solver.jl:54
 [2] ConjugateGradientPoissonSolver(grid::RectilinearGrid{Float64, Bounded, Bounded, Bounded, Float64, Float64, Float64, OffsetArrays.OffsetVector{Float64, StepRangeLen{…}}, OffsetArrays.OffsetVector{Float64, StepRangeLen{…}}, OffsetArrays.OffsetVector{Float64, StepRangeLen{…}}, CPU})
   @ Oceananigans.Solvers ~/atdepth/Oceananigans.jl/src/Solvers/conjugate_gradient_poisson_solver.jl:47
 [3] top-level scope
   @ REPL[6]:1
Some type information was truncated. Use `show(err)` to see complete types.
@ali-ramadhan ali-ramadhan added the bug 🐞 Even a perfect program still has bugs label Oct 7, 2024
@ali-ramadhan ali-ramadhan changed the title Cannot construct a ConjugateGradientPoissonSolver Cannot construct a ConjugateGradientPoissonSolver with a default preconditioner Oct 7, 2024
@glwagner
Copy link
Member

glwagner commented Oct 8, 2024

Good catch

@tomchor
Copy link
Collaborator

tomchor commented Oct 22, 2024

Closed by #3846

@tomchor tomchor closed this as completed Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Even a perfect program still has bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants