Skip to content

Notebooks have hard-coded paths and some code does not work #2

@skalarproduktraum

Description

@skalarproduktraum

Big thanks for sharing the code! I have however encountered some issues:

  • some files contain hardcoded paths:
    • NavierStokesEquation_Inverse_Problem.ipynb
    • QHOEquation_Forward_Problem_m=21.ipynb

I would have fixed that, but it's unclear to me whether PSM_V1 or PSM_V2 is needed in those cases.

In QHOEquation_Forward_Problem_m=21.ipynb, I have tried to replace the hardcoded path with both PSM versions, however V2 does not work already at the import level, and with V1, the cell

# Sobolev Cubature
diffeo_2d = hyper_rect(*rect)
diffeo_1d_0 = hyper_rect(rect[0])
diffeo_1d_1 = hyper_rect(rect[1])

sob_2d = Sobolev(deg=50, dim=2, diffeo=diffeo_2d)
sob_1d_0 = Sobolev(deg=200, diffeo=diffeo_1d_0)
sob_1d_1 = Sobolev(deg=200, diffeo=diffeo_1d_1)

dx2, dy2 = torch.tensor(sob_2d.diff.diffs(np.array([[2,0],[0,2]])))

leads to the error

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[12], line 6
      3 diffeo_1d_0 = hyper_rect(rect[0])
      4 diffeo_1d_1 = hyper_rect(rect[1])
----> 6 sob_2d = Sobolev(deg=50, dim=2, diffeo=diffeo_2d)
      7 sob_1d_0 = Sobolev(deg=200, diffeo=diffeo_1d_0)
      8 sob_1d_1 = Sobolev(deg=200, diffeo=diffeo_1d_1)

TypeError: __init__() got an unexpected keyword argument 'dim'

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