X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FDriverCGNS%2FDriverCGNS_Write.cxx;h=5f334797a5ea74103dde5bc4cba76c32e50fe5ae;hp=948b111b9332df38846ffd2e93e7243dab3ef3d5;hb=06f98b8021871f78d800f9ac4a378f4fa7d834b1;hpb=0be76e8fb82d47077bf6621c2ff176fa40f2ee88 diff --git a/src/DriverCGNS/DriverCGNS_Write.cxx b/src/DriverCGNS/DriverCGNS_Write.cxx index 948b111b9..5f334797a 100644 --- a/src/DriverCGNS/DriverCGNS_Write.cxx +++ b/src/DriverCGNS/DriverCGNS_Write.cxx @@ -559,30 +559,38 @@ Driver_Mesh::Status DriverCGNS_Write::Perform() CGNS_ENUMT( GridLocation_t ) location = CGNS_ENUMV( Vertex ); if ( group->GetType() != SMDSAbs_Node ) { -#if CGNS_VERSION > 3130 - location = CGNS_ENUMV( CellCenter ); -#else switch ( meshDim ) { case 3: switch ( group->GetType() ) { - case SMDSAbs_Volume: location = CGNS_ENUMV( FaceCenter ); break; // !!! - case SMDSAbs_Face: location = CGNS_ENUMV( FaceCenter ); break; // OK - case SMDSAbs_Edge: location = CGNS_ENUMV( EdgeCenter ); break; // OK +#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:; } break; case 2: switch ( group->GetType() ) { - case SMDSAbs_Face: location = CGNS_ENUMV( FaceCenter ); break; // ??? - case SMDSAbs_Edge: location = CGNS_ENUMV( EdgeCenter ); break; // OK +#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: - location = CGNS_ENUMV( EdgeCenter ); break; // ??? +#if CGNS_VERSION > 3130 + location = CGNS_ENUMV( CellCenter ); break; +#else + location = CGNS_ENUMV( EdgeCenter ); break; +#endif break; } -#endif } // try to extract type of boundary condition from the group name @@ -615,7 +623,7 @@ Driver_Mesh::Status DriverCGNS_Write::Perform() return addMessage( cg_get_error(), /*fatal = */true); // write BC location - if ( location != CGNS_ENUMV( Vertex )) + if ( location != CGNS_ENUMV( Vertex ) || meshDim == 1 ) { if ( cg_boco_gridlocation_write( _fn, iBase, iZone, iBC, location) != CG_OK ) return addMessage( cg_get_error(), /*fatal = */false);