CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > enGrid

How to include CGNS during build.bash compilation?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 22, 2013, 13:18
Default How to include CGNS during build.bash compilation?
  #1
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 15
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Dear engriders,

I folllowed the link below to install engrid:
http://engits.eu/wiki/index.php/Installation

It is a good work. Thanks!

However it did not install CGNS.
Could you tell me how to reconfigure and rebuild for CGNS?

Regards,

Aerothermal
aerothermal is offline   Reply With Quote

Old   January 22, 2013, 14:03
Default
  #2
Senior Member
 
Oliver Gloth
Join Date: Mar 2009
Location: Todtnau, Germany
Posts: 121
Rep Power: 17
ogloth is on a distinguished road
Hello,

I haven't used CGNS for quite some time now. Generally it boils down to downloading CGNS and installing it. Afterwards you update the enGrid *.pro files such that the include files and libraries can be found.

Which code do you want to use? It might be easier to add an export function for your code, rather than hassling around with CGNS. CGNS allows many different ways of organising a file and not every way is understood by every software.

Cheers,
Oliver
ogloth is offline   Reply With Quote

Old   January 22, 2013, 14:17
Default
  #3
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 15
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Dear Oliver,

I tried to use CGNS option in Engrid menu and it told me that CGNS was not compiled.

Actually I am trying to use Engrid as a translation tool from OpenFoam to CGNS.
CGNS is a format that is common to CFD++ and OpenFoam.

Other formats may be VGRID, UGRID/AFLR, Plot3D, UNSFast, Fluent, STARCD.

I already used foamToCgns and cgnsToFoam in OF1.5 and it works but I am looking for an alternative.

Regards,

Last edited by aerothermal; January 22, 2013 at 14:17. Reason: From OpenFOam to CGNS
aerothermal is offline   Reply With Quote

Old   January 22, 2013, 14:26
Default
  #4
Senior Member
 
Oliver Gloth
Join Date: Mar 2009
Location: Todtnau, Germany
Posts: 121
Rep Power: 17
ogloth is on a distinguished road
In enGrid there is currently only an export function to CGNS and I don't think that an import function is likely to be implemented soonish. It might, however, happen that import/export functionality for Fluent will be implemented -- it depends a bit on commercial demand, but it appears as if there could be some ...

If you still want to try:
Put "DEFINES += CGNS_SUPPORT" into the libengrid.pro file (src/libengrid/libengrid.pro).

You also need to make sure that the headers and the libraries can be found
LIBS += ...
INCLUDEPATH += ...

Take a look at engrid.pro.app to see some usage examples.

'hope this helps,
Oliver
ogloth is offline   Reply With Quote

Old   January 22, 2013, 14:36
Default
  #5
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 15
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Hi,

Thank you Oliver.

See that I am using Ubuntu 12.10.

Some questions:

1) in which section (or line) I should include DEFINES += CGNS_SUPPORT?
2) should LIBS and INCLUDEPATH be place in same file? Where?

After changing libengrid.pro, what I need to do? Just run? Do I need to make? What are the commands next?

Regards,

Aerothermal
aerothermal is offline   Reply With Quote

Old   January 22, 2013, 14:40
Default
  #6
Senior Member
 
Oliver Gloth
Join Date: Mar 2009
Location: Todtnau, Germany
Posts: 121
Rep Power: 17
ogloth is on a distinguished road
INCLUDEPATH is probably needed in libengrid.pro
LIBS will probably be needed in engrid.pro.app

The DEFINES += line can go to the top of the file.

afterwards run
qmake engrid.pro
make (-j4)

Of course you have to figure out where the headers and libraries are -- unless they are in a standard place in which case you might not have to add anythin, apart from the DEFINES statement.
ogloth is offline   Reply With Quote

Old   January 22, 2013, 14:55
Default
  #7
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 15
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
OK. I did that.

But the compilation now did not pass the vtk.

Quote:
In file included from geometrytools.cpp:23:0:
geometrytools.h:31:33: fatal error: vtkUnstructuredGrid.h: No such file or directory
It does not matter whether or not I change the code.
aerothermal is offline   Reply With Quote

Old   January 22, 2013, 15:17
Default
  #8
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 15
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
That error was gone by coding
Quote:
cd src
source scripts/setup_pathes.bash
cd libengrid
qmake libengrid.pro
make -j16
So it found the VTK and compiled OK without CGNS.
However, when CGNS lines are included in libengrid.pro the compilation stops at,

Quote:
g++ -c -m64 -pipe -Wall -Wno-deprecated -fno-omit-frame-pointer -g -O2 -D_REENTRANT -Wall -W -fPIC -DQT_WEBKIT -DCGNS_SUPPORT -DQT_NO_DEBUG -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4 -I.. -I./libengrid-build -I../netgen_svn/netgen-mesher/netgen/nglib -I../netgen_svn/netgen-mesher/netgen/libsrc/general -I/usr/include/vtk-5.8 -I/usr/X11R6/include -Irelease -I. -o release/qrc_engrid.o release/qrc_engrid.cpp
make[1]: *** [release/cgnswriter.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/ats4i/ats4iFiles/Software/engrid/src/libengrid'
make: *** [release] Error 2
aerothermal is offline   Reply With Quote

Old   January 22, 2013, 15:27
Default
  #9
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 15
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
What I need to include here?

Quote:
LIBS += ...
INCLUDEPATH += ...
I suppose that INCLUDEPATH is the path to the place where the HEADERS of cgns are located. Is it correct?

And LIBS? What should I specify there? Is it a path? Or which library?
aerothermal is offline   Reply With Quote

Old   January 22, 2013, 15:30
Default
  #10
Senior Member
 
Oliver Gloth
Join Date: Mar 2009
Location: Todtnau, Germany
Posts: 121
Rep Power: 17
ogloth is on a distinguished road
yes, for example:
INCLUDEPATH += /usr/local/cgns/include

LIBS is probably something like
LIBS += -lcgns
or
LIBS += -L/usr/local/cgns/lib
LIBS += -lcgns

Just guessing, you have to look what the real locations and file names are!
ogloth is offline   Reply With Quote

Old   January 22, 2013, 16:01
Default
  #11
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 118
Rep Power: 15
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
not working yet.

libengrid compiled
now engrid is not.

Quote:
g++ -c -m64 -pipe -Wall -Wno-deprecated -fno-omit-frame-pointer -g -O2 -D_REENTRANT -Wall -W -fPIC -DQT_WEBKIT -DCGNS_SUPPORT -DQT_NO_DEBUG -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4 -I.. -I./libengrid-build -I../netgen_svn/netgen-mesher/netgen/nglib -I../netgen_svn/netgen-mesher/netgen/libsrc/general -I/usr/include/vtk-5.8 -I/usr/X11R6/include -Irelease -I. -o release/moc_guinormalextrusion.o release/moc_guinormalextrusion.cpp
cgnswriter.cpp: In member function ‘void CgnsWriter::writeGrid()’:
cgnswriter.cpp:62:43: error: ‘Unstructured’ was not declared in this scope
cgnswriter.cpp:85:36: error: ‘RealDouble’ was not declared in this scope
cgnswriter.cpp:94:36: error: ‘RealDouble’ was not declared in this scope
cgnswriter.cpp:103:36: error: ‘RealDouble’ was not declared in this scope
cgnswriter.cpp:147:46: error: ‘TETRA_4’ was not declared in this scope
cgnswriter.cpp:172:48: error: ‘PYRA_5’ was not declared in this scope
cgnswriter.cpp:198:46: error: ‘PENTA_6’ was not declared in this scope
cgnswriter.cpp:226:45: error: ‘HEXA_8’ was not declared in this scope
cgnswriter.cpp:249:49: error: ‘TRI_3’ was not declared in this scope
cgnswriter.cpp:273:45: error: ‘QUAD_4’ was not declared in this scope
cgnswriter.cpp: In member function ‘void CgnsWriter::writeBcs()’:
cgnswriter.cpp:303:66: error: ‘BCTypeNull’ was not declared in this scope
cgnswriter.cpp:303:78: error: ‘ElementList’ was not declared in this scope
cgnswriter.cpp: In member function ‘virtual void CgnsWriter:perate()’:
cgnswriter.cpp:320:42: error: ‘MODE_WRITE’ was not declared in this scope
aerothermal is offline   Reply With Quote

Old   November 30, 2013, 16:23
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

Just to let you know that this has been fixed in this commit: https://github.com/wyldckat/engrid/c...9463040bd3da33 - as reported here: https://github.com/enGits/engrid/issues/42

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFoam install script Error during paraFoam installation SePe OpenFOAM Installation 10 June 19, 2010 15:15
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 13:43
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 07:21
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 10:46


All times are GMT -4. The time now is 18:00.