The release branch is only compatible with the April-NGsolve as you realised. The release branch is only synchronised every now and then. However, the master branch should be working with a recent ngsolve. Please try it out. A new release which is compatible with a recent NGSolve is on the ToDo list.
so now I have cloned the master branch, the error when making changed somehow…
In file included from /usr/share/ngsxfem/python/…/utils/python_utils.cpp:9,
from /usr/share/ngsxfem/python/python_ngsxfem.cpp:5:
/usr/share/ngsxfem/python/…/utils/…/utils/restrictedblf.hpp:29:25: error: conflicting return type specified for ‘virtual ngla::MatrixGraph ngcomp::RestrictedBilinearForm::GetGraph(int, bool)’
29 | virtual MatrixGraph GetGraph (int level, bool symmetric);
| ^~~~~~~~
In file included from /usr/include/netgen/comp.hpp:57,
from /usr/include/netgen/solve.hpp:19,
from /usr/share/ngsxfem/python/…/cutint/python_cutint.cpp:4,
from /usr/share/ngsxfem/python/python_ngsxfem.cpp:4:
/usr/include/netgen/bilinearform.hpp:202:27: note: overridden function is ‘virtual ngla::MatrixGraph* ngcomp::BilinearForm::GetGraph(int, bool)’
202 | virtual MatrixGraph * GetGraph (int level, bool symmetric);
| ^~~~~~~~
The default branch is ‘release’ rather than ‘master’
ngsxfem was updated to work with the then current master branch of ngsolve on the 7th August. I’m guessing that the difference in ngsolve was introduced between the 7th and the release of ngsolve v6.2.2007.
You can therefore go back a commit on the xfem master branch to 8fe562bfef4fb3478648dda9d1167247e511b329 which compiles with ngsolve v6.2.2007 or go to the latest master branches on both ngsolve and xfem which are also compatible.
I am having issues installing xfem. I had ngsolve previously installed so to add the xfem module I simply did:
pip3 install xfem
in terminal. It says xfem version 2.0.2204 is successfully installed. When I try “import xfem” in a jupyter notebook, I receive the following error:ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/xfem/ngsxfem_py.so, 2): Symbol not found: __ZNK6ngcomp14S_BilinearFormINSt3__17complexIdEEE17LapackEigenSystemERN5ngbla10FlatMatrixIS3_LNS5_8ORDERINGE1EEERN6ngcore9LocalHeapE
Referenced from: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/xfem/ngsxfem_py.so
Expected in: /Applications/Netgen.app/Contents/MacOS/libngcomp.dylib
in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/xfem/ngsxfem_py.so
Any suggestions on how to fix this? I’ve been stuck for days trying to get xfem to work.
I don’t know why that error persists. The latest dev builds on pypi are built with ngsolve 6.2.2301 from pypi, so they should be compatible. Maybe try and remove ngsolve/netgen and xfem and try a fresh installation of everything. Otherwise, the fastest way to get xfem working would be to build it from source.
one more suggestion: Remove your current xfem, ngsolve, netgen installations, install the ngsolve version compatible with the last stable release of xfem (pip install ngsolve==6.2.2204) and then install xfem (pip install xfem).
I’m getting a new laptop setup with all of the required packages and now when I try “pip install ngsolve==6.2.2204” in terminal I get an error message that states:
ERROR: Could not find a version that satisfies the requirement ngsolve==6.2.2204 (from versions: none)ERROR: No matching distribution found for ngsolve==6.2.2204
What could be the reason for this? I’m afraid of installing a newer ngsolve version in case there’s compatibility issues with xfem (which I am yet to install on this new machine). I appreciate your help!