CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   enGrid (https://www.cfd-online.com/Forums/engrid/)
-   -   Compile EnGrid with CGNS support (https://www.cfd-online.com/Forums/engrid/148088-compile-engrid-cgns-support.html)

PierluigiRossi February 4, 2015 05:03

Compile EnGrid with CGNS support
 
Hi all,

I have problems compiling Engrid with CGNS support.
I have modified the files in the src folder as follows:

engrid.pro:
I have added the line:
CONFIG += CGNS

engrid.pro.app:
I have added the line:
LIBS += -lcgns

libengrid.pro:
I have added the line:
DEFINES += CGNS_SUPPORT

I have the following error messages:
cgnswriter.cpp: In member function ‘void CgnsWriter::writeGrid()’:
cgnswriter.cpp:62:43: error: ‘Unstructured’ was not declared in this scope
if (cg_zone_write(fn,B,"main_grid",size,Unstructured, &Z)) {
^
cgnswriter.cpp:85:36: error: ‘RealDouble’ was not declared in this scope
if (cg_coord_write(fn, B, Z, RealDouble, "CoordinateX", coord_array, &C)) {
^
cgnswriter.cpp:94:36: error: ‘RealDouble’ was not declared in this scope
if (cg_coord_write(fn, B, Z, RealDouble, "CoordinateY", coord_array, &C)) {
^
cgnswriter.cpp:103:36: error: ‘RealDouble’ was not declared in this scope
if (cg_coord_write(fn, B, Z, RealDouble, "CoordinateZ", coord_array, &C)) {
^
cgnswriter.cpp:147:46: error: ‘TETRA_4’ was not declared in this scope
if (cg_section_write(fn, B, Z, "Tetras", TETRA_4, start, end, 0, elements, &S)) {
^
cgnswriter.cpp:172:48: error: ‘PYRA_5’ was not declared in this scope
if (cg_section_write(fn, B, Z, "Pyramids", PYRA_5, start, end, 0, elements, &S)) {
^
cgnswriter.cpp:198:46: error: ‘PENTA_6’ was not declared in this scope
if (cg_section_write(fn, B, Z, "Prisms", PENTA_6, start, end, 0, elements, &S)) {
^
cgnswriter.cpp:226:45: error: ‘HEXA_8’ was not declared in this scope
if (cg_section_write(fn, B, Z, "Hexes", HEXA_8, start, end, 0, elements, &S)) {
^
cgnswriter.cpp:249:49: error: ‘TRI_3’ was not declared in this scope
if (cg_section_write(fn, B, Z, "Triangles", TRI_3, start, end, 0, elements, &S)) {
^
cgnswriter.cpp:273:45: error: ‘QUAD_4’ was not declared in this scope
if (cg_section_write(fn, B, Z, "Quads", QUAD_4, start, end, 0, elements, &S)) {
^
cgnswriter.cpp: In member function ‘void CgnsWriter::writeBcs()’:
cgnswriter.cpp:303:66: error: ‘BCTypeNull’ was not declared in this scope
if (cg_boco_write(fn, B, Z, qPrintable(getBC(bc).getName()), BCTypeNull, ElementList, bc_faces.size(), data, &BC_cgns)) {
^
cgnswriter.cpp:303:78: error: ‘ElementList’ was not declared in this scope
if (cg_boco_write(fn, B, Z, qPrintable(getBC(bc).getName()), BCTypeNull, ElementList, bc_faces.size(), data, &BC_cgns)) {
^
cgnswriter.cpp: In member function ‘virtual void CgnsWriter::operate()’:
cgnswriter.cpp:320:42: error: ‘MODE_WRITE’ was not declared in this scope
if (cg_open(qPrintable(file_name), MODE_WRITE, &fn)) {
^
make[2]: *** [release/cgnswriter.o] Errore 1
make[2]: uscita dalla directory "/home/sas.itn/ianovalep/CFD_Software/engrid-release-1.4/src/libengrid"
make[1]: *** [release] Errore 2
make[1]: uscita dalla directory "/home/sas.itn/ianovalep/CFD_Software/engrid-release-1.4/src/libengrid"
make: *** [sub-libengrid-libengrid-pro-sub_Release_ordered] Errore 2

It seems that the include file is not linked well. Or there is compatibility version problem?
I am trying to install Engrid 1.4 from the source code and I have the cgns library v3.1.

Does someone have the same problem? Can you help me?
Thanks in advance.
(I hope to be clear enough..it is my first thread)

Pierluigi

PierluigiRossi February 4, 2015 10:30

Solved
 
I have solved with the patch provided at this link:
https://github.com/wyldckat/engrid/c...9463040bd3da33


All times are GMT -4. The time now is 08:02.