Skip to content

[BUG] - Matrix Mismatch Regarding NavierStokesSLCN Solver #180

Description

@Chawgai

I am facing the following problem while using the attached test script. I run like mpirun -n 4 python nstt.py

nstt.txt

Screenshots
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/underworld3/systems/solvers.py", line 2414, in <la
navier_stokes.solve(timestep=delta_t, zero_init_guess=False)
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/underworld3/timing.py", line 326, in timed
result = routine(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/underworld3/systems/solvers.py", line 3773, in solve
self.DFDt.update_pre_solve(timestep, verbose=verbose, evalf=_evalf)
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/underworld3/systems/ddt.py", line 1771, in update_pre_solve
self._psi_star_projection_solver.solve(verbose=verbose)
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/underworld3/timing.py", line 326, in timed
result = routine(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "src/underworld3/cython/petsc_generic_snes_solvers.pyx", line 3863, in underworld3.cython.generic_solvers.SNES_MultiComponent.solve
File "/Users/umbda>
lambda self: (self.u.sym - self.uw_function) * self.uw_weighting_function,
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/sympy/core/decorators.py", line 118, in binary_op_wrapper
return func(self, other)
^^^^^^^^^^^^^^^^^
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/sympy/matrices/matrixbase.py", line 3045, in sub
return self + (-a)
~~~~~^~~~~~
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/sympy/core/decorators.py", line 118, in binary_op_wrapper
return func(self, other)
^^^^^^^^^^^^^^^^^
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/sympy/matrices/matrixbase.py", line 2765, in add
raise ShapeError(f"Matrix size mismatch: {self.shape} + {other.shape}.")
sympy.matrices.exceptions.ShapeError: Matrix size mismatch: (1, 3) + (2, 2).
8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/underworld3/timing.py", line 326, in timed
result = routine(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "src/underworld3/cython/petsc_generic_snes_solvers.pyx", line 721, in underworld3.cython.generic_solvers.SolverBaseClass._build
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/underworld3/timing.py", line 326, in timed
result = routine(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "src/underworld3/cython/petsc_generic_snes_solvers.pyx", line 3549, in underworld3.cython.generic_solvers.SNES_MultiComponent._setup_pointwise_functions
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/underworld3/utilities/_api_tools.py", line 423, in get
updated_value = self.value_fn(obj)
^^^^^^^^^^^^^^^^^^
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/underworld3/systems/solvers.py", line 2414, in
lambda self: (self.u.sym - self.uw_function) * self.uw_weighting_function,
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/sympy/core/decorators.py", line 118, in binary_op_wrapper
return func(self, other)
^^^^^^^^^^^^^^^^^
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/sympy/matrices/matrixbase.py", line 3045, in sub
return self + (-a)
~~~~~^~~~~~
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/sympy/core/decorators.py", line 118, in binary_op_wrapper
return func(self, other)
^^^^^^^^^^^^^^^^^
File "/Users/u8085704/underworld3/.pixi/envs/dev/lib/python3.12/site-packages/sympy/matrices/matrixbase.py", line 2765, in add
raise ShapeError(f"Matrix size mismatch: {self.shape} + {other.shape}.")
sympy.matrices.exceptions.ShapeError: Matrix size mismatch: (1, 3) + (2, 2).

nstt.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions