Problem with dedalus3 compound bases

58 views
Skip to first unread message

guanhan li

unread,
Jun 26, 2025, 2:49:25 PM6/26/25
to Dedalus Users
Hi all,

I am trying to solve an IVP case with dedalus3. I found that there is no automatic compound bases in dedalus3, so I follow the instructions in this discussion: https://groups.google.com/g/dedalus-users/c/eL_fvicczvY/m/rICJeWNbAgAJ

However, when I run my code, it returns:

Traceback (most recent call last):
  File "/home/gl523/B/perturb_compound.py", line 181, in <module>
    solver = problem.build_solver(timestepper)
  File "/home/gl523/miniforge3/envs/dedalus3/lib/python3.13/site-packages/dedalus/core/problems.py", line 100, in build_solver
    return self.solver_class(self, *args, **kw)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/home/gl523/miniforge3/envs/dedalus3/lib/python3.13/site-packages/dedalus/core/solvers.py", line 565, in __init__
    self.build_matrices(self.subproblems, ['M', 'L'])
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gl523/miniforge3/envs/dedalus3/lib/python3.13/site-packages/dedalus/core/solvers.py", line 131, in build_matrices
    subsystems.build_subproblem_matrices(self, subproblems, matrices)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gl523/miniforge3/envs/dedalus3/lib/python3.13/site-packages/dedalus/core/subsystems.py", line 81, in build_subproblem_matrices
    subproblem.build_matrices(matrices)
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/gl523/miniforge3/envs/dedalus3/lib/python3.13/site-packages/dedalus/core/subsystems.py", line 552, in build_matrices
    raise ValueError("Non-square system: group={}, I={}, J={}".format(self.group, valid_eqn.nnz, valid_var.nnz))
ValueError: Non-square system: group=(0, None), I=1182, J=1181


It seems to be the number of variables does not match the number of equations, but I can not find the way to fix it. Are there any way to solve it? Any help would be appreciated, thank you in advance!

Best,
Kyle
perturb_compound.py
Reply all
Reply to author
Forward
0 new messages