Skip to content

Xsection model: Improve error message when x-range is not covered from -inf to inf #102

@MattBrst

Description

@MattBrst

I created an Xsection model and made a mistake by not covering the x-domain from x=0 to x=20. The error message that I get is not very informative. I thought we had already some checks in place to check whether the whole x domain was covered? Or is that only present in the transient version?

Code to reproduce:

import numpy as np
import timflow.steady as tfs

ml = tfs.ModelXsection(naq=2)
tfs.XsectionMaq(
    ml,
    x1=-np.inf,
    x2=0,
    kaq=[1, 2],
    z=[4, 3, 2, 1, 0],
    c=[1000, 1000],
    npor=0.3,
    topboundary="semi",
    hstar=5,
)

tfs.XsectionMaq(
    ml,
    x1=20,
    x2=np.inf,
    kaq=[1, 2],
    z=[4, 3, 2, 1, 0],
    c=[1000, 1000],
    npor=0.3,
    topboundary="semi",
    hstar=4,
)
ml.solve()

Error message:
AttributeError: 'SimpleAquifer' object has no attribute 'eigvec'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions