Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

installing ngsxfem

More
5 years 2 months ago #1455 by noname
installing ngsxfem was created by noname
Hello there,

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

cmake ../ -DCMAKE_INSTALL_PREFIX=INSTLOCATION -DBUILD_NGSOLVE=ON

I keep getting

CMake Error: The source directory "/home" does not appear to contain CMakeLists.txt.

anyone has experienced this before?

Thanks...
More
5 years 2 months ago #1456 by schruste
Replied by schruste on topic installing ngsxfem
Hello noname,

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
Code:
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.

Best,
Christoph
More
5 years 2 months ago - 5 years 2 months ago #1457 by noname
Replied by noname on topic installing ngsxfem
Hello again, thanks for the fast reply. Followed your advice and advanced a bit, now when I do

make

I got

/usr/include/netgen/nginterface.h:315:5: error: ‘string’ does not name a type; did you mean ‘stdin’?
string name; // name of gridfunction
Last edit: 5 years 2 months ago by noname.
More
5 years 2 months ago #1459 by schruste
Replied by schruste on topic installing ngsxfem
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
Code:
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?

Best,
Christoph
More
5 years 2 months ago #1460 by noname
Replied by noname on topic installing ngsxfem
Hello,

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.
More
5 years 2 months ago #1461 by schruste
Replied by schruste on topic installing ngsxfem
Hi,

1. 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)?

2. 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.

3. 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.
Time to create page: 0.155 seconds