|
31 | 31 | * |
32 | 32 | -------------------------------------------------------- |
33 | 33 | * |
34 | | - * Last updated: 14 Sept., 2020 |
| 34 | + * Last updated: 30 Sept., 2020 |
35 | 35 | * |
36 | 36 | * Copyright 2013-2020 |
37 | 37 | * Darren Engwirda |
|
97 | 97 | auto _jptr = _mesh. |
98 | 98 | node().head() + _eptr->node(1); |
99 | 99 |
|
100 | | - _cset.set_count(+0); |
101 | | - _cnew.set_count(+0); |
102 | | - _iset.set_count(+0); |
103 | | - _jset.set_count(+0); |
| 100 | + _cset.set_count( |
| 101 | + 0, containers::loose_alloc); |
| 102 | + _cnew.set_count( |
| 103 | + 0, containers::loose_alloc); |
| 104 | + _iset.set_count( |
| 105 | + 0, containers::loose_alloc); |
| 106 | + _jset.set_count( |
| 107 | + 0, containers::loose_alloc); |
104 | 108 |
|
105 | 109 | _mesh.connect_2( |
106 | 110 | _enum, EDGE2_tag, _cset) ; |
|
140 | 144 |
|
141 | 145 | _qinc -= (real_type)+1./2. ; |
142 | 146 |
|
143 | | - _qinc /= std::cbrt (_iout) ; // no oscl. wrt. zip |
| 147 | + _qinc /= std::sqrt (_iout) ; // no oscl. wrt. zip |
144 | 148 |
|
145 | 149 | } |
146 | 150 | else |
|
332 | 336 | for (auto _iloc = +0; _iloc != _INUM; |
333 | 337 | ++_iloc ) |
334 | 338 | { |
335 | | - _qtmp.set_count(0) ; |
| 339 | + _qtmp.set_count( |
| 340 | + +0, containers::loose_alloc); |
336 | 341 |
|
337 | 342 | real_type _minC = |
338 | 343 | loop_cost( _mesh, |
|
350 | 355 | } |
351 | 356 |
|
352 | 357 | /*--------------------------------- is cost improved? */ |
353 | | - _qdst.set_count(0); |
| 358 | + _qdst.set_count( |
| 359 | + 0, containers::loose_alloc) ; |
354 | 360 |
|
355 | 361 | real_type _QMIN = |
356 | 362 | loop_cost( _mesh, |
357 | | - _cnew, _qdst, cell_kind () |
358 | | - ) ; |
| 363 | + _cnew, _qdst, cell_kind()) ; |
359 | 364 |
|
360 | 365 | move_okay( _qdst, _qsrc, _move, |
361 | | - +1.0 , _qinc) ; |
| 366 | + std::sqrt( _QLIM) , |
| 367 | + _qinc) ; |
362 | 368 |
|
363 | 369 | if((_okay = _move > 0 && |
364 | 370 | _QMIN >= _qmin+_qinc)) |
365 | 371 | { |
366 | 372 | /*--------------------------------- delete old cavity */ |
367 | | - for (auto _cell = _cset.head(); |
368 | | - _cell != _cset.tend(); |
| 373 | + for (auto _cell = _cset.head() ; |
| 374 | + _cell != _cset.tend() ; |
369 | 375 | ++_cell ) |
370 | 376 | { |
371 | 377 | if (_cell->_kind == TRIA3_tag) |
372 | 378 | { |
373 | 379 | _mesh. |
374 | | - _pop_tri3(_cell->_cell); |
| 380 | + _pop_tri3(_cell->_cell) ; |
375 | 381 | } |
376 | 382 | else |
377 | 383 | if (_cell->_kind == QUAD4_tag) |
378 | 384 | { |
379 | 385 | _mesh. |
380 | | - _pop_quad(_cell->_cell); |
| 386 | + _pop_quad(_cell->_cell) ; |
381 | 387 | } |
382 | 388 | } |
383 | 389 | } |
384 | 390 | else |
385 | 391 | { |
386 | 392 | /*--------------------------------- delete new cavity */ |
387 | | - for (auto _cell = _cnew.head(); |
388 | | - _cell != _cnew.tend(); |
| 393 | + for (auto _cell = _cnew.head() ; |
| 394 | + _cell != _cnew.tend() ; |
389 | 395 | ++_cell ) |
390 | 396 | { |
391 | 397 | if (_cell->_kind == TRIA3_tag) |
392 | 398 | { |
393 | 399 | _mesh. |
394 | | - _pop_tri3(_cell->_cell); |
| 400 | + _pop_tri3(_cell->_cell) ; |
395 | 401 | } |
396 | 402 | else |
397 | 403 | if (_cell->_kind == QUAD4_tag) |
398 | 404 | { |
399 | 405 | _mesh. |
400 | | - _pop_quad(_cell->_cell); |
| 406 | + _pop_quad(_cell->_cell) ; |
401 | 407 | } |
402 | 408 | } |
403 | 409 |
|
404 | | - _mesh._pop_node ( &_inew ) ; |
| 410 | + _mesh._pop_node ( &_inew ); |
405 | 411 | } |
406 | 412 |
|
407 | 413 | # undef NULLHINT |
|
0 commit comments