intHexInd.resize( nbIntHex );
tbb::parallel_for ( tbb::blocked_range<size_t>( 0, nbIntHex ),
ParallelHexahedron( intersectedHex, intHexInd ),
- tbb::simple_partitioner());
+ tbb::simple_partitioner()); // ComputeElements() is called here
for ( size_t i = 0; i < intHexInd.size(); ++i )
if ( Hexahedron * hex = intersectedHex[ intHexInd[ i ]] )
nbAdded += hex->addElements( helper );
*/
int Hexahedron::addElements(SMESH_MesherHelper& helper)
{
+ int nbAdded = 0;
// add elements resulted from hexahedron intersection
//for ( size_t i = 0; i < _volumeDefs.size(); ++i )
{
break;
}
}
+ nbAdded += int ( _volumeDefs._nodes.size() > 0 );
}
- return 1;//(int) _volumeDefs.size();
+ return nbAdded;
}
//================================================================================
/*!
// - skip a cell, if it is too small according to the size threshold
// - add a hexahedron in the mesh, if all nodes are inside
// - add a polyhedron in the mesh, if some nodes are inside and some outside
+
+ _computeCanceled = false;
+
try
{
Grid grid;
#endif
}
}
+ if ( _computeCanceled ) return false;
#ifdef WITH_TBB
{ // copy partner faces and curves of not thread-safe types
helper.SetSubShape( solidExp.Current() );
helper.SetElementsOnShape( true );
+ if ( _computeCanceled ) return false;
+
// create nodes on the geometry
grid.ComputeNodes(helper);
+ if ( _computeCanceled ) return false;
+
// create volume elements
Hexahedron hex( _hyp->GetSizeThreshold(), &grid );
int nbAdded = hex.MakeElements( helper );