NGSolve / ngsPETSc

ngsPETSc Docs
https://ngspetsc.readthedocs.io/en/latest/
MIT License
3 stars 6 forks source link

[JOSS REVIEW] first example fails #56

Open thelfer opened 2 weeks ago

thelfer commented 2 weeks ago

The following example, taken from https://ngspetsc.readthedocs.io/en/latest/PETScKSP/poisson.py.html, fails as follows:

$ python3 poisson.py 
optfile ./ng.opt does not exist - using default values
togl-version : 2
loading ngsolve library
NGSolve-6.2.2405-28-g63cfc18ca
Using Lapack
Including sparse direct solver UMFPACK
Running parallel using 32 thread(s)
Traceback (most recent call last):
  File "/home/th202608/codes/ngsPETSc/tests/Poisson/poisson.py", line 7, in <module>
    ngmesh = unit_square.GenerateMesh(maxh=0.1)
NameError: name 'unit_square' is not defined
UZerbinati commented 1 week ago

This example is running for me on a fresh install and on the docker image. Could it be that something went wrong with your ngsolve install?

thelfer commented 1 week ago

I just followed your tutorial steps by steps. ngsolve did get installed, so I expect that there is a dependency missing.

UZerbinati commented 1 week ago

Did you install it with -DUSE_OCC=OFF instead of the default -DUSE_OCC=ON ?

thelfer commented 1 week ago

must check

UZerbinati commented 1 week ago

Because unit_square has lately become an OCC object in ngsolve hence, if you install without OCC support it might not be there. You should be able to test the code even without OCC if you use from netgen.geom2d import unit_square.

thelfer commented 1 week ago

Indeed. I remember that I removed it because OCC was not listed as a dependency to ngsolve

thelfer commented 1 week ago

I think that you have two choices :)

UZerbinati commented 1 week ago

We have included include OCC as a mandatory dependency (we will also change the pyproject.toml in next PR).