There is a bug in ICEM_Interface::ReadTetraSurfaceMeshBinary for quadratic meshes. It specifically occurs in meshes with box-style boundaries. The boundaries (TOP, BOTTOM,…) are correctly extracted but they cannot be matched to the triangle/quad sides, as these are being locally stored as tuples, instead of triplets. The error manifests itself specifically in ICEM_Interface::BuildNeighborConnectivityOfRectangleShapedModel( const ModelTopology& mt, VSet<csp_float,2U>& vset ) at code fragments for "creating surface element face keys from the boundary element sets".
In order to correct this in your code, you must add tuples instead of triplets for the line elements, in order to match the original surface element sides of the surface_neighbor_keys map. For each boundary substitute:
for ( vector<stl_index>::const_iterator
eit=mt.ElementsOfRegionBegin("BOTTOM"); eit!=mt.ElementsOfRegionEnd("BOTTOM"); eit++ ) {
assert( *eit > 0U and *eit <= vset.Elements() );
assert( mt.fem_specs.LineElement( vset.ElementType(*eit) ) );
for ( stl_index i=0U; i<vset.PlistSize(*eit); i++ ) key.insert( vset.Plist( *eit, i ) );
ebottom.insert( make_pair( key, *eit ) );
for ( set<stl_index>::const_iterator
sit=key.begin(); sit!=key.end(); sit++ ) nbottom.insert( (*sit) );
key.clear();
}
by
for ( vector<stl_index>::const_iterator
eit=mt.ElementsOfRegionBegin("BOTTOM"); eit!=mt.ElementsOfRegionEnd("BOTTOM"); eit++ ) {
assert( *eit > 0U and *eit <= vset.Elements() );
assert( mt.fem_specs.LineElement( vset.ElementType(*eit) ) );
key.insert( vset.Plist( *eit, 0 ) );
key.insert( vset.Plist( *eit, 1 ) );
ebottom.insert( make_pair( key, *eit ) );
for ( set<stl_index>::const_iterator
sit=key.begin(); sit!=key.end(); sit++ ) nbottom.insert( (*sit) );
key.clear();
}
In this case, there is no need to iterate as the element is a line, and the two corner nodes are always stored in 0 and 1. Alternative implementations of the same solution can also be used.
I hope this helps anyone using quadratic elements with Ansys.
APR