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: