|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 36
Rep Power: 5 ![]() |
Hi Foamers!
I've been developing a GUI for blockMesh and I think it's ready for an early alpha release (under GPL). For now it goes under the name of hexBlocker. It's written in C++ and is based on Qt and VTK. I've attached a couple of screenshots. As of now hexBlocker has the following features and limitations
If you'd like to try it out you'll need to clone it with git and compile. Don't worry there's a script included. If you can compile OpenFOAM and ParaView then you have all the required dependencies. Listed below are the packages I needed on a more or less clean install of Ubuntu 12.04. Code:
sudo apt-get install git cmake qt4-dev-tools libqt4-dev libxt-dev Code:
git clone git://github.com/nicolasedh/hexBlocker cd hexBlocker ./install.sh Bear in mind that this is a spare time project. The intention was for me to learn some C++ outside OpenFOAM nevertheless I think hexBlocker might evolve to something useful. If you'd like to chip in just send me an PM or email. HexBlocker is not not endorsed by, approved by nor affiliated with anyone but me. OpenFOAM(R) is a trademark of OpenCFD. |
|
|
|
|
|
|
|
|
#2 |
|
Member
Håkon Strandenes
Join Date: Dec 2011
Location: Norway
Posts: 53
Rep Power: 3 ![]() |
Wow, this looks really nice. This is a really useful tool, because you can make a lot of different high-quality meshes with blockMesh, but it's not very user-friendly. However, I get a build error:
Code:
[ 48%] Building CXX object CMakeFiles/HexBlocker.dir/HexPatch.cpp.o /home/haakon/Downloads/hexBlocker/src/HexBlock.cpp: In member function ‘void HexBlock::initPatches()’: /home/haakon/Downloads/hexBlocker/src/HexBlock.cpp:382:32: error: taking address of temporary array /home/haakon/Downloads/hexBlocker/src/HexBlock.cpp:384:32: error: taking address of temporary array /home/haakon/Downloads/hexBlocker/src/HexBlock.cpp:386:32: error: taking address of temporary array /home/haakon/Downloads/hexBlocker/src/HexBlock.cpp:388:32: error: taking address of temporary array /home/haakon/Downloads/hexBlocker/src/HexBlock.cpp:390:32: error: taking address of temporary array /home/haakon/Downloads/hexBlocker/src/HexBlock.cpp:392:32: error: taking address of temporary array make[2]: *** [CMakeFiles/HexBlocker.dir/HexBlock.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/HexBlocker.dir/all] Error 2 make: *** [all] Error 2 error in make for hexBlocker |
|
|
|
|
|
|
|
|
#3 |
|
Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 36
Rep Power: 5 ![]() |
Hi,
Thank you for trying out the code! I would seem that newer gcc version don't like the way I was calling the initPatches function. I've pushed a change which I think fixes that issue. I would appreciate if you could pull it and try to recompile. Since my only machine with 12.10 is an old Asus eee. I suspect it will take one day or more to compile vtk on that one. I was doing Code:
initPatch((int[4]){0,3,2,1});
Code:
initPatch(0,3,2,1); Best Nicolas Edit: I just noted Håkon already had submited a patch on gitHub. I noticed it after I submited the same fix. Thanks again Håkon! By the way, I found a bug which caused extrude patch to misbehave. I've submitted a fix and also added the possibility to load a blockMeshDict from the commandline. Last edited by nsf; March 18, 2013 at 17:15. Reason: noted a Håkons pull request on gitHub |
|
|
|
|
|
|
|
|
#4 |
|
Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 36
Rep Power: 5 ![]() |
Hi all,
Just wanted to let you know that I've implemented a couple of new features.
I have no experience with packaging, if anybody would like to chip in please send a pm or reply to this thread. Best Nicolas |
|
|
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Feb 2010
Posts: 23
Rep Power: 5 ![]() |
Cool !
Thanks for your efforts developing very useful tool. Unfortunately I cannot compile it, pls. find the attached log file, maybe it helps find reason for the error. BR/Pekka |
|
|
|
|
|
|
|
|
#6 |
|
Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 36
Rep Power: 5 ![]() |
Hi Pekka!
Thanks for trying out the program and the comment!. I've built and tested hexBlocker with qt-2.8.1 I see from the log file that you are using qt-4.7.4. The first error you're getting is Code:
/home/Pekka/OpenFOAM/Pekka-1.6-ext/applications/hexBlocker/src/GradingCalculatorDialog.cpp: In constructor ‘GradingCalculatorDialog::GradingCalculatorDialog(QWidget*)’: /home/Pekka/OpenFOAM/Pekka-1.6-ext/applications/hexBlocker/src/GradingCalculatorDialog.cpp:38: error: no matching function for call to ‘QDoubleValidator::QDoubleValidator(double, double, int)’ /home/Pekka/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/qt-everywhere-opensource-src-4.7.4/platforms/linux64GccDPOpt/include/QtGui/qvalidator.h:174: note: candidates are: QDoubleValidator::QDoubleValidator(const QDoubleValidator&) /home/Pekka/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/qt-everywhere-opensource-src-4.7.4/platforms/linux64GccDPOpt/include/QtGui/qvalidator.h:169: note: QDoubleValidator::QDoubleValidator(double, double, int, QObject*, const char*) /home/Pekka/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/qt-everywhere-opensource-src-4.7.4/platforms/linux64GccDPOpt/include/QtGui/qvalidator.h:168: note: QDoubleValidator::QDoubleValidator(QObject*, const char*) /home/Pekka/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/qt-everywhere-opensource-src-4.7.4/platforms/linux64GccDPOpt/include/QtGui/qvalidator.h:145: note: QDoubleValidator::QDoubleValidator(double, double, int, QObject*) /home/Pekka/OpenFOAM/OpenFOAM-1.6-ext/ThirdParty/packages/qt-everywhere-opensource-src-4.7.4/platforms/linux64GccDPOpt/include/QtGui/qvalidator.h:144: note: QDoubleValidator::QDoubleValidator(QObject*) Code:
git pull If you'd like to chip in I recommend installing qt-creator. And then just go to open project and select the file CMakeLists.txt. Qtcreator will ask you to run cmake (which you'll need to install). It will also prompt you for extra variables. Add Code:
-DVTK_DIR=pathtoHexBlocker/vtk Nicolas Last edited by nsf; April 15, 2013 at 15:13. Reason: typo |
|
|
|
|
|
|
|
|
#7 |
|
New Member
Join Date: Nov 2012
Posts: 24
Rep Power: 2 ![]() |
Looks like a great tool! But unfortunately I am stuck in the installation process.
Please pardon my low linux skills. For those of you using OpenSUSE 12.3 and being as ignorant as I was, here are some minor changes that helped me. 1) Some package names mentioned in README-install.txt are different libqt4-dev ---> libqt4-devel zlib1g-dev ---> zlib-devel libreadline-dev ---> readline-devel libncurses-dev ---> ncurses-devel libxt-dev ---> libXt-devel 2) In install.sh change MOC=$(which moc-qt4) ---> MOC=$(which moc) UIC=$(which uic-qt4) ---> UIC=$(which uic) No problems occured during the compilation of vtk. However, I tried running bin/HexBlocker but I got the message Code:
./bin/HexBlocker: error while loading shared libraries: libvtkftgl.so.5.10: cannot open shared object file: No such file or directory |
|
|
|
|
|
|
|
|
#8 |
|
Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 36
Rep Power: 5 ![]() |
Hey,
Thank you for the note about the required packages! I'll add them to the README-file. I'll also improve the install script. I've made the following changes: Code:
MOC=$(which moc-qt4 moc | head -n1) UIC=$(which uic-qt4 uic | head -n1) As for the third point. Are you sure that vtk compiled? Is the missing library present? What does Code:
find -name libvtkftgl.so.5.10 If the library is present then cmake probably hasn't done it's job or something else went wrong. Maybe you moved the executable after compilation? The location of the vtk libraries used by HexBlocker are relative to the executable. You may move the entire install directory but you can't move HexBlocker with respect to the vtk folder. If the library is present you can try to set LD_LIBRARY_PATH or LD_PRELOAD with the absolute path to the vtk libraries. Code:
LD_LIBRARY_PATH=/absolute/path/to/vtk/lib/vtk-5.10 HexBlocker If the library isn't present then VTK did not compile. You'll have to investigate that. I'll go on a two week vacation now so I'll be "afk". I might have time to answer a question or two but don't count on it. I'll be back the 2nd of May. Best Nicolas |
|
|
|
|
|
|
|
|
#9 |
|
New Member
Join Date: Nov 2012
Posts: 24
Rep Power: 2 ![]() |
Are you still there?? I hope I caught you before leaving! :-D
The find command returns: ./vtk/lib/vtk-5.10/libvtkftgl.so.5.10 ./build/VTK/bin/libvtkftgl.so.5.10 ./build/VTK/Utilities/ftgl/CMakeFiles/CMakeRelink.dir/libvtkftgl.so.5.10 I did not move anything. I will check the rest tomorrow. Thanks for the answer! |
|
|
|
|
|
|
|
|
#10 |
|
New Member
Join Date: Feb 2010
Posts: 23
Rep Power: 5 ![]() |
Hi Nicolas !
Thanks for your quick reply. Now it compile by using "install.sh" and I can tested it. I tried also build project with QT Creator 2.4.1 and found the following type of problem: BR/Pekka |
|
|
|
|
|
|
|
|
#11 |
|
Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 36
Rep Power: 5 ![]() |
Hi,
I'm backing the bags so be out soon but I'm still here. I can't be sure what the problem is. Are you using an older version of cmake? You could try to compare the output of Code:
ldd bin/HexBlocker | grep ibvtkftgl.so.5.10 Best Nicolas |
|
|
|
|
|
|
|
|
#12 |
|
Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 36
Rep Power: 5 ![]() |
Hi Pekka,
I'm also using qtcreator 2.4.1 so that shouldn't be the problem. If you go to help->about Qtcreator. What Qt-version is it using? From the documentation I see that "setPlaceholderText()" was introduced in Qt4.7. Most likely your qt-creator has not found the custom compiled qt you are using when you compile HexBlocker. It's probably possible to "point" QtCreator to a custom compilation of Qt. I don't know how though. Best Nicolas |
|
|
|
|
|
|
|
|
#13 |
|
New Member
Join Date: Nov 2012
Posts: 24
Rep Power: 2 ![]() |
Ok, I updated my LD_LIBRARY_PATH variable by adding the following line to ~/.bashrc:
Code:
export LD_LIBRARY_PATH=/home/username/OpenFOAM/hexBlocker/vtk/lib/vtk-5.10:$LD_LIBRARY_PATH I will provide feedback about the program as soon as I get a bit more familiar with it. |
|
|
|
|
|
![]() |
| Tags |
| blockmesh, gui, mesh, pre-processing |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ANSYS Workbench on "Uncertified" Linux Distros | hsr | CFX | 212 | April 13, 2013 05:24 |
| Openfoam Ubuntu 12.04 Unmet dependencies | slls33 | OpenFOAM Installation | 10 | April 9, 2013 04:16 |
| New CastNet release: GUI environment for OpenFOAM® | ulli | OpenFOAM Announcements from Other Sources | 0 | January 8, 2013 15:14 |
| alphaEqn.H in twoPhaseEulerFoam | cheng1988sjtu | OpenFOAM Bugs | 14 | September 18, 2011 13:46 |
| Alpha to be phased out | Heiko Gerhauser | Main CFD Forum | 17 | July 25, 2001 14:40 |