Unable to (re)mesh

Discussion about building and installing Elmer
Matrixrifle
Posts: 20
Joined: 27 Mar 2023, 13:58
Antispam: Yes

Unable to (re)mesh

Post by Matrixrifle »

Hi,
I am a newbie and i am trying the elmer GUI tutorials. I am on ubuntu 22.04 and i have compiled Elmer from source. I have followed the instruction in the https://github.com/ElmerCSC/elmerfem/bl ... /Ubuntu.md and the viewtopic.php?p=28018&sid=b47b18a06751f ... 2a6fe603e .

My compile was:

Code: Select all

git clone https://github.com/ElmerCSC/elmerfem.git elmer \
        && mkdir elmer/builddir \
	&& cd elmer/builddir \
	&& cmake /home/elmer \
		-DCMAKE_INSTALL_PREFIX=/usr/local/Elmer-devel \
		-DCMAKE_C_COMPILER=/usr/bin/gcc \
		-DCMAKE_Fortran_COMPILER=/usr/bin/gfortran \
		-DWITH_MPI:BOOL=TRUE -DWITH_Mumps:BOOL=TRUE \
		-DWITH_Hypre:BOOL=TRUE -DHypre_INCLUDE_DIR=/usr/include/hypre \
		-DHypre_INCLUDE_DIR=/usr/include/hypre \
		-DWITH_Trilinos:BOOL=FALSE \
		-DWITH_ELMERGUI:BOOL=TRUE -DWITH_OCC:BOOL=FALSE \
		-DWITH_VTK:BOOL=FALSE \
		-DWITH_ElmerIce:BOOL=FALSE \
                -DWITH_LUA:BOOL=TRUE -DWITH_MATC:BOOL=TRUE \
                -DWITH_QT5:BOOL=TRUE -DQWT_LIBRARY=/usr/lib/libqwt-qt5.so.6 \
	&& make \
	&& make install \
	&& rm -R /home/elmer

# Set the path
PATH=$PATH:/usr/local/Elmer-devel/bin
PATH=$PATH:/usr/local/Elmer-devel/share/elmersolver/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Elmer-devel/lib
I can confirm that ngcore.a does exist in the following folder.
/usr/local/Elmer-devel/lib/ElmerGUI/ngcore/libng.a

When i try the first example (TemperatureGeneric) ElmerGUI gives the following error.

Unable to (re)mesh: no input data or mesh generator (please make sure that your input file suffix is in lower case)

Where did I go wrong. Please help.
Rich_B
Posts: 423
Joined: 24 Aug 2009, 20:18

Re: Unable to (re)mesh

Post by Rich_B »

Hello,

After running cmake and building elmer, what is the result when you run ctest?

Also, when starting ElmerGUI from a terminal, and trying to load the tutorial, what is the output to the console?

Rich.
Matrixrifle
Posts: 20
Joined: 27 Mar 2023, 13:58
Antispam: Yes

Re: Unable to (re)mesh

Post by Matrixrifle »

I didnt run ctest after compile and i have deleted the build folder. I can re-build if you think there is some missing settings.

Also the example folder already has all the modifications done to the boundaries and the elmergrid files already generated so if i use those then there is no issue in running it. But following the http://www.nic.funet.fi/pub/sci/physics ... orials.pdf it says we have to re-mesh the geometry and when i tried following the steps it gave a meshing error.

My question is do i need to build additional modules like tetgen or libng to be able to re-mesh from inside ElmerGui and if so how to do that. The link on ubuntu compilation of elmer does not mention anything on additional builds and what settings to use.

The output of ElmerGui at console is as follows:

Code: Select all

$ ElmerGUI
$ Load /usr/local/Elmer-devel/bin/../share/ElmerGUI/edf/egini.xml... done
Load tetgen plugin... not found
Tetgen functionality unavailable
Constructing ElmergridAPI... done
QObject::connect: No such signal MeshingThread::terminated()
Load /usr/local/Elmer-devel/bin/../share/ElmerGUI/edf/edf.xml... done
Load /usr/local/Elmer-devel/bin/../share/ElmerGUI/edf/electrostatics.xml... done
Load /usr/local/Elmer-devel/bin/../share/ElmerGUI/edf/helmholtz.xml... done
Load /usr/local/Elmer-devel/bin/../share/ElmerGUI/edf/heatequation.xml... done
Load /usr/local/Elmer-devel/bin/../share/ElmerGUI/edf/navier-stokes.xml... done
Load /usr/local/Elmer-devel/bin/../share/ElmerGUI/edf/resultoutput.xml... done
Load /usr/local/Elmer-devel/bin/../share/ElmerGUI/edf/linearelasticity.xml... done
Load /usr/local/Elmer-devel/bin/../share/ElmerGUI/edf/meshdeform.xml... done
QObject::connect: No such signal MeshingThread::terminated()
Initialize GL
Vendor: NVIDIA Corporation
Renderer: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2

Unable to open file: file type unknown
Unable to (re)mesh: no input data or mesh generator (please make sure that your input file suffix is in lower case)
Unable to (re)mesh: no input data or mesh generator (please make sure that your input file suffix is in lower case)
[/code]
Rich_B
Posts: 423
Joined: 24 Aug 2009, 20:18

Re: Unable to (re)mesh

Post by Rich_B »

Hello,

Running ctest is a nice way to be sure that Elmersolver was built properly, but won't test ElmerGUI.

No need to add tetgen or other modules. ElmerGrid and Netgen are included by default.

The following line in the console output is not a good thing:
QObject::connect: No such signal MeshingThread::terminated()
There is something missing from the build, not sure what. Try building again, and look for any messages about Qt or Qwt.

Rich.
Matrixrifle
Posts: 20
Joined: 27 Mar 2023, 13:58
Antispam: Yes

Re: Unable to (re)mesh

Post by Matrixrifle »

Hi,
I got the following errors when i run ctest -L quick. The remaining tests pass successfully.

Code: Select all

The following tests FAILED:
	  7 - AdvReactDB_np6 (Failed)
	  9 - AdvReactDBmap_np6 (Failed)
	 12 - AdvReactDG_np6 (Failed)
	 16 - AngleMetisLayer_np2 (Failed)
	 17 - AngleMetisLayer_np3 (Failed)
	 18 - AngleMetisLayer_np4 (Failed)
	 50 - CapacitanceMatrix3_np3 (Failed)
	 56 - CoilSolver1_np2 (Failed)
	 57 - CoilSolver1_np4 (Failed)
	 64 - CoilSolverLoop_np2 (Failed)
	 65 - CoilSolverLoop_np4 (Failed)
	 71 - ComponentResistance_np4 (Failed)
	247 - FixTangentVelo (Failed)
	262 - HeatControlExplicit_np3 (Failed)
	393 - OtherMeshResults_np4 (Failed)
	403 - ParallelSlices_np2 (Failed)
	438 - PoissonDG_np3 (Failed)
	439 - PoissonDG_np8 (Failed)
	485 - SD_CapacitanceMatrix3_np3 (Failed)
	892 - pointload_np4 (Failed)
	897 - poisson_transient_conforming_anti_np4 (Failed)
	898 - poisson_transient_conforming_anti_np8 (Failed)
The messages on Qt or Qwt i get on compile time is a bunch of deprecated warning messages.

Code: Select all

/home/elmer/ElmerGUI/Application/src/glwidget.cpp: In member function 'virtual void GLWidget::wheelEvent(QWheelEvent*)':
/home/elmer/ElmerGUI/Application/src/glwidget.cpp:700:39: warning: 'int QWheelEvent::delta() const' is deprecated: Use angleDelta() [-Wdeprecated-declarations]
  700 |   double s = exp((double)(event->delta())*0.001);
      |                           ~~~~~~~~~~~~^~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextlayout.h:49,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/qabstracttextdocumentlayout.h:45,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/QtGui:5,
                 from /home/elmer/ElmerGUI/Application/src/glwidget.cpp:41:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qevent.h:219:16: note: declared here
  219 |     inline int delta() const  { return qt4D; }
      |                ^~~~~
/home/elmer/ElmerGUI/Application/src/glwidget.cpp:707:23: warning: 'QPoint QWheelEvent::pos() const' is deprecated: Use position() [-Wdeprecated-declarations]
  707 |   lastPos = event->pos();
      |             ~~~~~~~~~~^~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtextlayout.h:49,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/qabstracttextdocumentlayout.h:45,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/QtGui:5,
                 from /home/elmer/ElmerGUI/Application/src/glwidget.cpp:41:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qevent.h:225:19: note: declared here
  225 |     inline QPoint pos() const { return p.toPoint(); }
      |                   ^~~


Both Qwt and Qt libraries are found by cmake.

Code: Select all

-- ------------------------------------------------
 -- Qt5 non-Windows packaging
 --   [ElmerGUI] Qt5:               1
 --   [ElmerGUI] Qt5 Libraries: Qt5::OpenGL Qt5::Xml Qt5::Script Qt5::Gui Qt5::Core
 -- ------------------------------------------------
 --   [ElmerGUI] Qwt:             TRUE
 --   [ElmerGUI] QWT_LIBRARY:     /usr/lib/libqwt-qt5.so.6
 --   [ElmerGUI] QWT_INCLUDE_DIR: /usr/include/qwt
 -- ------------------------------------------------
 --   [ElmerGUI] Compiling in matc
 -- ------------------------------------------------
 CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:44 (message):
   qt5_use_modules is not part of the official API, and might be removed in Qt
   6.
 Call Stack (most recent call first):
   /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:431 (_qt5_warn_deprecated)
   ElmerGUI/Application/CMakeLists.txt:223 (QT5_USE_MODULES)
 This warning is for project developers.  Use -Wno-dev to suppress it.
kevinarden
Posts: 2317
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Unable to (re)mesh

Post by kevinarden »

Is there a reason you are compiling yourself and not using the PPA?
Rich_B
Posts: 423
Joined: 24 Aug 2009, 20:18

Re: Unable to (re)mesh

Post by Rich_B »

Hello,

As a check, using the 01 Sept 2023 windows Elmer installer, I ran the TemperatureGeneric tutorial. It remeshed properly, and the tutorial ran as expected.

Rich.
Matrixrifle
Posts: 20
Joined: 27 Mar 2023, 13:58
Antispam: Yes

Re: Unable to (re)mesh

Post by Matrixrifle »

Hi,
I thought the recommendation was to compile from source according to this post. So i thought no harm in compiling and ensure all the optional libraries are included like Hypre, Mumps etc. I was not sure which packages are included in the PPA. Anyways sorry to bother the developers I will try with the PPA.
Matrixrifle
Posts: 20
Joined: 27 Mar 2023, 13:58
Antispam: Yes

Re: Unable to (re)mesh

Post by Matrixrifle »

I ran the following commands in a ubuntu 22.04 virtual box to check if PPA made a difference before I install it in my system. I installed the PPA using the following commands (I am installing both elmer and freecad):

Code: Select all

sudo add-apt-repository ppa:elmer-csc-ubuntu/elmer-csc-ppa 
sudo add-apt-repository ppa:freecad-maintainers/freecad-daily 
sudo apt-get -y update 
sudo apt-get -y install elmerfem-csc-eg freecad-daily
After installing the above without any errors i could see, i downloaded the GUI files. Running the ElmerGUI from the command line i see the same messages about unable to (re)mesh.

Code: Select all

test@test-Standard-PC:~/Downloads$ ElmerGUI 
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Load /usr/bin/../share/ElmerGUI/edf/egini.xml... done
Load tetgen plugin... not found
Tetgen functionality unavailable
Constructing ElmergridAPI... done
QObject::connect: No such signal MeshingThread::terminated()
Load /usr/bin/../share/ElmerGUI/edf/edf.xml... done
Load /usr/bin/../share/ElmerGUI/edf/linearelasticity.xml... done
Load /usr/bin/../share/ElmerGUI/edf/helmholtz.xml... done
Load /usr/bin/../share/ElmerGUI/edf/electrostatics.xml... done
Load /usr/bin/../share/ElmerGUI/edf/heatequation.xml... done
Load /usr/bin/../share/ElmerGUI/edf/navier-stokes.xml... done
Load /usr/bin/../share/ElmerGUI/edf/resultoutput.xml... done
Load /usr/bin/../share/ElmerGUI/edf/meshdeform.xml... done
QObject::connect: No such signal MeshingThread::terminated()
Initialize GL
Vendor: Mesa
Renderer: llvmpipe (LLVM 15.0.7, 256 bits)
Version: 4.5 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1
Project directory: /home/test/Downloads/tutorials-GUI-files/TemperatureGeneric
Clearing model data
Load /usr/bin/../share/ElmerGUI/edf/edf.xml... done
Load /usr/bin/../share/ElmerGUI/edf/linearelasticity.xml... done
Load /usr/bin/../share/ElmerGUI/edf/helmholtz.xml... done
Load /usr/bin/../share/ElmerGUI/edf/electrostatics.xml... done
Load /usr/bin/../share/ElmerGUI/edf/heatequation.xml... done
Load /usr/bin/../share/ElmerGUI/edf/navier-stokes.xml... done
Load /usr/bin/../share/ElmerGUI/edf/resultoutput.xml... done
Load /usr/bin/../share/ElmerGUI/edf/meshdeform.xml... done
Loading project document...
Load /usr/bin/../share/ElmerGUI/edf-extra/k-epsilon.xml... done
Loading mesh files...
Loading elmer mesh files
Summary:
Nodes: 16159
Point elements: 0
Edge elements: 0
Surface elements: 19860
Volume elements: 65689
Found 29790 edges on boundary
Bcs/materials on surface elements: 114
Bcs/materials on edge elements: 0
Bcs/materials on point elements: 0
Generating  lists to display
Generated 230 lists
Ready
Bcs/materials on surface elements: 114
Bcs/materials on edge elements: 0
Bcs/materials on point elements: 0
Generating  lists to display
Generated 230 lists
Reset model view
Loading geometry input file
Geometry input file: /home/test/Downloads/tutorials-GUI-files/TemperatureGeneric/pump_carter_sup.stp
Unable to open file: file type unknown
Loading operations...
Loading general setup...
Loading parallel settings...
Loading mesh parameters...
Loading solver parameters...
Loading dynamic editor contents...
Error: Unable to set menu entry: key: /Linear elasticity/Material/Material pricipal directions/0
Error: Unable to set menu entry: key: /Mesh Update/Material/Poisson ratio/0
Loading solver specific options...
Loading body properties...
Loading boundary properties...
 failed to open case.sif
Ready
Bcs/materials on surface elements: 114
Bcs/materials on edge elements: 0
Bcs/materials on point elements: 0
Generating  lists to display
Generated 230 lists
Unable to (re)mesh: no input data or mesh generator (please make sure that your input file suffix is in lower case)

Last edited by Matrixrifle on 02 Sep 2023, 22:42, edited 1 time in total.
kevinarden
Posts: 2317
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Unable to (re)mesh

Post by kevinarden »

That was prior to the PPA being updated for 22.04 the PPA should have everything
Post Reply