-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.9.8 updates: "Off-centre" fix -- dual cell checks
- Loading branch information
Showing
31 changed files
with
2,373 additions
and
1,289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
template < | ||
typename F | ||
> | ||
class hj_mesh_2 | ||
{ | ||
|
||
__static_call | ||
__normal_call void_type limit_edge_2 ( | ||
) | ||
{ | ||
} | ||
|
||
__static_call | ||
__normal_call void_type limit_tria_3 ( | ||
) | ||
{ | ||
} | ||
|
||
__static_call | ||
__normal_call void_type limit_mesh ( | ||
ffun_type &_ffun, | ||
real_type _DFDX | ||
) | ||
{ | ||
|
||
containers::priority_map<> _sort; | ||
|
||
// push nodes onto pq | ||
// pop min at each pass | ||
// limit any cell neighbours | ||
// if a cell is limited, update pq of its nodes | ||
|
||
// that's it! | ||
|
||
} | ||
|
||
} ; | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,15 @@ | |
* way whatsoever. This code is provided "as-is" to be | ||
* used at your own risk. | ||
* | ||
-------------------------------------------------------- | ||
* | ||
* Last updated: 24 January, 2019 | ||
* | ||
* Copyright 2013-2019 | ||
* Darren Engwirda | ||
* [email protected] | ||
* https://github.com/dengwirda/ | ||
* | ||
-------------------------------------------------------- | ||
* | ||
* This class defines the basic "restricted" delaunay | ||
|
@@ -44,10 +53,10 @@ | |
* Procedia Engineering, 163, pp. 84-96, | ||
* http://dx.doi.org/10.1016/j.proeng.2016.11.024 | ||
* | ||
* D. Engwirda, (2014): "Locally-optimal Delaunay- | ||
* refinement and optimisation-based mesh generation", | ||
* Ph.D. Thesis, School of Mathematics and Statistics, | ||
* Univ. of Sydney. | ||
* D. Engwirda, (2014): "Locally-optimal Delaunay- | ||
* refinement and optimisation-based mesh generation", | ||
* Ph.D. Thesis, School of Mathematics and Statistics, | ||
* Univ. of Sydney. | ||
* http://hdl.handle.net/2123/13148 | ||
* | ||
* building on various previous works on rDT methods, | ||
|
@@ -128,8 +137,7 @@ | |
__normal_call double half_sign ( | ||
__const_ptr (double) _pp, | ||
__const_ptr (double) _pa, | ||
__const_ptr (double) _pb, | ||
double _rt | ||
__const_ptr (double) _pb | ||
) | ||
{ | ||
/*-------- helper: eval. sign w.r.t. half-plane [a,b] */ | ||
|
@@ -155,34 +163,7 @@ | |
_ab[0] * _mp[0] + | ||
_ab[1] * _mp[1] ; | ||
|
||
if (_dp < -2.0 * _rt || | ||
_dp > +2.0 * _rt ) | ||
return ((double) _dp ); | ||
|
||
/*-------- fall-back to double-double if near to zero */ | ||
dd_flt _PM[2]; | ||
_PM[0] = _pa[0] * 0.5 ; | ||
_PM[1] = _pa[1] * 0.5 ; | ||
_PM[0]+= _pb[0] * 0.5 ; | ||
_PM[1]+= _pb[1] * 0.5 ; | ||
|
||
dd_flt _AB[2]; | ||
_AB[0] = _pb[0] ; | ||
_AB[1] = _pb[1] ; | ||
_AB[0]-= _pa[0] ; | ||
_AB[1]-= _pa[1] ; | ||
|
||
dd_flt _MP[2]; | ||
_MP[0] = _pp[0] ; | ||
_MP[1] = _pp[1] ; | ||
_MP[0]-= _pm[0] ; | ||
_MP[1]-= _pm[1] ; | ||
|
||
dd_flt _DP = | ||
_AB[0] * _MP[0] + | ||
_AB[1] * _MP[1] ; | ||
|
||
return ((double) _DP ); | ||
} | ||
|
||
template < | ||
|
@@ -222,20 +203,19 @@ | |
_BPOS[1] = _mesh. | ||
_tria.node(_bnod)->pval(1) ; | ||
|
||
double _sign = +0.0; | ||
double _sign = +0.0 ; | ||
if (_bnod > _anod) | ||
_sign = + half_sign ( | ||
(double*) _PPOS, | ||
(double*) _APOS, | ||
(double*) _BPOS, | ||
(double ) _rtol) ; | ||
(double*) _BPOS) ; | ||
else | ||
_sign = - half_sign ( | ||
(double*) _PPOS, | ||
(double*) _BPOS, | ||
(double*) _APOS, | ||
(double ) _rtol) ; | ||
(double*) _APOS) ; | ||
|
||
/*-------- "fatten" dual cavity to filter imprecision */ | ||
if (_sign >= -_rtol && | ||
_sign <= +_rtol) | ||
_safe = false; | ||
|
@@ -265,7 +245,7 @@ | |
iptr_type &_part | ||
) | ||
{ | ||
real_type const _rEPS = | ||
real_type static const _rEPS = | ||
std::pow(std::numeric_limits | ||
<real_type>::epsilon(),+.67); | ||
|
||
|
@@ -417,17 +397,20 @@ | |
_pred._list.tend() ; | ||
++_iter ) | ||
{ | ||
if (clip_dual(_mesh, _hset , | ||
&_iter->pval( 0), _safe, | ||
_RTOL) ) | ||
if (clip_dual( _mesh, _hset , | ||
&_iter->pval( 0), | ||
_safe, _RTOL) ) | ||
{ | ||
/*--------------------------- dist to face circumball */ | ||
real_type _dsqr = | ||
geometry::lensqr_2d( | ||
_ebal , | ||
&_iter->pval( 0)) ; | ||
|
||
if(!_safe && _dsqr > _RTOL) | ||
real_type _dtol = | ||
(real_type) 1./3. * _ebal[2] ; | ||
|
||
if(!_safe && _dsqr > _dtol) | ||
/*--------------------------- prune near-degeneracies */ | ||
continue ; | ||
|
||
|
Oops, something went wrong.