Skip to content

Problem with the solver_theta function (spdiag matrix) #6

@apoyet

Description

@apoyet

Hi,

I'm trying to use the following file: https://github.com/hplgit/num-methods-for-PDEs/blob/master/src/diffu/diffu1D_vc.py
in order to solve the diffusion equation with non-constant diffusion coefficient.

I'm therefore using the solver_theta function. But I systematically encounters an issue when building the sparse matrix. I get the following error:

ValueError: number of diagonals (1) does not match the number of offsets (3)

Do you have any idea where this might come from ? It seems that there is an issue with the spdiags method of Scipy.

Thanks a lot in advance for your help.

Cheers,

Axel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions