File tree Expand file tree Collapse file tree
Common/src/geometry/meshreader Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ void CCGNSMeshReaderFVM::OpenCGNSFile(string val_filename) {
8989 /* --- Check whether the supplied file is truly a CGNS file. ---*/
9090
9191 int file_type;
92+ float file_version;
9293 if (cg_is_cgns (val_filename.c_str (), &file_type) != CG_OK) {
9394 SU2_MPI::Error (val_filename +
9495 string (" was not found or is not a properly formatted" ) +
@@ -107,7 +108,13 @@ void CCGNSMeshReaderFVM::OpenCGNSFile(string val_filename) {
107108 cout << " Reading the CGNS file: " ;
108109 cout << val_filename.c_str () << " ." << endl;
109110 }
110-
111+ if (cg_version (cgnsFileID, &file_version))
112+ cg_error_exit ();
113+ if (rank == MASTER_NODE) {
114+ if (file_version < 4.0 ) {
115+ cout << " The file version is too old, please update it with the cgnsupdate tool." << endl;
116+ }
117+ }
111118}
112119
113120void CCGNSMeshReaderFVM::ReadCGNSDatabaseMetadata () {
You can’t perform that action at this time.
0 commit comments