Skip to content

Commit

Permalink
Merge pull request #43 from dengwirda/dev
Browse files Browse the repository at this point in the history
Update to jigsaw-0.9.15.x
  • Loading branch information
dengwirda authored Apr 19, 2021
2 parents 8684fa9 + 1048d18 commit 76b41a0
Show file tree
Hide file tree
Showing 29 changed files with 496 additions and 595 deletions.
5 changes: 3 additions & 2 deletions src/jigsaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
--------------------------------------------------------
*
* JIGSAW release 0.9.15.x
* Last updated: 08 April, 2021
*
* Last updated: 16 April, 2021
*
* Copyright 2013 -- 2021
* Darren Engwirda
Expand Down Expand Up @@ -265,7 +266,7 @@
# include "libcpp/useropts.hpp"

# include "libcpp/rdelmesh.hpp"
# include "libcpp/treemesh.hpp"
// include "libcpp/treemesh.hpp"
# include "libcpp/itermesh.hpp"

extern "C"
Expand Down
24 changes: 10 additions & 14 deletions src/jigsaw.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* JIGSAW: an unstructured mesh generation library.
--------------------------------------------------------
*
* Last updated: 16 July, 2020
* Last updated: 16 Apr., 2021
*
* Copyright 2013 -- 2020
* Copyright 2013 -- 2021
* Darren Engwirda
* [email protected]
* https://github.com/dengwirda
Expand Down Expand Up @@ -1059,15 +1059,13 @@

# ifdef __use_timers
typename std ::chrono::
high_resolution_clock::
time_point _ttic ;
high_resolution_clock::time_point _ttic ;
typename std ::chrono::
high_resolution_clock::
time_point _ttoc ;
high_resolution_clock::time_point _ttoc ;
typename std ::chrono::
high_resolution_clock _time;
high_resolution_clock _time ;

__unreferenced(_time) ;
__unreferenced(_time) ; // why does MSVC need this??
# endif//__use_timers

/*--------------------------------- init. geo. kernel */
Expand Down Expand Up @@ -1495,15 +1493,13 @@

# ifdef __use_timers
typename std ::chrono::
high_resolution_clock::
time_point _ttic ;
high_resolution_clock::time_point _ttic ;
typename std ::chrono::
high_resolution_clock::
time_point _ttoc ;
high_resolution_clock::time_point _ttoc ;
typename std ::chrono::
high_resolution_clock _time;
high_resolution_clock _time ;

__unreferenced(_time) ;
__unreferenced(_time) ; // why does MSVC need this??
# endif//__use_timers

/*--------------------------------- init. geo. kernel */
Expand Down
21 changes: 16 additions & 5 deletions src/libcpp/geom_type/geom_mesh_ellipsoid_3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
* Last updated: 14 Apr., 2021
* Last updated: 17 Apr., 2021
*
* Copyright 2013-2021
* Darren Engwirda
Expand Down Expand Up @@ -683,8 +683,8 @@
if (_opts.dims() < +3)
{
/*------------------------- point at ellipsoid centre */
real_type _ppos[4] ;
iptr_type _inod;
real_type _ppos[4];
iptr_type _inod = -1;
_ppos[0] = (real_type) +0.0E+0 ;
_ppos[1] = (real_type) +0.0E+0 ;
_ppos[2] = (real_type) +0.0E+0 ;
Expand Down Expand Up @@ -809,8 +809,8 @@

real_type _lo = 2.*_pi / 10. ;

real_type _ppos[4] ;
iptr_type _inod;
real_type _ppos[4];
iptr_type _inod = -1;
_ppos[0] = this->_radA *
std::cos(_pi*(real_type)+0.0) *
std::cos(_pi*(real_type)+0.5) ;
Expand Down Expand Up @@ -840,6 +840,7 @@
_ppos[2] = this->_radC *
std::sin(_pi*(real_type)-0.5) ;
_ppos[3] = (real_type)+0.0;
_inod = -1 ;
_rdel.
_tria.push_node(_ppos, _inod) ;
_rdel.
Expand All @@ -860,6 +861,7 @@
_ppos[2] = this->_radC *
std::sin(_la*(real_type)+1.0) ;
_ppos[3] = (real_type)+0.0;
_inod = -1 ;
_rdel.
_tria.push_node(_ppos, _inod) ;
_rdel.
Expand All @@ -880,6 +882,7 @@
_ppos[2] = this->_radC *
std::sin(_la*(real_type)-1.0) ;
_ppos[3] = (real_type)+0.0;
_inod = -1 ;
_rdel.
_tria.push_node(_ppos, _inod) ;
_rdel.
Expand All @@ -900,6 +903,7 @@
_ppos[2] = this->_radC *
std::sin(_la*(real_type)+1.0) ;
_ppos[3] = (real_type)+0.0;
_inod = -1 ;
_rdel.
_tria.push_node(_ppos, _inod) ;
_rdel.
Expand All @@ -920,6 +924,7 @@
_ppos[2] = this->_radC *
std::sin(_la*(real_type)-1.0) ;
_ppos[3] = (real_type)+0.0;
_inod = -1 ;
_rdel.
_tria.push_node(_ppos, _inod) ;
_rdel.
Expand All @@ -940,6 +945,7 @@
_ppos[2] = this->_radC *
std::sin(_la*(real_type)+1.0) ;
_ppos[3] = (real_type)+0.0;
_inod = -1 ;
_rdel.
_tria.push_node(_ppos, _inod) ;
_rdel.
Expand All @@ -960,6 +966,7 @@
_ppos[2] = this->_radC *
std::sin(_la*(real_type)-1.0) ;
_ppos[3] = (real_type)+0.0;
_inod = -1 ;
_rdel.
_tria.push_node(_ppos, _inod) ;
_rdel.
Expand All @@ -980,6 +987,7 @@
_ppos[2] = this->_radC *
std::sin(_la*(real_type)+1.0) ;
_ppos[3] = (real_type)+0.0;
_inod = -1 ;
_rdel.
_tria.push_node(_ppos, _inod) ;
_rdel.
Expand All @@ -1000,6 +1008,7 @@
_ppos[2] = this->_radC *
std::sin(_la*(real_type)-1.0) ;
_ppos[3] = (real_type)+0.0;
_inod = -1 ;
_rdel.
_tria.push_node(_ppos, _inod) ;
_rdel.
Expand All @@ -1020,6 +1029,7 @@
_ppos[2] = this->_radC *
std::sin(_la*(real_type)+1.0) ;
_ppos[3] = (real_type)+0.0;
_inod = -1 ;
_rdel.
_tria.push_node(_ppos, _inod) ;
_rdel.
Expand All @@ -1040,6 +1050,7 @@
_ppos[2] = this->_radC *
std::sin(_la*(real_type)-1.0) ;
_ppos[3] = (real_type)+0.0;
_inod = -1 ;
_rdel.
_tria.push_node(_ppos, _inod) ;
_rdel.
Expand Down
2 changes: 1 addition & 1 deletion src/libcpp/geom_type/geom_mesh_euclidean_2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
* Last updated: 01 Feb., 2021
* Last updated: 17 Apr., 2021
*
* Copyright 2013-2021
* Darren Engwirda
Expand Down
2 changes: 1 addition & 1 deletion src/libcpp/geom_type/geom_mesh_euclidean_3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
* Last updated: 01 Feb., 2021
* Last updated: 17 Apr., 2021
*
* Copyright 2013-2021
* Darren Engwirda
Expand Down
6 changes: 3 additions & 3 deletions src/libcpp/iter_mesh/iter_mesh_2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1842,11 +1842,11 @@

# ifdef __use_timers
typename std ::chrono::
high_resolution_clock::time_point _ttic;
high_resolution_clock::time_point _ttic ;
typename std ::chrono::
high_resolution_clock::time_point _ttoc;
high_resolution_clock::time_point _ttoc ;
typename std ::chrono::
high_resolution_clock _time;
high_resolution_clock _time ;

__unreferenced(_time) ; // why does MSVC need this??
# endif//__use_timers
Expand Down
14 changes: 10 additions & 4 deletions src/libcpp/iter_mesh/iter_zips_2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
*
--------------------------------------------------------
*
* Last updated: 27 Dec., 2020
* Last updated: 16 Apr., 2021
*
* Copyright 2013-2020
* Copyright 2013-2021
* Darren Engwirda
* [email protected]
* https://github.com/dengwirda/
Expand Down Expand Up @@ -73,7 +73,7 @@
real_type _lmax
= (real_type) +8.00E-01 ,
real_type _qinc
= (real_type) +1.00E-03
= (real_type) +1.00E-02
)
{
iptr_type static constexpr
Expand Down Expand Up @@ -160,12 +160,18 @@
// zip, make it easier to do so!

real_type _qerr =
(real_type)-1./8. *
(real_type)-2./16. *
std::max(_ierr, _jerr);

real_type _lerr =
(real_type)+1./16. *
std::max(_ierr, _jerr);

if (2 * _nerr < _iabs + _jabs)
{
_qinc = std::min(_qinc, _qerr);
_lmax = std::max(_lmax,
_lmax+ _lerr);
}

/*--------------------------------- get edge h-sizing */
Expand Down
8 changes: 4 additions & 4 deletions src/libcpp/rdel_mesh/rdel_base_2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@

/*--------------------------- find loc. intersections */
mesh::keep_all_2d <
real_type,
real_type,
iptr_type > _pred;

if(!_geom.intersect(_line, _pred) )
Expand All @@ -340,7 +340,7 @@
&_mesh._tria.tria(_tadj)->circ(0),
&_mesh._tria.node(
_enod[1])->pval(0)) ;

_radj += geometry::lensqr_2d (
&_mesh._tria.tria(_tadj)->circ(0),
&_mesh._tria.node(
Expand All @@ -350,12 +350,12 @@
&_mesh._tria.tria(_topp)->circ(0),
&_mesh._tria.node(
_onod[0])->pval(0)) ;

_radj += geometry::lensqr_2d (
&_mesh._tria.tria(_topp)->circ(0),
&_mesh._tria.node(
_onod[1])->pval(0)) ;

_radj += geometry::lensqr_2d (
&_mesh._tria.tria(_topp)->circ(0),
&_mesh._tria.node(
Expand Down
4 changes: 2 additions & 2 deletions src/libcpp/rdel_mesh/rdel_base_3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@
_flat._nvec[2] = _evec[2] ;

mesh::keep_all_3d <
real_type ,
real_type ,
iptr_type > _pred ;

if(!_geom.intersect(_flat, _pred) )
Expand Down Expand Up @@ -767,7 +767,7 @@

/*--------------------------- calc. intersection halo */
mesh::keep_all_3d <
real_type ,
real_type ,
iptr_type > _pred;

if(!_geom.intersect(_line, _pred) )
Expand Down
13 changes: 8 additions & 5 deletions src/libcpp/rdel_mesh/rdel_create_init_2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
* Last updated: 24 Feb., 2021
* Last updated: 17 Apr., 2021
*
* Copyright 2013-2021
* Darren Engwirda
Expand Down Expand Up @@ -82,7 +82,6 @@
{
if (_node->mark() >= +0)
{

_bbox.push_tail() ;
_bbox.tail()->
pval(0) = _node->pval(0) ;
Expand All @@ -91,7 +90,6 @@

_bbox.tail()->
ipos () = _npos ;

}
}

Expand Down Expand Up @@ -296,12 +294,16 @@
}

/*------------------------------ seed node from init. */
iptr_type _base =
_mesh._tria._nset.count () ;

if (_imid > -1)
{
auto _node =
&_init._mesh. node ( _imid) ;

iptr_type _npos = -1 ;
iptr_type _npos =
_base+_imid - 0 ;
iptr_type _near = -1 ;

if (_node->itag () >= +0 )
Expand Down Expand Up @@ -382,8 +384,9 @@
auto _node =
&_init._mesh . node(*_iter) ;

iptr_type _npos =
*_iter+_base - 0 ;
iptr_type _near = -1 ;
iptr_type _npos = -1 ;

if (_node->itag () >= +0 )
_geom.projector(
Expand Down
Loading

0 comments on commit 76b41a0

Please sign in to comment.