Salome HOME
introduce biquadratic quadratic pentahedron (18 nodes)
[modules/smesh.git] / src / DriverCGNS / DriverCGNS_Write.cxx
index 06abf1dad98d7bf046d68c803753993d564ad7c5..14f1c10e23640f9de2540597636600d5667afa1d 100644 (file)
@@ -130,6 +130,11 @@ namespace
         interlaces[SMDSEntity_Quad_Penta] = ids;
         cgTypes   [SMDSEntity_Quad_Penta] = CGNS_ENUMV( PENTA_15 );
       }
+      {
+        static int ids[] = { 0,2,1,3,5,4,8,7,6,9,11,10,14,13,12,15,16,17 }; // TODO: check CGNS ORDER
+        interlaces[SMDSEntity_BiQuad_Penta] = ids;
+        cgTypes   [SMDSEntity_BiQuad_Penta] = CGNS_ENUMV( PENTA_18 );
+      }
       {
         static int ids[] = { 0,3,2,1,4,7,6,5 };
         interlaces[SMDSEntity_Hexa] = ids;
@@ -562,7 +567,11 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
       switch ( meshDim ) {
       case 3:
         switch ( group->GetType() ) {
+#if CGNS_VERSION > 3130
         case SMDSAbs_Volume: location = CGNS_ENUMV( CellCenter ); break;
+#else
+        case SMDSAbs_Volume: location = CGNS_ENUMV( FaceCenter ); break;
+#endif
         case SMDSAbs_Face:   location = CGNS_ENUMV( FaceCenter ); break;
         case SMDSAbs_Edge:   location = CGNS_ENUMV( EdgeCenter ); break;
         default:;
@@ -570,13 +579,21 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
         break;
       case 2:
         switch ( group->GetType() ) {
+#if CGNS_VERSION > 3130
         case SMDSAbs_Face: location = CGNS_ENUMV( CellCenter ); break;
+#else
+        case SMDSAbs_Face: location = CGNS_ENUMV( FaceCenter ); break;
+#endif
         case SMDSAbs_Edge: location = CGNS_ENUMV( EdgeCenter ); break;
         default:;
         }
         break;
       case 1:
+#if CGNS_VERSION > 3130
         location = CGNS_ENUMV( CellCenter ); break;
+#else
+        location = CGNS_ENUMV( EdgeCenter ); break;
+#endif
         break;
       }
     }