From 5288ad6e69297d98ebabe3553d530e4edf565263 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 9 Apr 2018 17:21:31 +0300 Subject: [PATCH] Regression of tests/enforced_mesh.py --- src/HYBRIDPlugin/HYBRIDPlugin_HYBRID.cxx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/HYBRIDPlugin/HYBRIDPlugin_HYBRID.cxx b/src/HYBRIDPlugin/HYBRIDPlugin_HYBRID.cxx index 2f1c1f4..be443d1 100644 --- a/src/HYBRIDPlugin/HYBRIDPlugin_HYBRID.cxx +++ b/src/HYBRIDPlugin/HYBRIDPlugin_HYBRID.cxx @@ -615,20 +615,26 @@ static bool readGMFFile(MG_HYBRID_API* MGOutput, addElemInMeshGroup(theHelper->GetMesh(), aCreatedElem, aFaceGroupByHybridId[iElem], groupsToRemove); } // add element in shape for groups on geom to work - theMeshDS->SetMeshElementOnShape( aCreatedElem, domainID[iElem] ); - for ( int iN = 0; iN < 3; ++iN ) - if ( node[iN]->getshapeId() < 1 ) - theMeshDS->SetNodeOnFace( node[iN], domainID[iElem] ); + if ( domainID[iElem] > 0 ) + { + theMeshDS->SetMeshElementOnShape( aCreatedElem, domainID[iElem] ); + for ( int iN = 0; iN < 3; ++iN ) + if ( node[iN]->getshapeId() < 1 ) + theMeshDS->SetNodeOnFace( node[iN], domainID[iElem] ); + } } break; case GmfQuadrilaterals: if (fullyCreatedElement) { aCreatedElem = theHelper->AddFace( node[0], node[1], node[2], node[3], noID, force3d ); // add element in shape for groups on geom to work - theMeshDS->SetMeshElementOnShape( aCreatedElem, domainID[iElem] ); - for ( int iN = 0; iN < 3; ++iN ) - if ( node[iN]->getshapeId() < 1 ) - theMeshDS->SetNodeOnFace( node[iN], domainID[iElem] ); + if ( domainID[iElem] > 0 ) + { + theMeshDS->SetMeshElementOnShape( aCreatedElem, domainID[iElem] ); + for ( int iN = 0; iN < 3; ++iN ) + if ( node[iN]->getshapeId() < 1 ) + theMeshDS->SetNodeOnFace( node[iN], domainID[iElem] ); + } } break; case GmfTetrahedra: -- 2.39.2