Skip to content

Commit 1afde0e

Browse files
authored
0.9.5.1 updates: mesh optimisation, min-pwr balls.
1 parent db63422 commit 1afde0e

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

src/libcpp/geom_mesh/iter_mesh_2.hpp

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
--------------------------------------------------------
3333
*
34-
* Last updated: 28 November, 2017
34+
* Last updated: 14 December, 2017
3535
*
3636
* Copyright 2013-2017
3737
* Darren Engwirda
@@ -286,6 +286,16 @@
286286

287287
_msrc /= _csrc.count() ;
288288
_mdst /= _cdst.count() ;
289+
290+
291+
if ( true )
292+
{
293+
/*--------------------- okay if all are improving */
294+
_okay = _0dst > _0src &&
295+
_mdst > _msrc ;
296+
297+
if (_okay) return;
298+
}
289299

290300
if ( true )
291301
{
@@ -419,7 +429,7 @@
419429
)
420430
{
421431
iptr_type static
422-
constexpr _ITER = (iptr_type)+5 ;
432+
constexpr _ITER = (iptr_type)+8 ;
423433

424434
_okay = false ;
425435

@@ -435,7 +445,7 @@
435445
/*---------------- calc. line search direction vector */
436446
if (_kind == +1 )
437447
{
438-
_wvt_move( _mesh, _hfun,
448+
_pvt_move( _mesh, _hfun,
439449
_pred, _hval, _tset,
440450
_node, _line, _ladj) ;
441451
}
@@ -459,7 +469,7 @@
459469
_ladj * _xtol) return;
460470

461471
real_type _scal =
462-
_llen * (real_type) +1.0 ;
472+
_llen * (real_type) +2.0 ;
463473

464474
/*---------------- do backtracking line search iter's */
465475

@@ -547,15 +557,15 @@
547557
)
548558
{
549559
iptr_type static
550-
constexpr _ITER = (iptr_type)+5 ;
560+
constexpr _ITER = (iptr_type)+8 ;
551561

552562
_okay = false ;
553563

554564
real_type _radj, _line, _save ;
555565

556566
/*---------------- calc. line search direction vector */
557567

558-
_good = (real_type)+1. ;
568+
_good = (real_type) +.9875;
559569

560570
if(_qmin < _good )
561571
{
@@ -578,7 +588,7 @@
578588
_radj * _xtol) return;
579589

580590
real_type _scal =
581-
_llen * (real_type) +1. ;
591+
_llen * (real_type) +2. ;
582592

583593
real_type _wmax =
584594
_radj * (real_type) +4. ;

0 commit comments

Comments
 (0)