bool Hexahedron::isSplittedLink(const Solid* solid, SMESH_MesherHelper& helper, const Hexahedron::_Link& linkIn) const
{
_Link split;
- std::vector<_Node> intNodes;
_Link link = linkIn;
link._fIntNodes.clear();
link._fIntNodes.reserve( link._fIntPoints.size() );
+ std::vector<_Node> intNodes;
+ intNodes.reserve(link._fIntPoints.size());
+
for ( size_t i = 0; i < link._fIntPoints.size(); ++i )
if ( solid->ContainsAny( link._fIntPoints[i]->_faceIDs ))
{
- intNodes.push_back( _Node( 0, link._fIntPoints[i] ));
+ intNodes.emplace_back(nullptr, link._fIntPoints[i]);
link._fIntNodes.push_back( & intNodes.back() );
}
- link._splits.clear();
split._nodes[ 0 ] = link._nodes[0];
bool isOut = ( ! link._nodes[0]->Node() );
- bool checkTransition;
+ bool checkTransition = false;
for ( size_t i = 0; i < link._fIntNodes.size(); ++i )
{
const bool isGridNode = ( ! link._fIntNodes[i]->Node() );
{
// A simple case - just one task executed in one thread.
// TODO: check if it's faster to do it sequentially
- // threads.reserve(numTasksTotal);
- // for (; it < last; ++it)
- // {
- // threads.emplace_back(f, std::ref(*it));
- // }
- std::for_each(it, last, f);
+ threads.reserve(numTasksTotal);
+ for (; it < last; ++it)
+ {
+ threads.emplace_back(f, std::ref(*it));
+ }
+
+ // This line for debug in sequential mode
+ // std::for_each(it, last, f);
}
else
{