Giter Club home page Giter Club logo

jigsaw's Introduction

JIGSAW: An unstructured mesh generator

JIGSAW is an unstructured mesh generator and tessellation library; designed to generate high-quality triangulations and polyhedral decompositions of general planar, surface and volumetric domains. JIGSAW includes refinement-based algorithms for the construction of new meshes, optimisation-driven techniques for the improvement of existing grids, as well as routines to assemble (restricted) Delaunay tessellations, Voronoi complexes and Power diagrams.

This package provides the underlying c++ source for JIGSAW; defining a basic command-line interface and a c-format API. Higher-level scripting interfaces, supporting a range of additional facilities for file I/O, mesh visualisation and post-processing operations are also available, including for MATLAB / OCTAVE here and for PYTHON here.

JIGSAW is compiled and tested on various 64-bit Linux, Windows and MacOS platforms using the g++, clang++ and msvc compilers.

Code Structure

JIGSAW is written as a header-only library in c++. Both a basic command-line interface and a c-format API are defined:

  JIGSAW::
  ├── src -- JIGSAW src code
  ├── inc -- JIGSAW header files (for libjigsaw)
  ├── bin -- JIGSAW's exe binaries live here
  ├── lib -- JIGSAW's lib binaries live here
  ├── geo -- geometry definitions and input data
  ├── out -- default folder for JIGSAW output
  └── uni -- unit tests and libjigsaw example programs

Getting Started

The first step is to compile and configure the code! JIGSAW can either be built directly from src, or installed using the conda package manager.

Building from src

The full JIGSAW src can be found in ../jigsaw/src/. 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.

JIGSAW consists of several pieces: (a) a set of command-line utilities that read and write mesh data from/to file, and (b) a shared library, accessible via a c-format API.

Using cmake

JIGSAW can be built using the cmake utility. To build, follow the steps below:

* Clone or download this repository.
* Navigate to the root `../jigsaw/` directory.
* Make a new temporary directory BUILD.
* cd build
* cmake .. -DCMAKE_BUILD_TYPE=BUILD_MODE
* cmake --build . --config BUILD_MODE --target install EXTRAS
* Delete the temporary BUILD directory.

This process will build a series of executables and shared libraries: jigsaw itself - the main command-line meshing utility, tripod - JIGSAW's tessellation infrastructure, marche - a fast-marching solver designed to optimise mesh-spacing configurations, as well as libjigsaw - JIGSAW's shared API.

BUILD_MODE can be used to select different compiler configurations and should generally either be Release or Debug. EXTRAS can be used to pass additional compile-time arguments, for example -- -j 4 will build in parallel on supported architectures.

See example.jig for documentation on calling the command-line executables, and the headers in ../jigsaw/inc/ for details on the API.

Using conda

JIGSAW is also available as a conda environment. To install and use, follow the steps below:

* Ensure you have conda installed. If not, consider miniconda as a lightweight option.
* Add conda-forge as a channel: conda config --add channels conda-forge
* Create a jigsaw environment: conda create -n jigsaw jigsaw

Each time you want to use JIGSAW simply activate the environment using: conda activate jigsaw

Once activated, the various JIGSAW command-line utilities will be available in your run path, JIGSAW's shared library (libjigsaw) will be available in your library path and its include files in your include path.

CMD-line Examples

After compiling the code, try running the following command-line example to get started:

On WIN platforms:

\bin\jigsaw.exe example.jig

On LNX platforms:

/bin/jigsaw     example.jig

In this example, a high-quality tetrahedral mesh is generated for the 'stanford-bunny' geometry and the result written to file. The input geometry is specified as a triangulated surface, and is read from ../jigsaw/geo/bunny.msh. The volume and surface mesh outputs are written to ../jigsaw/out/bunny.msh. See the example.jig text-file for a description of JIGSAW's configuration options.

A repository of additional surface models generated using JIGSAW can be found here. A description of the *.jig and *.msh input file formats can be found in the wiki.

libJIGSAW Scripts

A set of unit-tests and libjigsaw example programs are contained in ../jigsaw/uni/. The JIGSAW-API is documented via the header files in ../jigsaw/inc/.

The unit-tests can be built using the cmake utility. To build, follow the steps below:

* Navigate to the `../jigsaw/uni/` directory.
* Make a new temporary directory BUILD.
* cd build
* cmake .. -DCMAKE_BUILD_TYPE=BUILD_MODE
* cmake --build . --config BUILD_MODE --target install EXTRAS
* Delete the temporary BUILD directory.

This process will build the unit-tests as a series of executables in ../jigsaw/uni/. BUILD_MODE is a compiler configuration flag: either Release or Debug. EXTRAS can be used to pass additional compile-time arguments.

Contributors

  1. @dengwirda is JIGSAW's developer and maintainer --- this work was originally the focus of my PhD at the University of Sydney.
  2. @xylar contributed the cmake build system and conda environment.
  3. @tunnellm extended the sequential optimisation algorithms to support thread-parallelism.

License

This program may be freely redistributed under the condition that the copyright notices (including this entire header) are not removed, and no compensation is received through use of the software. Private, research, and institutional use is free. You may distribute modified versions of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. Distribution of this code as part of a commercial system is permissible ONLY BY DIRECT ARRANGEMENT WITH THE AUTHOR. (If you are not directly supplying this code to a customer, and you are instead telling them how they can obtain it for free, then you are not required to make any arrangement with me.)

DISCLAIMER: Neither I nor THE CONTRIBUTORS warrant this code in any way whatsoever. This code is provided "as-is" to be used at your own risk.

THE CONTRIBUTORS include: (a) The University of Sydney (b) The Massachusetts Institute of Technology (c) Columbia University (d) The National Aeronautics & Space Administration (e) Los Alamos National Laboratory

References

There are a number of publications that describe the algorithms used in JIGSAW in detail. If you make use of JIGSAW in your work, please consider including a reference to the following:

[1] - Darren Engwirda: Generalised primal-dual grids for unstructured co-volume schemes, J. Comp. Phys., 375, pp. 155-176, https://doi.org/10.1016/j.jcp.2018.07.025, 2018.

[2] - Darren Engwirda, Conforming Restricted Delaunay Mesh Generation for Piecewise Smooth Complexes, Procedia Engineering, 163, pp. 84-96, https://doi.org/10.1016/j.proeng.2016.11.024, 2016.

[3] - Darren Engwirda, Voronoi-based Point-placement for Three-dimensional Delaunay-refinement, Procedia Engineering, 124, pp. 330-342, http://dx.doi.org/10.1016/j.proeng.2015.10.143, 2015.

[4] - Darren Engwirda, David Ivers, Off-centre Steiner points for Delaunay-refinement on curved surfaces, Computer-Aided Design, 72, pp. 157-171, http://dx.doi.org/10.1016/j.cad.2015.10.007, 2016.

[5] - Darren Engwirda, Locally-optimal Delaunay-refinement and optimisation-based mesh generation, Ph.D. Thesis, School of Mathematics and Statistics, The University of Sydney, http://hdl.handle.net/2123/13148, 2014.

jigsaw's People

Contributors

dengwirda avatar ofzach avatar xylar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jigsaw's Issues

"Non-refinable" faces

Try to add support for "non-refinable" edge / face initial conditions. This would be useful when seeking to preserve compatibility between disjoint meshes / data / etc.

This won't always be possible in the rDT framework (such edges / faces would have to actually be present in the DT) but would still be useful in many practical cases. Given a sufficiently dense boundary sampling (especially for edges) such constraints should appear in a conforming DT sense.

Could print warnings at initialisation if edges / faces not recovered in the rDT?

Boundary Markers for boundary condition

Hi Dr. Engwirda,

I'm hoping to use the Jigsaw as a mesh generator for my FEM simulator. I'm trying to change the edge index in the input file (Square.msh), see 0,1,2,3 in the input *msh file. But nothing changes in the output mesh file.

Is there any way to define the boundary markers in Jigsaw?

Square.msh geometry file

mshid=1
ndims=2
point=4
0;0;0
1;0;0
1;1;0
0;1;0
edge2=4
0;1;0
1;2;1
2;3;2
3;0;3

Square.jig config. file;

GEOM_FILE=jigsaw/geo/Square.msh
HFUN_HMAX=0.6
MESH_DIMS=2
MESH_FILE=jigsaw/out/Square.msh
MESH_KERN=delfront

Square.msh; created by JIGSAW VERSION 0.9.5

MSHID=3;EUCLIDEAN-MESH
NDIMS=2
POINT=9
1.0000000000000000e+00;1.0000000000000000e+00;0
0.0000000000000000e+00;0.0000000000000000e+00;0
1.0000000000000000e+00;0.0000000000000000e+00;0
0.0000000000000000e+00;1.0000000000000000e+00;0
5.0000000000000000e-01;1.0000000000000000e+00;0
1.0000000000000000e+00;5.0000000000000000e-01;0
0.0000000000000000e+00;5.0000000000000000e-01;0
5.0000000000000000e-01;0.0000000000000000e+00;0
5.0000000000000000e-01;5.0000000000000000e-01;0
EDGE2=8
2;5;0
2;7;0
3;4;0
1;6;0
0;4;0
3;6;0
0;5;0
1;7;0
TRIA3=8
0;4;5;0
6;7;8;0
7;5;8;0
4;6;8;0
2;5;7;0
5;4;8;0
4;3;6;0
6;1;7;0

jigsaw_load_msh_t function doesn't read vert3 coordinate data

Steps to reproduce:

  1. Produce msh file with NDIMS=3 (e.g. one of the OCTAVE example scripts)
  2. Use C-API to read file
constexpr auto filename = "MESH-3.msh";
jigsaw_msh_t handle;
jigsaw_init_msh_t(&handle);
jigsaw_load_msh_t(const_cast<char*>(filename), &handle);
  1. Check coordinates
std::cout << handle._vert3._data[0]._ppos[0] << '\n';  // output is 0, but probably undefined

The issue:

When you try reading a msh file with NDIMS=3, the point coordinates aren't read by jigsaw_load_msh_t::msht_reader::push_point because the bounds check refers to _vert2._size instead of _vert3._size. Changing this line

if (_ipos < this->_jmsh->_vert2._size)

fixes the problem.

Cheers

Segmentation fault when using jigsaw > 0.9.12

I am installing jigsaw using conda. When I try to execute a *.jig file I consistently get a segmentation fault. This happens with all of the following versions:

  • 0.9.13
  • 0.9.13.1
  • 0.9.14

Version 0.9.12 works fine though.

I also tried to compile from source (linux x64) and I still get a segmentation fault.

To be honest, I am not sure if there is some issue with the input files I use though... In case they are of help the input files can be found in this gist

The output is:

#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.15

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = jigsaw-geo.msh
  MESH-FILE = jigsaw.msh
  HFUN-FILE = 
  INIT-FILE = 
  TRIA-FILE = 
  BNDS-FILE = 

  GEOM-SEED = 8
  GEOM-PHI1 = 6.00e+01
  GEOM-PHI2 = 6.00e+01
  GEOM-ETA1 = 4.50e+01
  GEOM-ETA2 = 4.50e+01
  GEOM-FEAT = TRUE

  INIT-NEAR = 1.00e-08

  HFUN-SCAL = ABSOLUTE 
  HFUN-HMAX = inf
  HFUN-HMIN = 0.00e+00

  BNDS-KERN = BND-TRIA 
  MESH-KERN = DELFRONT 
  MESH-TOP1 = TRUE
  MESH-TOP2 = FALSE
  MESH-ITER = MAXINT
  MESH-DIMS = 2
  MESH-SIZ1 = 1.33e+00
  MESH-SIZ2 = 1.31e+00
  MESH-SIZ2 = 1.30e+00
  MESH-EPS1 = 1.00e+00
  MESH-EPS2 = 3.33e-01
  MESH-RAD2 = 1.00e+00
  MESH-RAD3 = 2.05e+00
  MESH-OFF2 = 9.00e-01
  MESH-OFF3 = 1.10e+00
  MESH-SNK2 = 2.00e-01
  MESH-SNK3 = 3.33e-01
  MESH-VOL3 = 0.00e+00

  OPTM-KERN = ODT+DQDX 
  OPTM-ITER = 16
  OPTM-QTOL = 1.00e-04
  OPTM-QLIM = 9.33e-01
  OPTM-ZIP_ = TRUE
  OPTM-DIV_ = TRUE
  OPTM-TRIA = TRUE
  OPTM-DUAL = FALSE

  Done. (2.23e-04sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (6.31e-04sec)

#------------------------------------------------------------

  Forming GEOM data...

  GEOM data summary...

  EUCLIDEAN-MESH

  |NDIMS.| = 2

  |COORD.| = 513
  |EDGE-2| = 513

  |SEEDS.| = 0

  |BOUND.| = 0 (0) 

  Done. (2.66e-04sec)

#------------------------------------------------------------

  Forming HFUN data...

  HFUN data summary...

  CONSTANT-VALUE

  .VAL(H). = inf

  Done. (7.00e-06sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2| 
#------------------------------------------------------------
[1]    89693 segmentation fault (core dumped)  jigsaw jigsaw.jig

Add support for "small" arcs on ellipsoid

Currently, ellipsoidal-mesh geometry is defined in terms of "great ellipses". It'd be nice to add support for "small ellipse" arc definitions too, to support, e.g. arcs of constant latitude, etc.

Could do this (perhaps?) by introducing a new edge3 element type, where the 3rd node could be used to determine the plane the arc is inscribed on.

Improve refinement rules

Revisit rDT refinement rules:

  1. Refine boundary facets until their nodes span a common boundary contour. Such contours should be pre-processed from the geometry, being either: topologically disconnected, (piecewise) separated by sharp features, or by different IDtags. Perhaps other things too?

  2. Support interior mesh selection by reachability to user-defined seed points, as well as current in-polyhedron strategy.

  3. Support meshing of domains defined by (even more) inconsistent geometries: especially those that have not been properly intersected, etc.

unit test 6

When I run unit test 6 from dev as part of building/testing the conda package, I get:

test_6: /home/xylar/miniconda3/conda-bld/jigsaw_1561112951683/work/src/libcpp/containers/fixed_array.hpp:190: containers::fixed_array<D, L>::data_type& containers::fixed_array<D, L>::operator[](containers::fixed_array<D, L>::size_type) [with D = int; long unsigned int L = 2; containers::fixed_array<D, L>::data_type = int; containers::fixed_array<D, L>::size_type = long unsigned int]: Assertion `(_pos >= +0 && _pos < _size && "fixed_array[]: out of range!")' failed.

Any idea what's going wrong? I'm going to disable this unit test for now.

Better error handlers

Review error handlers at I/O: unspecified files/objects, empty files/objects, etc...

Possible to mesh a volume geometry with internal surface

Dear Dr. Engwirda:
Thanks for your work, I have two problems.
(1) For a volume geometry with internal surface, like a box with a card in it, does it possible to be meshed using jigsaw. The image and file in format of stl are as follows.

(2) The code of Jigsaw is a little advanced for me. I am on a heavy study to under stand the code. Would you please add an example of using load file in the uni-test.

Best regards,

stl file link: https://github.com/GeoGroup/DigiSim/blob/master/mesh.stl
1
2

control option question

Hi Darren,

I am having an issue when creating a grid with given boundary. It will sometimes cross the boundary to create a shortcut. See image below. Anyway that I can avoid that, maybe a flag that I am not familiar with. My configuration is

HFUN_SCAL = ABSOLUTE
HFUN_HMAX = Inf
HFUN_HMIN = 0.0
MESH_DIMS = 2
MESH_TOP1 = TRUE
MESH_EPS1 = 1.0
MESH_RAD2 = 1
GEOM_FEAT = TRUE

In the figure, in red dots, the input geometry and in yellow x that supposed boundary nodes that are wrong due to the highlighted element.

Figure 13

Preserving input points and edges in the resulting mesh, without resampling of the input

Hello @darren,

I recently checked out JIGSAW and played around with some random shapes. I should first say that you did a really good work! And I hope that you can keep maintaining it!

Now I have some problems to set up JIGSAW so it will not resample the input boundaries and use the points on the boundaries in the resulting mesh. Here is the output of JIGSAW:

steiner_points

What I would like to have is that JIGSAW preserves the input points (the small ones in black) on the boundary in the results, and no resample of the boundaries.

I roughly read the documentation in the source code but could find relevant information. Could you please kindly help?

Many thanks in advance!
Niko

Can Jiasaw be used as head-only libaray

Dear Dr.Darren Engwirda:

The mesh quality of Jigsaw is vey high. I want to use the jigsaw to generate a mesh. It is OK to used the lib and dll after the complied. Does the Jigsaw can be used like the way of Eigen that I can put the code in the include path and use it without the compilation?
Many thanks for giving a excellent tool!

Meng

How can I compile it with my code as header-only?(don't need to linked to the library)

Dear developer:
Jigsaw is a very excellent mesh generation library! I use it to generate meshes before finite element calculation. I am not a programmer, but a mechanics researcher. I often use MATLAB language instead of C++ language in my work. I'm just a C++ beginner. Although there is a MATLAB version of jigsaw-matlab, generating a large number of nodes and units (millions) will spend a lot of time on file i/o, so I want to compile jigsaw into mex function. How can I get it?
I use VS2017 and MATLAB R2021a.

Tag for 0.9.8 produces meshes that say they're using JIGSAW 0.9.9

I think the tag 0.9.8 should probably have been 0.9.9 based on the version number that appears in the generated meshes and is in version.txt. It might be worth making the 0.9.9 tag and pointing it to the same commit. I wouldn't delete the 0.9.8 tag because that would likely cause problems. Deleting or modifying tags (even if they're wrong) is frowned upon.

question regarding output

Hi Darren, I was wondering if jigsaw has an option (or it could be easy to implement) to return the index of the boundary nodes on a planar grid with specified boundaries.

Configuration option

Hi Darren,

is there an option to force jigsaw not to create orphan elements like the one in the attached picture?

Figure 4-2

Mask-out cells in MARCHE

Is it possible to define a mask for structured grid inputs to marche? This would allow things like "land" boundaries to be embedded.

It should be possible to simply "disallow" certain points / cells to be updated in the fast-marching loop, which should lead to quasi-geodesic solutions around masked boundaries...

mesh_top1 and large numbers of geometric model edges/points

Hello,

I'm trying to generate a mesh using jigsaw with a geometric model that has roughly 16k edges and hitting problems with memory consumption and runtime when enabling mesh_top1.

The test repo here:

https://github.com/cwsmith/jigsaw_gis/tree/519e7e1437fbabbbe3037cee4212721f079bddb4

contains gis.py that loads the geometric model (.msh) and size field (hfun) and runs jigsaw in a few seconds to generate a mesh of 358k triangles that doesn't exactly 'recover' the geometric model edges/vertices in the resulting mesh as mesh_top1 is disabled.

When I add opts.mesh_top1 = True to gis.py jigsaw runs out of memory on a gnu/linux machine with 64GB of RAM after about 10mins. The log from the failed run is pasted below.

I'm a novice jigsaw user and am concerned I have a problematic combination of settings and mesh size field that is causing the large memory usage and long runtime. Do you see anything obviously wrong? Any suggestions are appreciated.

Thank you.


verbose output from failed run

Call libJIGSAW: gis                                                                                                                                           
                                                                                                                                                              
#------------------------------------------------------------                                                                                                  
#                                                                                                                                                             
#   ,o, ,o,       /                                                                                                                                           
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    /                                                                                                            
#   888 888 88   88 C888         88b Y88b  d8b  /                                                                                                             
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/                                                                                                              
#   888 888  /        888D C88   888   Y8/  Y8/                                                                                                                
#   88P 888 Cb      \_88P   "8b_-888    Y    Y                                                                                                                
# \_8"       Y8""8D                                                                                                                                           
#                                                                                                                                                             
#------------------------------------------------------------                                                                                                 
# JIGSAW: an unstructured mesh generation library.                                                                                                            
#------------------------------------------------------------                                                                                                 
                                                                                                                                                              
  JIGSAW VERSION 1.0.0                                                         
                                                                                                                                                              
  Reading CFG. data...                                                         
                                                                               
  CFG. data summary...                                                                                                                                                                                                                                                                                                       

  GEOM-FILE =                                                                                                                                                 
  MESH-FILE =                                                                                                                                                 
  HFUN-FILE =                                                                                                                                                 
  INIT-FILE =                                                                                                                                                 
  TRIA-FILE =                                                                                                                                                 
  BNDS-FILE =                                                                                                                                                 

  NUMTHREAD = 20                                                                                                                                              

  GEOM-SEED = 8                                                                                                                                               
  GEOM-PHI1 = 6.00e+01                                                                                                                                        
  GEOM-PHI2 = 6.00e+01                                                                                                                                        
  GEOM-ETA1 = 5.00e+00                                                                                                                                        
  GEOM-ETA2 = 5.00e+00                                                                                                                                        
  GEOM-FEAT = TRUE                                                                                                                                            

  INIT-NEAR = 1.00e-08                                                                                                                                        

  HFUN-SCAL = ABSOLUTE                                                                                                                                        
  HFUN-HMAX = inf                                                                                                                                             
  HFUN-HMIN = 0.00e+00                                                                                                                                        

  BNDS-KERN = BND-TRIA                                                                                                                                        
  MESH-KERN = DELFRONT                                                                                                                                        
  MESH-TOP1 = TRUE                                                                                                                                            
  MESH-TOP2 = FALSE                                                                                                                                           
  MESH-ITER = MAXINT                                                                                                                                          
  MESH-DIMS = 2                                                                                                                                               
  MESH-SIZ1 = 1.33e+00                                                                                                                                        
  MESH-SIZ2 = 1.31e+00                                                                                                                                        
  MESH-SIZ2 = 1.30e+00                                                                                                                                        
  MESH-EPS1 = 3.33e-01                                                                                                                                        
  MESH-EPS2 = 3.33e-01                                                                                                                                        
  MESH-RAD2 = 1.05e+00                                                                                                                                        
  MESH-RAD3 = 2.05e+00                                                                                                                                        
  MESH-OFF2 = 9.00e-01                                                                                                                                        
  MESH-OFF3 = 1.10e+00                                                                                                                                        
  MESH-SNK2 = 2.00e-01                                                                                                                                        
  MESH-SNK3 = 3.33e-01                                                                                                                                        
  MESH-VOL3 = 0.00e+00                                                                                                                                        

  OPTM-KERN = ODT+DQDX                                                                                                                                        
  OPTM-ITER = 16                                                                                                                                              
  OPTM-COST = AREA-LEN                                                                                                                                        
  OPTM-BETA = 4.95e-01                                                                                                                                        
  OPTM-ZETA = 8.25e-01                                                                                                                                        
  OPTM-QTOL = 1.00e-04                                                                                                                                        
  OPTM-QLIM = 9.38e-01                                                                                                                                        
  OPTM-ZIP_ = TRUE                                                                                                                                            
  OPTM-DIV_ = TRUE                                                                                                                                            
  OPTM-TRIA = TRUE                                                                                                                                            
  OPTM-DUAL = FALSE                                                                                                                                           

  Done. (6.90e-05sec)
  
  #------------------------------------------------------------                                                                                                 
                                                                                                                                                              
  Reading GEOM data...                                                                                                                                        
                                                                                                                                                              
  Done. (1.36e-03sec)                                                                                                                                         
                                                                                                                                                              
#------------------------------------------------------------                                                                                                 
                                                                                                                                                              
  Forming GEOM data...                                                                                                                                        

  GEOM data summary...                                                                                                                                        

  EUCLIDEAN-MESH                                                                                                                                              
                                                                                                                                                              
  |NDIMS.| = 2                                                                                                                                                

  |COORD.| = 16675                                                                                                                                            
  |EDGE-2| = 16674                                                                                                                                            
                                                                                                                                                              
  |SEEDS.| = 0                                                                                                                                                
                                                                                                                                                              
  |BOUND.| = 0 (0)                                                                                                                                            
                                                                                                                                                              
  Done. (3.66e-03sec)                                                                                                                                         
                                                                                                                                                              
#------------------------------------------------------------                                                                                                 
                                                                                                                                                              
  Reading HFUN data...                                                                                                                                        
                                                                                                                                                              
  Done. (1.54e-03sec)                                                                                                                                         
                                                                                                                                                              
#------------------------------------------------------------                                                                                                 
                                                                                                                                                              
  Forming HFUN data...                                                                                                                                        

  HFUN data summary...                                                                                                                                        
                                                                                                                                                              
  EUCLIDEAN-GRID                                                                                                                                              
                                                                                                                                                              
  |NDIMS.| = 2                                                                                                                                                
                                                                                                                                                              
  .MIN(H). = 3.00e+03                                                                                                                                         
  .MAX(H). = 3.00e+04                                                                                                                                         
                                                                                                                                                              
  |MASKED| = 0                                                                                                                                                
                                                                                                                                                              
  |XGRID.| = 832                                                                                                                                              
  |YGRID.| = 1408                                                                                                                                             

  Done. (1.15e-03sec)                                                                                                                                         

#------------------------------------------------------------                                                                                                 

  Generate rDT MESH...                                                                                                                                        

#------------------------------------------------------------                                                                                                 
#    |ITER.|      |DEL-1|      |DEL-2|                                                                                                                        
#------------------------------------------------------------                                                                                                 
      10000        16485        28345                                                                                                                         
      25000        16485        58345                                                                                                                         
      50000        16485       108345                                                                                                                         
      75000        16485       158345                                                                                                                         
     100000        16807       207745                                                                                                                         
     250000        25094       472549                                                                                                                         
     500000        25236       930619                                                                                                                         
     750000        25321      1389276                                                                                                                         
    1000000        25496      1847653                                                                                                                         
    2500000        25957      4583110                                                                                                                         
    5000000        26593      9142783                                                                                                                         
    7500000        27115     13692413                                                                                                                         
   10000000        27355     18256201                                                                                                                         
   25000000        28722     45592494                                                                                                                         
   50000000        30873     91114451                                                                                                                         
   75000000        32284    136651641                                                                                                                         
  100000000        33472    182152897                                                                                                                         
  250000000        38587    455269920                                                                                                                         
Terminated                                                                                                                                                    

1. Implementation of hex/wedge/pyramid volume mesh & 2. auto-fix surface normals

Dear developer,
Jigsaw is an excellent mesh tool that I used ever! Thanks for your great contribution! Below are my questions and suggestions.

  1. I notice that Jigsaw currently does not support volume mesh techs (hex/wedge/pyramid) expect quad4. I would appreciate to know that if this feature will be introduced in the near future? In that sense Jigsaw is going to be a great pre-treatment tool as in the Finite Element Analysis field.
  2. When I use Jigsaw to re-mesh and export an STL spatial surface, it seems that Jigsaw cannot auto-fix the surface normal, which leads to failure in offset-to-solid operation. Currently, I use the unifyMeshNormals developed by Sven to solve the problem.

Meshing the entire domain

Hi Darren,

In 2D setting, it seems jigsaw only meshes the regions that is considered "inside." Is there a way of meshing the entire domain? For example, I got the following results by using a number of concentric circles as constraints:

image

However, I need to mesh the entire domain (e.g. the convex hull in this case). Similar to what Shewchuk's triangle outputs:

image

As illustrated here, Shewchuk's triangle may produce undesirable cluster of tiny triangles in a few places. Jigsaw seems to provide higher quality triangulation, but is there a way of meshing the entire domain?

Also, possibly related this, when meshing complex domains, jigsaw sometimes output mesh with tiny holes:

image

Any clue on why is that?

best,
James

Defining geometry

Hi Darren,

I just find this mesher, and not skilled to use. The quality from jigsaw is well.
But I confuse how to define a hole? When i insert a iner ring, sometime get a hole, sometime cannot.
Is there a value to set?

thank you!

Originally posted by @wjlcqjd in #27 (comment)

Add flexibility for initial distribution formats

Should enable reading of initial distributions in various formats, rather than just euclidean-mesh.

  • For ellipsoid-mesh, read in lon-lat and transform to E^3.
  • For euclidean/ellipsoid-grid, read structured arrays and convert to unstructured points, possibly with the coord transform too. Should grids induce topology? Maybe not...

Signed vs unsigned ints

Can unsigned ints be used everywhere? This would ease any signed-to-unsigned conversion issues, but -ve ints are currently used to denote certain flags... Would allow x 2 increase in max mesh size, but might increase size of in-mem. data-structures (to mark constrained faces, etc)?

Would be nice to compile quietly with -Wsigned-conversion -Wfloat-conversion -Wshadow and the equiv. with msvc, clang++, etc.

Better error flags

Make jigsaw return slightly more comprehensive error flags, so that users have a better chance to diagnose what's going on...

    JIGSAW_INVALID_ARGUMENT
    JIGSAW_INVALID_INDEXING
    JIGSAW_INVALID_USEROPTS
    JIGSAW_INVALID_ARRAYDIM

Update documentation to refer to getting JIGSAW through conda-forge

I would recommend giving instructions for how to get JIGSAW from conda-forge.

  • Install miniconda
  • Add conda-forge as a channel: conda config --add channels conda-forge
  • Create a jigsaw environment: conda create -n jigsaw jigsaw

Each time you want to use jigsaw:
conda activate jigsaw
Now jigsaw and tripod are in your run path and libjigsaw is in your library path with its include files in your include path.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.