I have been using Ngsolve for a while now and I have decided to install xfem extension to it. I am following the steps explained under downloads but when I do
It seems that you call that command in your home directory while the sources are not in /home but somewhere else.
In the installation instructions it says that you should do
git clone https://github.com/ngsxfem/ngsxfem.git
cd ngsxfem
mkdir build
cd build
before executing the cmake-command. Note that you are in a build directory then and …/ refers to the source of ngsxfem so that cmake can find the CMakeLists.txt file.
Please check where you downloaded ngsxfem and make sure that you refer to the correct source directory. Then try again.
You are using BUILD_NGSOLVE=ON, right? That means that NGSolve and netgen etc. are also installed. For that you need to make sure that you do a
git submodule update --init
Did you do that?
It is also advisable to uninstall NGSolve beforehand (or make invisible for CMake) so that the NGSolve versions (one that you have installed through binaries as it seems and one that ngsxfem tries to install himself) don’t mix up.
If you still have problems can you post a chain of commands that you applied so that I can try to understand what is going on on your machine?
I am quite new to this so if the answers to my questions are obvious, excuse me.
Since I already have Ngsolve installed , I run
( after cloning the xfem library, but I am not sure where to clone this, it can be anywhere? it needs to be where NGsolve is?? )
cmake …/ -DCMAKE_INSTALL_PREFIX=INSTLOCATION -DBUILD_NGSOLVE=OFF
make
make install
but after running the “cmake …/ -DCMAKE_INSTALL_PREFIX=INSTLOCATION -DBUILD_NGSOLVE=OFF” I run “make”, and that is where I get the error
/usr/include/netgen/nginterface.h:315:5: error: ‘string’ does not name a type; did you mean ‘stdin’?
string name; // name of gridfunction
My suspicion is that I am setting the INSTLOCATION wrong, it needs to be where NGsolve is installed and I searched for it in my computer but not sure if I found the right place.
It depends on the versions of ngsxfem that you check out and the version of NGSolve that you have installed if they are compatible at all. The save way to do it, is to update the submodules (see post before) use -DBUILD_NGSOLVE=ON in the cmake-options and deinstall ngsolve beforehand. Then the submodule of a compatible NGSolve-version is taken. The price you pay is that it will probably take quite long to compile through everything. What is your NGSolve version? What is your ngsxfem version (date)?
Where you put the sources of ngsxfem to is up to you. The location where it is installed to is set by the INSTLOCATION which you can decide on, but you have to make sure that the environment variables are set so that the installed files can be found by your OS.
If the INSTLOCATION is set wrongly this is only to be noticed after the installation. The installation should go through also with a wrong INSTLOCATION.
cmake …/ -DCMAKE_INSTALL_PREFIX=INSTLOCATION -DBUILD_NGSOLVE=ON
after running a while I got the following error message now,
Could not find a package configuration file provided by “NGSolve” with any
of the following names:
NGSolveConfig.cmake
ngsolve-config.cmake
Add the installation prefix of “NGSolve” to CMAKE_PREFIX_PATH or set
“NGSolve_DIR” to a directory containing one of the above files. If
“NGSolve” provides a separate development package or SDK, be sure it has
been installed.
– Configuring incomplete, errors occurred!
See also “/home/~/Desktop/ngsxfem/build/CMakeFiles/CMakeOutput.log”.
If you know what this is, it would be superb, thanks in advance…
I am following your exact commands in the exact order, I even added “-DCMAKE_PREFIX_PATH=INSTLOCATION” to the cmake command as you suggested but the same error continues…
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.6.7”, minimum required is “3”)
– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found suitable version “3.6.7”, minimum required is “3”)
To solve the above problem in the related file I have changed the tcl.h to tcl/tcl.h, turns out that Ubuntu places tcl.h in /usr/include/tcl/ not in usr/include.
Please install them beforehand. Also: Can you please post the full list of commands and subsequent output in your installation (note that you can also attach text files here).
To wrap up this, at the end although I installed all the prerequisites and uninstalled my
existing ngsolve and followed your instructions in correct order to install ngsolve and ngsxfem together I could not sucsess. It gave me bunch of weird error messages starting from the
Could not find a package configuration file provided by “NGSolve” with any
of the following names:
NGSolveConfig.cmake
ngsolve-config.cmake
Add the installation prefix of “NGSolve” to CMAKE_PREFIX_PATH or set
“NGSolve_DIR” to a directory containing one of the above files. If
“NGSolve” provides a separate development package or SDK, be sure it has
been installed.
message. I solved them one by one and finished the install at the end but ngsolve was not running, seems like there was something wrong with the paths.
I am using Ubuntu 18.04.
At the end I seperately installed ngsolve 6.2.1901 and get acsess to developer version of ngsxfem and installed that, that worked.