Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9.13 updates: bug fix in iter_divs_2 (0.9.13.1) #37

Merged
merged 1 commit into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions src/libcpp/iter_mesh/iter_divs_2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
* Last updated: 12 Sept., 2020
* Last updated: 14 Sept., 2020
*
* Copyright 2013-2020
* Darren Engwirda
Expand Down Expand Up @@ -79,8 +79,8 @@
iptr_type static constexpr
_last = pred_type::geom_dims+0 ;

// iptr_type static constexpr
// _DEG_TRIA3 = (iptr_type)+6 ;
iptr_type static constexpr
_DEG_TRIA3 = (iptr_type)+6 ;
// iptr_type static constexpr
// _DEG_QUAD4 = (iptr_type)+4 ;

Expand Down Expand Up @@ -121,7 +121,7 @@
&_iptr->pval(0),&_jptr->pval(0)) ;

real_type _hbar =
std::max(_isiz , _jsiz);
std::max(_isiz , _jsiz ) ;

/*--------------------------------- exit if too small */
if (_lsqr <= _hbar * _lmin *
Expand All @@ -130,7 +130,7 @@

/*--------------------------------- split if too long */
real_type static constexpr
_lBIG = (real_type)+7./5. ;
_lBIG = (real_type)+11./8.;

if (_lsqr >= _hbar * _lBIG *
_hbar * _lBIG )
Expand All @@ -147,13 +147,21 @@
{
/*--------------------------------- get adjacent face */
_mesh.connect_2(_eptr->node(+0),
POINT_tag, _iset) ;
POINT_tag , _iset) ;
_mesh.connect_2(_eptr->node(+1),
POINT_tag, _jset) ;
POINT_tag , _jset) ;

/*--------------------------------- calc. local topo. */
if (_iset.count() <= +7) return;
if (_jset.count() <= +7) return;
auto _ideg = _iset.count() ;
auto _ierr =
(iptr_type)(_ideg-_DEG_TRIA3) ;

auto _jdeg = _jset.count() ;
auto _jerr =
(iptr_type)(_jdeg-_DEG_TRIA3) ;

if (std::max(_ierr, _jerr) < 2)
return ;

} // if (_lBIG)

Expand Down Expand Up @@ -328,7 +336,7 @@

real_type _minC =
loop_cost( _mesh,
_cset, _qtmp, cell_kind()
_cnew, _qtmp, cell_kind()
) ;

move_node( _geom, _mesh,
Expand Down
6 changes: 3 additions & 3 deletions src/libcpp/iter_mesh/iter_zips_2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@

/*--------------------------------- get adjacent face */
_mesh.connect_2(_eptr->node(+0),
POINT_tag, _iset) ;
POINT_tag , _iset) ;
_mesh.connect_2(_eptr->node(+1),
POINT_tag, _jset) ;
POINT_tag , _jset) ;

/*--------------------------------- calc. local topo. */
auto _ndeg = _iset.count()
Expand Down Expand Up @@ -176,7 +176,7 @@
&_iptr->pval(0),&_jptr->pval(0)) ;

real_type _hbar =
std::min(_isiz , _jsiz);
std::min(_isiz , _jsiz ) ;

/*--------------------------------- exit if too large */
if (_lsqr >= _hbar * _lmax *
Expand Down