Skip to content
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
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# jigsaw things
*
!/**/
!*.*
*.exe
*.dll
*.so
*.dylib
cache/*.log
cache/*.jig
cache/*.msh

# python things
__pycache__/
*.py[cod]

jigsawpy/_bin/
jigsawpy/_lib/

build/
develop-eggs/
dist/
eggs/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# data files, etc
*.nc
*.grd
*.vtk
*.off
*.obj
*.stl
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
language: python
python:
- 3.6
- 3.7
- 3.8

os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-8
- g++-8

script:
- export CC=gcc-8
- export CXX=g++-8
- python3 setup.py build_external
- python3 setup.py install
- python3 example.py --IDnumber=0
- python3 example.py --IDnumber=1
- python3 example.py --IDnumber=2
- python3 example.py --IDnumber=3
- python3 example.py --IDnumber=4
- python3 example.py --IDnumber=5
- python3 example.py --IDnumber=6
- python3 example.py --IDnumber=7
- python3 example.py --IDnumber=8
9 changes: 9 additions & 0 deletions external/jigsaw/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# cpp binaries
*
!/**/
!*.*
*.exe
*.dll
*.so
*.dylib

2 changes: 1 addition & 1 deletion external/jigsaw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The first step is to compile and configure the code! `JIGSAW` can either be buil

### `Building from src`

The full `JIGSAW` src can be found in <a href="../master/src/">`../jigsaw/src/`</a>. It has been built using various `c++11` conforming versions of the `g++`, `clang++` and `msvc` compilers.
The full `JIGSAW` src can be found in <a href="../master/src/">`../jigsaw/src/`</a>. It has been built using various `c++17` conforming versions of the `g++`, `clang++` and `msvc` compilers.

`JIGSAW` is a `header-only` package - the single main `jigsaw.cpp` file simply `#include`'s the rest of the library directly. `JIGSAW` does not currently dependent on any external packages or libraries.

Expand Down
4 changes: 2 additions & 2 deletions external/jigsaw/src/hfn_load.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
* Last updated: 26 April, 2020
* Last updated: 30 Sept., 2020
*
* Copyright 2013-2020
* Darren Engwirda
Expand Down Expand Up @@ -2295,7 +2295,7 @@
_jlog.push(" \n") ;

if (_hfun._ellipsoid_grid_3d._wrap)
_jlog.push(" PERIODIC = TRUE") ;
_jlog.push(" PERIODIC = TRUE\n" ) ;

}

Expand Down
6 changes: 3 additions & 3 deletions external/jigsaw/src/jigsaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
* JIGSAW: an unstructured mesh generation library.
--------------------------------------------------------
*
* JIGSAW release 0.9.13.x
* Last updated: 27 July, 2020
* JIGSAW release 0.9.14.x
* Last updated: 30 Sept., 2020
*
* Copyright 2013 -- 2020
* Darren Engwirda
Expand Down Expand Up @@ -187,7 +187,7 @@
--------------------------------------------------------
*/

# define __JGSWVSTR "JIGSAW VERSION 0.9.13"
# define __JGSWVSTR "JIGSAW VERSION 0.9.14"

# if defined( USE_NETCDF)
# define __use_netcdf
Expand Down
10 changes: 8 additions & 2 deletions external/jigsaw/src/libcpp/aabb_tree/aabb_tree_k.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
------------------------------------------------------------
*
* Last updated: 02 April, 2020
* Last updated: 28 Sept., 2020
*
* Copyright 2013-2020
* Darren Engwirda
Expand Down Expand Up @@ -589,23 +589,29 @@
_rnod->_pmin[_idim] ;
}

if (_voll + _volr <= this->_vtol * _volp)
if (_voll + _volr <= _volp * this->_vtol)
{
/*--------------- push children due to vol. ratio */
if (_lnum < _cnum && _rnum < _cnum)
{
this->_work
.push_tail(_rnod);
this->_work
.push_tail(_lnod);
}
}

}
else
{
/*--------------- push children due to items cap. */
if (_lnum < _cnum && _rnum < _cnum)
{
this->_work
.push_tail(_rnod);
this->_work
.push_tail(_lnod);
}
}
}

Expand Down
46 changes: 26 additions & 20 deletions external/jigsaw/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: 14 Sept., 2020
* Last updated: 30 Sept., 2020
*
* Copyright 2013-2020
* Darren Engwirda
Expand Down Expand Up @@ -97,10 +97,14 @@
auto _jptr = _mesh.
node().head() + _eptr->node(1);

_cset.set_count(+0);
_cnew.set_count(+0);
_iset.set_count(+0);
_jset.set_count(+0);
_cset.set_count(
0, containers::loose_alloc);
_cnew.set_count(
0, containers::loose_alloc);
_iset.set_count(
0, containers::loose_alloc);
_jset.set_count(
0, containers::loose_alloc);

_mesh.connect_2(
_enum, EDGE2_tag, _cset) ;
Expand Down Expand Up @@ -140,7 +144,7 @@

_qinc -= (real_type)+1./2. ;

_qinc /= std::cbrt (_iout) ; // no oscl. wrt. zip
_qinc /= std::sqrt (_iout) ; // no oscl. wrt. zip

}
else
Expand Down Expand Up @@ -332,7 +336,8 @@
for (auto _iloc = +0; _iloc != _INUM;
++_iloc )
{
_qtmp.set_count(0) ;
_qtmp.set_count(
+0, containers::loose_alloc);

real_type _minC =
loop_cost( _mesh,
Expand All @@ -350,58 +355,59 @@
}

/*--------------------------------- is cost improved? */
_qdst.set_count(0);
_qdst.set_count(
0, containers::loose_alloc) ;

real_type _QMIN =
loop_cost( _mesh,
_cnew, _qdst, cell_kind ()
) ;
_cnew, _qdst, cell_kind()) ;

move_okay( _qdst, _qsrc, _move,
+1.0 , _qinc) ;
std::sqrt( _QLIM) ,
_qinc) ;

if((_okay = _move > 0 &&
_QMIN >= _qmin+_qinc))
{
/*--------------------------------- delete old cavity */
for (auto _cell = _cset.head();
_cell != _cset.tend();
for (auto _cell = _cset.head() ;
_cell != _cset.tend() ;
++_cell )
{
if (_cell->_kind == TRIA3_tag)
{
_mesh.
_pop_tri3(_cell->_cell);
_pop_tri3(_cell->_cell) ;
}
else
if (_cell->_kind == QUAD4_tag)
{
_mesh.
_pop_quad(_cell->_cell);
_pop_quad(_cell->_cell) ;
}
}
}
else
{
/*--------------------------------- delete new cavity */
for (auto _cell = _cnew.head();
_cell != _cnew.tend();
for (auto _cell = _cnew.head() ;
_cell != _cnew.tend() ;
++_cell )
{
if (_cell->_kind == TRIA3_tag)
{
_mesh.
_pop_tri3(_cell->_cell);
_pop_tri3(_cell->_cell) ;
}
else
if (_cell->_kind == QUAD4_tag)
{
_mesh.
_pop_quad(_cell->_cell);
_pop_quad(_cell->_cell) ;
}
}

_mesh._pop_node ( &_inew ) ;
_mesh._pop_node ( &_inew );
}

# undef NULLHINT
Expand Down
16 changes: 8 additions & 8 deletions external/jigsaw/src/libcpp/iter_mesh/iter_mesh_2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
* Last updated: 12 Sept., 2020
* Last updated: 30 Sept., 2020
*
* Copyright 2013-2020
* Darren Engwirda
Expand Down Expand Up @@ -399,7 +399,7 @@
std::min(_0src, *_iter) ;

_msrc += std::pow(
(real_type)1. / *_iter, +7);
(real_type)1. / *_iter, +9);
}
for (auto _iter = _cdst.head(),
_tend = _cdst.tend();
Expand All @@ -410,20 +410,20 @@
std::min(_0dst, *_iter) ;

_mdst += std::pow (
(real_type)1. / *_iter, +7);
(real_type)1. / *_iter, +9);
}

_qtol *= std::max(_0src, _zero);

_msrc = std::pow(
_csrc.count() / _msrc, +1./7.) ;
_csrc.count() / _msrc, +1./9.0);
_mdst = std::pow(
_cdst.count() / _mdst, +1./7.) ;
_cdst.count() / _mdst, +1./9.0);

_qtol /=
std::pow(_csrc.count(), 1./7.) ;
std::pow(_csrc.count(), 1./9.0);
_qtol /=
std::pow(_cdst.count(), 1./7.) ;
std::pow(_cdst.count(), 1./9.0);

/*---------------------------- test move = "okay" */
if (_0dst >= _GOOD)
Expand Down Expand Up @@ -1653,7 +1653,7 @@
if (MARKNODE(_enod[0])>_imrk) continue ;
if (MARKNODE(_enod[1])>_imrk) continue ;

if (MARKNODE(_enod[0]) < +0 ||
if (MARKNODE(_enod[0]) < +0 &&
MARKNODE(_enod[1]) < +0 ) continue ;

if(!_mesh.find_edge(
Expand Down
Loading