Why does FEM meshing doesn't generate volume elements in some cases

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Posts: 8329
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby bernd » Wed May 04, 2016 8:20 am

vejmarie wrote:... So you can comment as a temporary fix into FindOpenCasCade.cmake the line 26 # find_package(OCE QUIET ...
It worked :D

Now I'm facing medfile library problem again. But now it's time for dailly work ...
vejmarie
Posts: 551
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby vejmarie » Wed May 04, 2016 8:51 am

Hi Bernd

Enjoy your day, I have a long week-end in front of me coming up so, I might be able to provide plenty of support if needed even if I am currently chasing an allocation issue into Calculix ;). What is the error that you got with MEDfile library ? There is a new dependency that you might be needing which is hdf5

vejmarie
User avatar
bernd
Posts: 8329
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby bernd » Wed May 04, 2016 3:20 pm

I have medfile library installed. The package is named https://packages.debian.org/jessie/libmed-dev AFAIK
Cmake find_package(HDF5) finds them (I had the problem before during compilation of GMSH, http://onelab.info/pipermail/gmsh/2016/010480.html)

but how do I tell this cmake in file src/3rdParty/salomesmesh/CMakeLists.txt ?!

I'm not an C++ guy. Cmake is driving my crazy.
User avatar
bernd
Posts: 8329
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby bernd » Wed May 04, 2016 3:29 pm

What I did:

$ locate hdf5.h
/usr/include/hdf5/serial/hdf5.h
...

in src/3rdParty/salomesmesh/CMakeLists.txt
# find_package(MEDFile REQUIRED)


ok add it to cmake by
cmake -DCMAKE_PREFIX_PATH=/usr/include/hdf5/serial ../


in src/3rdParty/salomesmesh/CMakeLists.txt
# find_package(MEDFile REQUIRED)

but make dos not find my hdf5.h

Code: Select all

/home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/src/3rdParty/salomesmesh/inc/MED_Common.hxx:32:18: fatal error: hdf5.h: Datei oder Verzeichnis nicht gefunden
 #include <hdf5.h>
                  ^
compilation terminated.
mhh damn ...
User avatar
bernd
Posts: 8329
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby bernd » Wed May 04, 2016 4:10 pm

found a hack to get around this.

I added the directory the my hdf5.h is located to the include dirs in src/3rdParty/salomesmesh/CMakeLists.txt

Code: Select all

include_directories(
    /usr/include/hdf5/serial
    src/SMDS
    src/Driver


but new problems during compilation of FreeCAD occt7 salomone 7...

Code: Select all

...
[  3%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/src/SMESH/SMESH_Octree.cpp.o
In file included from /home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/src/3rdParty/salomesmesh/src/SMESH/SMESH_Octree.cpp:29:0:
/home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/src/3rdParty/salomesmesh/inc/SMESH_Octree.hxx:33:26: fatal error: SMESH_Tree.hxx: Datei oder Verzeichnis nicht gefunden
 #include "SMESH_Tree.hxx"
                          ^
compilation terminated.
src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/build.make:169: recipe for target 'src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/src/SMESH/SMESH_Octree.cpp.o' failed
make[2]: *** [src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/src/SMESH/SMESH_Octree.cpp.o] Error 1
CMakeFiles/Makefile2:500: recipe for target 'src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/all' failed
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

SMESH_Tree.hxx is a source file of salomone which is not in the repo?
User avatar
bernd
Posts: 8329
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby bernd » Wed May 04, 2016 4:17 pm

found it ...
in src/3rdParty/salomesmesh/inc/SMESH_tree.hxx copied it to SMESH_Tree.hxx ...

@vejmarie: AFAIK OSX is case sensitiv too. I wonder way it compiled for you?
User avatar
bernd
Posts: 8329
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby bernd » Wed May 04, 2016 4:28 pm

compiling 3rdParty/salomonmesh finished :D but still 93 % off FreeCAD to do, will see ...
User avatar
bernd
Posts: 8329
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby bernd » Wed May 04, 2016 6:39 pm

error at Part

Code: Select all

...
[ 43%] Building CXX object src/Mod/Part/App/CMakeFiles/Part.dir/CrossSection.cpp.o
[ 43%] Building CXX object src/Mod/Part/App/CMakeFiles/Part.dir/Geometry.cpp.o
/home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/src/Mod/Part/App/Geometry.cpp: In member function ‘bool Part::GeomCurve::closestParameterToBasicCurve(const Vector3d&, double&) const’:
/home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/src/Mod/Part/App/Geometry.cpp:395:76: warning: ‘static opencascade::handle<T> opencascade::handle<T>::DownCast(const opencascade::handle<T2>&, typename std::enable_if<(! opencascade::is_base_but_not_same<T2, T>::value), void*>::type) [with T2 = Geom_Curve; T = Geom_Curve; typename std::enable_if<(! opencascade::is_base_but_not_same<T2, T>::value), void*>::type = void*]’ is deprecated (declared at /usr/local/include/opencascade/Standard_Handle.hxx:203): down-casting from object of the same or unrelated type is meaningless [-Wdeprecated-declarations]
         Handle_Geom_Curve bc = Handle_Geom_Curve::DownCast(tc->BasisCurve());
                                                                            ^
[ 43%] Building CXX object src/Mod/Part/App/CMakeFiles/Part.dir/ImportIges.cpp.o
/home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/src/Mod/Part/App/ImportIges.cpp: In function ‘int Part::ImportIgesParts(App::Document*, const char*)’:
/home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/src/Mod/Part/App/ImportIges.cpp:96:23: error: ‘class XSControl_WorkSession’ has no member named ‘MapReader’
         aReader.WS()->MapReader()->SetProgress(pi);
                       ^
src/Mod/Part/App/CMakeFiles/Part.dir/build.make:2250: recipe for target 'src/Mod/Part/App/CMakeFiles/Part.dir/ImportIges.cpp.o' failed
make[2]: *** [src/Mod/Part/App/CMakeFiles/Part.dir/ImportIges.cpp.o] Error 1
CMakeFiles/Makefile2:1599: recipe for target 'src/Mod/Part/App/CMakeFiles/Part.dir/all' failed
make[1]: *** [src/Mod/Part/App/CMakeFiles/Part.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
$ 
vejmarie
Posts: 551
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby vejmarie » Wed May 04, 2016 7:59 pm

Hi Bernd,

The class is declared into this file

ls -lt /usr/local/include/opencascade/XSControl_WorkSession.hxx
-rw-r--r-- 1 root wheel 9904 4 avr 16:58 /usr/local/include/opencascade/XSControl_WorkSession.hxx
sh-3.2# vi /usr/local/include/opencascade/XSControl_WorkSession.hxx

Can you check the size of your XSControl_WorkSession.hxx and if you have another one installed on your system ? I got the MapReader call implemented into this file ... But I am using OCCT 7 from the OpenCascade Website (so I registered myself)

vejmarie
vejmarie
Posts: 551
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby vejmarie » Wed May 04, 2016 8:06 pm

bernd wrote:found it ...
in src/3rdParty/salomesmesh/inc/SMESH_tree.hxx copied it to SMESH_Tree.hxx ...

@vejmarie: AFAIK OSX is case sensitiv too. I wonder way it compiled for you?
I don't know, I am checking and I agree MacOS is case sensitive so I should have had an error there. Anyway I applied your fix which seems relevant and will push it later on tonight ;)