compile with netgen for FEM meshing

Having trouble installing or compiling FreeCAD? Get help here.
reox
Posts: 595
Joined: Sat Aug 13, 2016 10:06 am

Re: compile with netgen for FEM meshing

Postby reox » Sun Jul 14, 2019 1:50 pm

Still not giving up :D
tried with netgen 6.2.1810 and internal smesh. But this leads to segfaults:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x37840) [0x7f9a0748c840]
#1  0x7f99ab6e185e in NETGENPlugin_Mesher::FillSMesh(netgen::OCCGeometry const&, netgen::Mesh&, NETGENPlugin_ngMeshInfo const&, SMESH_Mesh&, std::vector<SMDS_MeshNode const*, std::allocator<SMDS_MeshNode const*> >&, SMESH_Comment&, SMESH_MesherHelper*) from /usr/lib/freecad-daily/lib/libNETGENPlugin.so+0x8ee
#2  0x7f99ab6efba2 in NETGENPlugin_Mesher::Compute() from /usr/lib/freecad-daily/lib/libNETGENPlugin.so+0x1082
#3  0x7f99ab31aaa2 in Fem::FemMeshShapeNetgenObject::execute() from /usr/lib/freecad-daily/lib/Fem.so+0x172
#4  0x7f9a0ab2af33 in App::DocumentObject::recompute() from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0xb3
#5  0x7f9a0aae7ee8 in App::Document::_recomputeFeature(App::DocumentObject*) from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0x58
#6  0x7f9a0aaef368 in App::Document::recompute() from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0x198
#7  0x7f9a0ab52ea2 in App::DocumentPy::recompute(_object*) from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0x42
#8  0x7f9a0ab54e77 in App::DocumentPy::staticCallback_recompute(_object*, _object*) from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0x37
#9  /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0(_PyMethodDef_RawFastCallKeywords+0x2f9) [0x7f9a0a560cc9]
#10  /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0(_PyCFunction_FastCallKeywords+0x25) [0x7f9a0a561a05]
#11  /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x7e90) [0x7f9a0a362cb0]
#12  /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0x996) [0x7f9a0a48a1e6]
#13  /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0(PyEval_EvalCodeEx+0x3e) [0x7f9a0a48a46e]
#14  /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0(PyEval_EvalCode+0x1b) [0x7f9a0a48b23b]
#15  /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0(PyRun_StringFlags+0x8b) [0x7f9a0a458feb]
#16  0x7f9a0a8b7404 in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /usr/lib/freecad-daily/lib/libFreeCADBase.so+0x64
#17  0x7f9a0b14c243 in Gui::Command::doCommand(Gui::Command::DoCmd_Type, char const*, ...) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x133
#18  0x7f9a0b1505f4 in Gui::Command::invoke(int) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x54
#19  0x7f9a07e35906 in QMetaObject::activate(QObject*, int, int, void**) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x766
#20  0x7f9a08782f02 in QAction::triggered(bool) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x42
#21  0x7f9a08785510 in QAction::activate(QAction::ActionEvent) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xf0
#22  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x246bbd) [0x7f9a08870bbd]
#23  0x7f9a08870df5 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xe5
#24  0x7f9a0895a8ea in QToolButton::mouseReleaseEvent(QMouseEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xa
#25  0x7f9a087c7588 in QWidget::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1d8
#26  0x7f9a0895a993 in QToolButton::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x33
#27  0x7f9a087894b1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x81
#28  0x7f9a08790b98 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x458
#29  0x7f9a0b122888 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x88
#30  0x7f9a07e0c5a9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x179
#31  0x7f9a0878fec9 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1a9
#32  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1b8014) [0x7f9a087e2014]
#33  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1bab9e) [0x7f9a087e4b9e]
#34  0x7f9a087894b1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x81
#35  0x7f9a08790950 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x210
#36  0x7f9a0b122888 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x88
#37  0x7f9a07e0c5a9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x179
#38  0x7f9a081b9fe3 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0x703
#39  0x7f9a081bbe25 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0x135
#40  0x7f9a0819606b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0xab
#41  /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5(+0xdd3eb) [0x7f9a023503eb]
#42  0x7f9a07e0b27b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x13b
#43  0x7f9a07e13262 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x92
#44  0x7f9a0b0be9ed in Gui::Application::runApplication() from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x150d
#45  freecad-daily(main+0x670) [0x55dab156c770]
#46  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f9a0747909b]
#47  freecad-daily(_start+0x2a) [0x55dab156cafa]


User avatar
sgrogan
Posts: 5207
Joined: Wed Oct 22, 2014 5:02 pm

Re: compile with netgen for FEM meshing

Postby sgrogan » Wed Jul 24, 2019 9:20 pm

reox wrote:
Sun Jul 14, 2019 1:50 pm
Still not giving up :D
Maybe this is a hint?
https://forum.freecadweb.org/viewtopic. ... 18#p322606
looo
Posts: 2664
Joined: Mon Nov 11, 2013 5:29 pm

Re: compile with netgen for FEM meshing

Postby looo » Thu Jul 25, 2019 7:01 am

sgrogan wrote:
Wed Jul 24, 2019 9:20 pm
reox wrote:
Sun Jul 14, 2019 1:50 pm
Still not giving up :D
Maybe this is a hint?
https://forum.freecadweb.org/viewtopic. ... 18#p322606
In theory compiling with netgen doesn't need pybind11. But I have never tested it.
vejmarie
Posts: 541
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: compile with netgen for FEM meshing

Postby vejmarie » Sat Jul 27, 2019 7:19 pm

Just to be sure, your issue appears after you have computed properly the initial volumic mesh of a shape ? I had to stop working on FreeCAD for a year, and before doing so, updated SMESH to Salome version 7.3 (which is old now), but some patches where needed to work properly with FeM module as node ordering where not properly setup, and there was also a couple of "compiler" related issues. I am currently focused on getting S3 export/import working. I hope to have done that work in about 2 weeks and will have a look to my backlog of issues.
reox
Posts: 595
Joined: Sat Aug 13, 2016 10:06 am

Re: compile with netgen for FEM meshing

Postby reox » Tue Jul 30, 2019 4:55 pm

sgrogan wrote:
Wed Jul 24, 2019 9:20 pm
reox wrote:
Sun Jul 14, 2019 1:50 pm
Still not giving up :D
Maybe this is a hint?
https://forum.freecadweb.org/viewtopic. ... 18#p322606
yes I did that. That changed nothing...
vejmarie wrote:
Sat Jul 27, 2019 7:19 pm
node ordering where not properly setup,
judging from the output, this is what is happening. The weird shapes look like the nodes are wrongly connected to the elements.
But, in theory, should the number of nodes and elements not match the correct shape? This is not the case IMO.