| 168 | } |
| 169 | |
| 170 | FaceBitSet getComponents( const MeshTopology& topology, const FaceBitSet & seeds, const FaceBitSet* region0, |
| 171 | FaceIncidence incidence, const UndirectedEdgeBitSet * isCompBd ) |
| 172 | { |
| 173 | MR_TIMER; |
| 174 | |
| 175 | FaceBitSet res; |
| 176 | if ( seeds.none() ) |
| 177 | return res; |
| 178 | |
| 179 | auto unionFindStruct = getUnionFindStructureFaces( topology, region0, incidence, isCompBd ); |
| 180 | const FaceBitSet& region = topology.getFaceIds( region0 ); |
| 181 | |
| 182 | const auto& allRoots = unionFindStruct.roots(); |
| 183 | // collect the roots of all components that contain a seed |
| 184 | FaceBitSet seedRoots( allRoots.size() ); |
| 185 | for ( auto s : seeds ) |
| 186 | seedRoots.set( allRoots[s] ); |
| 187 | |
| 188 | res.resize( allRoots.size() ); |
| 189 | BitSetParallelFor( region, [&]( FaceId f ) |
| 190 | { |
| 191 | if ( seedRoots.test( allRoots[f] ) ) |
| 192 | res.set( f ); |
| 193 | } ); |
| 194 | return res; |
| 195 | } |
| 196 | |
| 197 | FaceBitSet getComponents( const MeshPart& meshPart, const FaceBitSet & seeds, FaceIncidence incidence, const UndirectedEdgeBitSet * isCompBd ) |
| 198 | { |
no test coverage detected