diff --git a/README.md b/README.md
index 9641d91..ac187e7 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
`JIGSAW` is a computational library for unstructured mesh generation and tessellation; 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`. A `MATLAB` / `OCTAVE` based scripting interface, including a range of additional facilities for file I/O, mesh visualisation and post-processing operations can be found here.
+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` has been compiled and tested on various `64-bit` `Linux`, `Windows` and `MacOS` based platforms.
@@ -20,8 +20,8 @@ This package provides the underlying `C++` source for `JIGSAW`; defining a basic
JIGSAW::
├── src -- JIGSAW src code
├── inc -- JIGSAW header files (for libjigsaw)
- ├── bin -- put JIGSAW exe binaries here
- ├── lib -- put JIGSAW lib binaries here
+ ├── 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
@@ -32,62 +32,42 @@ 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 `../jigsaw/src/`.
+The full `JIGSAW` src can be found in `../jigsaw/src/`. It has been built using various `C++11` 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`
+### `Using cmake`
`JIGSAW` can be built using the `cmake` utility. To build, follow the steps below:
* Ensure you have the cmake utility installed.
* Clone or download this repository.
* Navigate to the root `../jigsaw/` directory.
- * Create a new temporary directory BUILD (to store the cmake build files).
- * Navigate into the temporary directory.
- * Execute: cmake -D CMAKE_BUILD_TYPE=BUILD_MODE ..
- * Execute: make
- * Execute: make install
- * Delete the temporary directory.
+ * Make a new temporary directory BUILD.
+ * cd build
+ * cmake .. -D CMAKE_BUILD_TYPE=BUILD_MODE
+ * cmake --build . --config BUILD_MODE --target install
+ * Delete the temporary BUILD directory.
-This process will build a series of executables and the shared library: `jigsaw` itself - the main command-line meshing utility, `tripod` - `JIGSAW`'s tessellation infrastructure, as well as `libjigsaw` - `JIGSAW`'s shared `API`. `BUILD_MODE` can be used to select different compiler configurations and should be either `RELEASE` or `DEBUG`.
+This process will build a series of executables and shared libraries: `jigsaw` itself - the main command-line meshing utility, `tripod` - `JIGSAW`'s tessellation infrastructure, 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`.
See `example.jig` for documentation on calling the command-line executables, and the headers in `../jigsaw/inc/` for details on the `API`.
-#### `Using g++ / llvm`
-
-`JIGSAW` has been successfully built using various versions of the `g++` and `llvm` compilers. The build process is a simple one-liner (from `../jigsaw/src/`):
-````
-g++ -std=c++11 -pedantic -Wall -O3 -flto -D NDEBUG
--D __cmd_jigsaw jigsaw.cpp -o ../bin/jigsaw
-````
-will build the main `jigsaw` command-line executable,
-````
-g++ -std=c++11 -pedantic -Wall -O3 -flto -D NDEBUG
--D __cmd_tripod jigsaw.cpp -o ../bin/tripod
-````
-will build the `tripod` command-line utility (`JIGSAW`'s tessellation infrastructure) and,
-````
-g++ -std=c++11 -pedantic -Wall -O3 -flto -fPIC -D NDEBUG
--D __lib_jigsaw jigsaw.cpp -shared -o ../lib/libjigsaw.so
-````
-will build `JIGSAW` as a shared library (`libjigsaw`).
-
-### `Install via conda`
+### `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
+ * 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`
+### `CMD-line Examples`
After compiling the code, try running the following command-line example to get started:
````
@@ -101,23 +81,22 @@ On LNX platforms:
````
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 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`
+### `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.
- * Create a new temporary directory BUILD (to store the cmake build files).
- * Navigate into the temporary directory.
- * Execute: cmake -D CMAKE_BUILD_TYPE=BUILD_MODE ..
- * Execute: make
- * Execute: make install
- * Delete the temporary 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`.
+ * Make a new temporary directory BUILD.
+ * cd build
+ * cmake .. -D CMAKE_BUILD_TYPE=BUILD_MODE
+ * cmake --build . --config BUILD_MODE --target install
+ * 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`.
### `License`
diff --git a/example.jig b/example.jig
index 9d7c6b2..50bd164 100644
--- a/example.jig
+++ b/example.jig
@@ -31,8 +31,6 @@
# ---> GEOM_FILE - 'GEOMNAME.MSH', a string containing the
# name of the geometry file (is required at input).
-# See SAVEMSH for additional details regarding the cr-
-# eation of *.MSH files.
#
GEOM_FILE = geo/bunny.msh
@@ -99,7 +97,7 @@
# ---> GEOM_ETA1 - {default=45deg} 1-dim. feature-angle,
# features are located between any neighbouring
-# "edges" that subtend angles less than ETA1 deg.
+# edges that subtend angles less than ETA1 degrees.
#
# GEOM_ETA1 = 60
@@ -107,7 +105,7 @@
# ---> GEOM_ETA2 - {default=45deg} 2-dim. feature angle,
# features are located between any neighbouring
-# "faces" that subtend angles less than ETA2 deg.
+# faces that subtend angles less than ETA2 degrees.
#
# GEOM_ETA2 = 60
@@ -122,13 +120,15 @@
# name of the mesh-size file (is required at input).
# The mesh-size function is specified as a general pi-
# ecewise linear function, defined at the vertices of
-# an unstructured triangulation. See SAVEMSH for addi-
-# tional details.
+# an unstructured triangulation or on a structured
+# grid.
#
+# HFUN_FILE = *.msh
+
# ---> HFUN_SCAL - {default='relative'} scaling type for
-# mesh-size fuction. HFUN_SCAL='relative' interprets
+# mesh-size function. HFUN_SCAL='relative' interprets
# mesh-size values as percentages of the (mean) length
# of the axis-aligned bounding-box (AABB) associated
# with the geometry. HFUN_SCAL='absolute' interprets
@@ -167,7 +167,7 @@
# MESH_DIMS = 2
-# ---> MESH_KERN - {default='delfront'} meshing kernal,
+# ---> MESH_KERN - {default='delfront'} meshing kernel,
# choice of the standard Delaunay-refinement algorithm
# (KERN='delaunay') or the Frontal-Delaunay method
# (KERN='delfront').
@@ -287,7 +287,7 @@
# ---> MESH_VOL3 - {default=0.00} min. volume-length ratio
# for 3-tria elements. 3-tria elements are refined
# until the volume-length ratio exceeds VOL3. Can be
-# used to supress "sliver" elements.
+# used to suppress "sliver" elements.
#
# MESH_VOL3 = 0.10
diff --git a/geo/lake.msh b/geo/lake.msh
deleted file mode 100644
index 7a697e6..0000000
--- a/geo/lake.msh
+++ /dev/null
@@ -1,611 +0,0 @@
-# lake.msh geometry file
-mshid=1
-ndims=2
-point=303
--8.915414699999999;1.661592;0
--8.884706400000001;1.5538653;0
--8.7270571;1.4396306;0
--8.6780329;1.3310253;0
--8.2763869;1.3642085;0
--7.7589437;1.5521208;0
--7.3399811;1.5866412;0
--7.2064877;1.7400111;0
--6.987161;1.7838988;0
--6.9190874;1.6751018;0
--6.6594362;1.823788;0
--6.4705078;2.0285109;0
--6.3982459;2.0257761;0
--6.1776033;2.1236043;0
--5.9683636;1.9041636;0
--6.0500631;1.6420917;0
--6.2751037;1.4382319;0
--6.2083449;1.2768143;0
--6.3593873;1.1233594;0
--6.4379782;0.9672913;0
--6.4389687;0.940829;0
--6.3308569;0.9103191;0
--5.921668;1.1606956;0
--5.885353;1.1594465;0
--5.5306989;0.88275;0
--5.4571118;0.9068911;0
--5.2776995;0.8218321;0
--4.6882658;1.0696109;0
--4.4325551;1.115784;0
--3.9867787;1.5284986;0
--3.6232783;1.573356;0
--3.5156848;1.5181578;0
--3.1151141;1.6162773;0
--2.6031886;1.9253444;0
--2.4201615;2.0814581;0
--2.0576784;2.182551;0
--1.9469493;2.3929843;0
--1.6564457;2.6016249;0
--1.4385855;2.8113568;0
--1.185718;2.9681802;0
--0.896576;3.2839699;0
--0.4656316;3.4939341;0
--0.0715676;3.6520868;0
-0.3221563;3.5994536;0
-0.6089023;3.4943945;0
-0.6092879;3.3885375;0
-0.3942456;3.3878929;0
-0.2866788;3.4141384;0
-0.0717038;3.3345153;0
-0.0896864;3.2286668;0
-0.1076576;3.1757488;0
--0.1436793;3.01699;0
--0.3235837;2.8584538;0
--0.4676923;2.7529346;0
--0.9391942;2.0668111;0
--1.0495193;1.7498742;0
--1.0882363;1.3531376;0
--1.0158452;1.3262275;0
--0.9424102;1.4845979;0
--0.615238;1.7477533;0
--0.5061946000000001;1.9061816;0
--0.2890742;2.0115316;0
--0.506667;1.7473959;0
--0.6160022000000001;1.5360392;0
--0.397972;1.8000363;0
--0.1808403;1.8525961;0
-0.2894343;1.7998173;0
-0.5431103;1.6681146;0
-0.9058832;1.5373304;0
-0.9432855999999999;1.3258124;0
-1.0534256;1.1147328;0
-1.1641909;0.8507940000000001;0
-1.3109203;0.6930545;0
-1.3117251;0.5871977;0
-1.421469;0.5351345;0
-1.9317215;0.5400872;0
-2.2226054;0.5965222;0
-2.3340522;0.4391798;0
-2.4073552;0.4137156;0
-2.4449497;0.334835;0
-2.5909063;0.3369578;0
-2.6249835;0.4962917;0
-2.7343488;0.4979874;0
-2.8454551;0.3938967;0
-2.936647;0.3954205;0
-2.9201944;0.2892562;0
-2.9931921;0.2905022;0
-3.3135431;0.7199108;0
-3.3863589;0.7213257;0
-3.9960329;1.1315466;0
-4.0705567;1.0538628;0
-4.6490632;1.174476;0
-4.903998;1.1550887;0
-5.4495532;1.1450567;0
-5.9850466;1.4278414;0
-6.1653805;1.4607402;0
-6.3476152;1.4409063;0
-6.6355959;1.5048353;0
-6.5309084;1.3948027;0
-6.4623697;1.2862027;0
-6.4803085;0.8098819;0
-6.4094979;0.7542354;0
-6.410009;0.7012564;0
-6.4882671;0.5981826;0
-6.7068647;0.6065329;0
-6.8546905;0.559329;0
-6.9296957;0.5093111;0
-7.3625916;0.6332439;0
-7.4195041;0.5826584;0
-7.4810256;0.4262426;0
-7.6622;0.4606821;0
-7.7339418;0.4903887;0
-7.6927729;0.5946095;0
-7.6199031;0.5913803;0
-7.5788199;0.6956243;0
-7.4649955;0.7967085;0
-7.4604098;0.9025555;0
-7.6668095;1.176764;0
-7.770946;1.2875089;0
-7.7298813;1.3917132;0
-7.6707366;1.4951115;0
-7.6356734;1.4670289;0
-7.6246141;1.3074531;0
-7.5532118;1.2777792;0
-7.5280861;1.4357493;0
-7.5345391;1.7011603;0
-7.7131429;1.762169;0
-7.8603274;1.7158544;0
-7.9228745;1.9308907;0
-7.7348899;2.0813402;0
-7.3713821;2.1182087;0
-7.2698318;1.9547751;0
-7.1885795;2.1633926;0
-7.1152657;2.1868122;0
-7.0441691;2.15734;0
-6.9336956;2.2058041;0
-6.9676141;2.2602054;0
-7.0648074;2.529299;0
-7.0897106;2.7954185;0
-7.2917362;3.1221593;0
-7.3230152;3.2295634;0
-7.2074219;3.4101256;0
-7.0987913;3.4319941;0
-7.056259;3.5892427;0
-6.8349672;3.7390777;0
-6.5426013;3.8863685;0
-6.3538119;4.1440578;0
-6.6493349;4.7917061;0
-6.5385166;4.8932842;0
-6.7052993;5.1650313;0
-6.7009764;5.2708721;0
-5.7441174;5.2345817;0
-5.5686945;5.1755508;0
-4.788607;5.1509481;0
-4.4636817;5.3536511;0
-4.2075761;5.6646354;0
-3.607578;7.1858876;0
-3.3873644;7.6576363;0
-3.2804384;7.7613007;0
-3.1762847;7.7327191;0
-3.0381962;7.6506117;0
-2.8286881;7.6467634;0
-2.8598071;7.8590921;0
-2.6845531;7.9089847;0
-2.5468001;7.8008409;0
-2.4437671;7.6933492;0
-2.3390419;7.6917801;0
-2.1983122;7.7691861;0
-2.1616242;7.9010276;0
-2.0918985;7.9000964;0
-2.0235167;7.7933405;0
-1.9540682;7.7660064;0
-1.570508;7.7353016;0
-1.5002116;7.7875578;0
-1.2547448;7.9442315;0
-0.730965;8.1526824;0
-0.4522013;8.2575018;0
-0.1738657;8.3098811;0
--0.0694533;8.521515300000001;0
--0.1737495;8.4157382;0
--0.2084645;8.4422444;0
--0.347615;8.363095700000001;0
--0.4518238;8.389823099999999;0
--0.5558115;8.4695476;0
--0.5215963;8.310643900000001;0
--0.5221188;8.1518584;0
--0.4879606;7.9400337;0
--0.2092654;7.833566;0
--0.2097517;7.463066;0
--0.5257651;7.0403597;0
--0.5604465;7.1463352;0
--0.7716285000000001;6.9354925;0
--0.9473082;6.8835005;0
--0.9833619;6.7249256;0
--1.1593398;6.6731632;0
--1.2287946;6.7795396;0
--1.1574372;6.9378046;0
--0.6994015;7.4115277;0
--0.5933112;7.7286747;0
--0.6973173;7.8878837;0
--0.9759166;7.9422776;0
--1.1175557;7.6256239;0
--1.1194069;7.3609825;0
--1.2951661;7.2564438;0
--1.5483098;6.411761;0
--1.9366363;6.31007;0
--1.8637764;6.5209552;0
--1.7582839;6.5197737;0
--1.7202965;6.7840348;0
--1.5427314;6.9939696;0
--1.5417155;7.0998256;0
--1.5762336;7.1530937;0
--1.9985176;6.9989869;0
--2.3506579;6.8978706;0
--2.5645144;6.6893724;0
--2.5351899;6.3183276;0
--2.7562921;5.7395724;0
--3.7980607;5.0191439;0
--4.3373509;4.7676755;0
--4.9834948;4.5740477;0
--5.9256532;4.1282314;0
--7.0382285;3.1643631;0
--7.4517045;2.7580044;0
--8.203390300000001;2.1245258;0
--8.7235361;1.8639192;0
--6.0222359;1.402651;0
--5.9152018;1.5578835;0
--5.8726343;1.5299217;0
--5.7920161;1.5536639;0
--5.8345898;1.5816055;0
--5.8318773;1.6609928;0
--5.663557;1.7083083;0
--5.5966615;1.7590827;0
--5.6808641;1.8413432;0
--5.7929717;1.7391469;0
--6.0818599;1.5637339;0
--6.0865686;1.4314222;0
--5.7324455;1.9225485;0
--5.5683675;1.9594866;0
--5.5335991;1.9159672;0
--5.5318777;1.9688923;0
--5.449816;2.0457126;0
--5.4914569;2.1000333;0
--5.7297704;2.0019357;0
--5.7677013;1.9502324;0
--5.2706487;2.2254789;0
--5.2257103;2.277064;0
--5.2196558;2.3563407;0
--5.191165;2.4614151;0
--5.2924029;2.4539566;0
--5.3166868;2.3699543;0
--5.3193455;2.2852741;0
--5.344493;2.174812;0
--2.628509;4.8904087;0
--2.5231726;4.8093509;0
--2.4524965;4.7818143;0
--2.166425;4.9101487;0
--1.8814086;4.9860466;0
--2.0588911;4.9881727;0
--2.093713;5.0415487;0
--1.9150532;5.1452403;0
--1.7011793;5.2487523;0
--1.5239785;5.2470098;0
--1.1676824;5.5087407;0
--1.2022868;5.6148538;0
--0.9185046;5.7718016;0
--0.882891;5.8245348;0
--0.9532116;5.8778612;0
--1.3075201;5.7215257;0
--1.5563954;5.5649116;0
--1.6276655;5.5126727;0
--1.7340945;5.4872998;0
--1.840557;5.4619959;0
--2.0900008;5.3326514;0
--2.3756722;5.1777288;0
--2.590489;5.0486276;0
--0.1745905;7.648274;0
--0.1048759;7.4629629;0
--0.0174793;7.4629295;0
--0.0349355;7.5687895;0
-0.0349007;7.7275752;0
-0.2267794;7.7806613;0
-0.3839078;7.7280333;0
-0.558318;7.7550129;0
-0.6632222;7.7024853;0
-0.8201638;7.7296796;0
-0.732548;7.8086476;0
-0.6273773;7.9405222;0
-0.4880418;7.9135694;0
-0.1393711;7.9922753;0
-0.0348428;7.9922181;0
--0.1743299;7.8864526;0
-4.5964504;4.4039327;0
-4.8814214;4.4120893;0
-4.9866866;4.468199;0
-5.1274771;4.5254771;0
-5.1614199;4.5795088;0
-5.0886198;4.6302255;0
-4.9818982;4.6269721;0
-4.8364965;4.7285905;0
-4.5535316;4.6675729;0
-4.3785074;4.5569131;0
-4.3813116;4.4510625;0
-edge2=303
-0;1;0
-1;2;0
-2;3;0
-3;4;0
-4;5;0
-5;6;0
-6;7;0
-7;8;0
-8;9;0
-9;10;0
-10;11;0
-11;12;0
-12;13;0
-13;14;0
-14;15;0
-15;16;0
-16;17;0
-17;18;0
-18;19;0
-19;20;0
-20;21;0
-21;22;0
-22;23;0
-23;24;0
-24;25;0
-25;26;0
-26;27;0
-27;28;0
-28;29;0
-29;30;0
-30;31;0
-31;32;0
-32;33;0
-33;34;0
-34;35;0
-35;36;0
-36;37;0
-37;38;0
-38;39;0
-39;40;0
-40;41;0
-41;42;0
-42;43;0
-43;44;0
-44;45;0
-45;46;0
-46;47;0
-47;48;0
-48;49;0
-49;50;0
-50;51;0
-51;52;0
-52;53;0
-53;54;0
-54;55;0
-55;56;0
-56;57;0
-57;58;0
-58;59;0
-59;60;0
-60;61;0
-61;62;0
-62;63;0
-63;64;0
-64;65;0
-65;66;0
-66;67;0
-67;68;0
-68;69;0
-69;70;0
-70;71;0
-71;72;0
-72;73;0
-73;74;0
-74;75;0
-75;76;0
-76;77;0
-77;78;0
-78;79;0
-79;80;0
-80;81;0
-81;82;0
-82;83;0
-83;84;0
-84;85;0
-85;86;0
-86;87;0
-87;88;0
-88;89;0
-89;90;0
-90;91;0
-91;92;0
-92;93;0
-93;94;0
-94;95;0
-95;96;0
-96;97;0
-97;98;0
-98;99;0
-99;100;0
-100;101;0
-101;102;0
-102;103;0
-103;104;0
-104;105;0
-105;106;0
-106;107;0
-107;108;0
-108;109;0
-109;110;0
-110;111;0
-111;112;0
-112;113;0
-113;114;0
-114;115;0
-115;116;0
-116;117;0
-117;118;0
-118;119;0
-119;120;0
-120;121;0
-121;122;0
-122;123;0
-123;124;0
-124;125;0
-125;126;0
-126;127;0
-127;128;0
-128;129;0
-129;130;0
-130;131;0
-131;132;0
-132;133;0
-133;134;0
-134;135;0
-135;136;0
-136;137;0
-137;138;0
-138;139;0
-139;140;0
-140;141;0
-141;142;0
-142;143;0
-143;144;0
-144;145;0
-145;146;0
-146;147;0
-147;148;0
-148;149;0
-149;150;0
-150;151;0
-151;152;0
-152;153;0
-153;154;0
-154;155;0
-155;156;0
-156;157;0
-157;158;0
-158;159;0
-159;160;0
-160;161;0
-161;162;0
-162;163;0
-163;164;0
-164;165;0
-165;166;0
-166;167;0
-167;168;0
-168;169;0
-169;170;0
-170;171;0
-171;172;0
-172;173;0
-173;174;0
-174;175;0
-175;176;0
-176;177;0
-177;178;0
-178;179;0
-179;180;0
-180;181;0
-181;182;0
-182;183;0
-183;184;0
-184;185;0
-185;186;0
-186;187;0
-187;188;0
-188;189;0
-189;190;0
-190;191;0
-191;192;0
-192;193;0
-193;194;0
-194;195;0
-195;196;0
-196;197;0
-197;198;0
-198;199;0
-199;200;0
-200;201;0
-201;202;0
-202;203;0
-203;204;0
-204;205;0
-205;206;0
-206;207;0
-207;208;0
-208;209;0
-209;210;0
-210;211;0
-211;212;0
-212;213;0
-213;214;0
-214;215;0
-215;216;0
-216;217;0
-217;218;0
-218;219;0
-219;220;0
-220;221;0
-221;222;0
-222;223;0
-223;224;0
-224;0;0
-225;226;0
-226;227;0
-227;228;0
-228;229;0
-229;230;0
-230;231;0
-231;232;0
-232;233;0
-233;234;0
-234;235;0
-235;236;0
-236;225;0
-237;238;0
-238;239;0
-239;240;0
-240;241;0
-241;242;0
-242;243;0
-243;244;0
-244;237;0
-245;246;0
-246;247;0
-247;248;0
-248;249;0
-249;250;0
-250;251;0
-251;252;0
-252;245;0
-253;254;0
-254;255;0
-255;256;0
-256;257;0
-257;258;0
-258;259;0
-259;260;0
-260;261;0
-261;262;0
-262;263;0
-263;264;0
-264;265;0
-265;266;0
-266;267;0
-267;268;0
-268;269;0
-269;270;0
-270;271;0
-271;272;0
-272;273;0
-273;274;0
-274;275;0
-275;253;0
-276;277;0
-277;278;0
-278;279;0
-279;280;0
-280;281;0
-281;282;0
-282;283;0
-283;284;0
-284;285;0
-285;286;0
-286;287;0
-287;288;0
-288;289;0
-289;290;0
-290;291;0
-291;276;0
-292;293;0
-293;294;0
-294;295;0
-295;296;0
-296;297;0
-297;298;0
-298;299;0
-299;300;0
-300;301;0
-301;302;0
-302;292;0
diff --git a/inc/jigsaw_jig_t.h b/inc/jigsaw_jig_t.h
index c2ebb73..86db880 100644
--- a/inc/jigsaw_jig_t.h
+++ b/inc/jigsaw_jig_t.h
@@ -123,7 +123,7 @@
/*
--------------------------------------------------------
* HFUN_SCAL - {default = 'relative'} scaling type for
- * mesh-size fuction. HFUN_SCAL='relative' interprets
+ * mesh-size function. HFUN_SCAL='relative' interprets
* mesh-size values as percentages of the (mean) length
* of the axis-aligned bounding-box (AABB) associated
* with the geometry. HFUN_SCAL = 'absolute' interprets
@@ -176,7 +176,7 @@
/*
--------------------------------------------------------
- * MESH_KERN - {default = 'delfront'} meshing kernal,
+ * MESH_KERN - {default = 'delfront'} meshing kernel,
* choice of the standard Delaunay-refinement algorithm
* (KERN='delaunay') or the Frontal-Delaunay method
* (KERN='delfront').
diff --git a/inc/lib_jigsaw.h b/inc/lib_jigsaw.h
index b372aee..1ef21b2 100644
--- a/inc/lib_jigsaw.h
+++ b/inc/lib_jigsaw.h
@@ -14,7 +14,7 @@
* JIGSAW: Interface to the JIGSAW meshing library.
--------------------------------------------------------
*
- * Last updated: 22 January, 2019
+ * Last updated: 19 June, 2019
*
* Copyright 2013 -- 2019
* Darren Engwirda
@@ -56,6 +56,22 @@
# ifndef __LIB_JIGSAW__
# define __LIB_JIGSAW__
+# ifdef __cplusplus
+ extern "C" {
+# endif
+
+# ifdef _WIN32
+
+# ifdef __lib_jigsaw
+# define SHARED __declspec(dllexport)
+# else
+# define SHARED __declspec(dllimport)
+# endif
+
+# else
+# define SHARED
+# endif
+
# include "stdint.h"
# include "stddef.h"
@@ -76,7 +92,7 @@
# define jigsaw_make_mesh jigsaw
- extern indx_t jigsaw (
+ SHARED indx_t jigsaw (
/* JCFG (REQUIRED): settings obj. definition.
*/
@@ -107,7 +123,7 @@
--------------------------------------------------------
*/
- extern indx_t tripod (
+ SHARED indx_t tripod (
/* JCFG (REQUIRED): settings obj. definition.
*/
@@ -133,7 +149,7 @@
--------------------------------------------------------
*/
- extern indx_t marche (
+ SHARED indx_t marche (
/* JCFG (REQUIRED): settings obj. definition.
*/
@@ -150,11 +166,11 @@
--------------------------------------------------------
*/
- extern void jigsaw_init_msh_t (
+ SHARED void jigsaw_init_msh_t (
jigsaw_msh_t *_mesh
) ;
- extern void jigsaw_init_jig_t (
+ SHARED void jigsaw_init_jig_t (
jigsaw_jig_t *_jjig
) ;
@@ -165,23 +181,23 @@
*/
/*
- extern indx_t jigsaw_save_msh_t (
+ SHARED indx_t jigsaw_save_msh_t (
char *_file,
jigsaw_msh_t *_mesh
) ;
*/
- extern indx_t jigsaw_save_jig_t (
+ SHARED indx_t jigsaw_save_jig_t (
char *_file,
jigsaw_jig_t *_jjig
) ;
- extern indx_t jigsaw_load_msh_t (
+ SHARED indx_t jigsaw_load_msh_t (
char *_file,
jigsaw_msh_t *_mesh
) ;
- extern indx_t jigsaw_load_jig_t (
+ SHARED indx_t jigsaw_load_jig_t (
char *_file,
jigsaw_jig_t *_jjig
) ;
@@ -192,118 +208,124 @@
--------------------------------------------------------
*/
- extern void jigsaw_alloc_vert2 (
+ SHARED void jigsaw_alloc_vert2 (
jigsaw_VERT2_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_alloc_vert3 (
+ SHARED void jigsaw_alloc_vert3 (
jigsaw_VERT3_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_alloc_edge2 (
+ SHARED void jigsaw_alloc_edge2 (
jigsaw_EDGE2_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_alloc_tria3 (
+ SHARED void jigsaw_alloc_tria3 (
jigsaw_TRIA3_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_alloc_quad4 (
+ SHARED void jigsaw_alloc_quad4 (
jigsaw_QUAD4_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_alloc_tria4 (
+ SHARED void jigsaw_alloc_tria4 (
jigsaw_TRIA4_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_alloc_hexa8 (
+ SHARED void jigsaw_alloc_hexa8 (
jigsaw_HEXA8_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_alloc_wedg6 (
+ SHARED void jigsaw_alloc_wedg6 (
jigsaw_WEDG6_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_alloc_pyra5 (
+ SHARED void jigsaw_alloc_pyra5 (
jigsaw_PYRA5_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_alloc_bound (
+ SHARED void jigsaw_alloc_bound (
jigsaw_BOUND_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_alloc_index (
+ SHARED void jigsaw_alloc_index (
jigsaw_INDEX_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_alloc_reals (
+ SHARED void jigsaw_alloc_reals (
jigsaw_REALS_array_t *_xsrc ,
size_t _size
) ;
- extern void jigsaw_free_msh_t (
+ SHARED void jigsaw_free_msh_t (
jigsaw_msh_t *_mesh
) ;
- extern void jigsaw_free_vert2 (
+ SHARED void jigsaw_free_vert2 (
jigsaw_VERT2_array_t *_xsrc
) ;
- extern void jigsaw_free_vert3 (
+ SHARED void jigsaw_free_vert3 (
jigsaw_VERT3_array_t *_xsrc
) ;
- extern void jigsaw_free_edge2 (
+ SHARED void jigsaw_free_edge2 (
jigsaw_EDGE2_array_t *_xsrc
) ;
- extern void jigsaw_free_tria3 (
+ SHARED void jigsaw_free_tria3 (
jigsaw_TRIA3_array_t *_xsrc
) ;
- extern void jigsaw_free_quad4 (
+ SHARED void jigsaw_free_quad4 (
jigsaw_QUAD4_array_t *_xsrc
) ;
- extern void jigsaw_free_tria4 (
+ SHARED void jigsaw_free_tria4 (
jigsaw_TRIA4_array_t *_xsrc
) ;
- extern void jigsaw_free_hexa8 (
+ SHARED void jigsaw_free_hexa8 (
jigsaw_HEXA8_array_t *_xsrc
) ;
- extern void jigsaw_free_wedg6 (
+ SHARED void jigsaw_free_wedg6 (
jigsaw_WEDG6_array_t *_xsrc
) ;
- extern void jigsaw_free_pyra5 (
+ SHARED void jigsaw_free_pyra5 (
jigsaw_PYRA5_array_t *_xsrc
) ;
- extern void jigsaw_free_bound (
+ SHARED void jigsaw_free_bound (
jigsaw_BOUND_array_t *_xsrc
) ;
- extern void jigsaw_free_index (
+ SHARED void jigsaw_free_index (
jigsaw_INDEX_array_t *_xsrc
) ;
- extern void jigsaw_free_reals (
+ SHARED void jigsaw_free_reals (
jigsaw_REALS_array_t *_xsrc
) ;
-
+
+# ifdef __cplusplus
+ }
+# endif
+
+# undef SHARED
+
# endif // __LIB_JIGSAW__
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 59951d5..fa8f80e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,12 +1,38 @@
+function (cfg_compile_options OPT CFG)
+ add_compile_options ("$<$:${OPT}>")
+endfunction ()
+
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
+ CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR
+ CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+ set (GCXX_LIKE TRUE)
+ message (">> GCXX-LIKE COMPILER DETECTED")
+endif ()
+
+if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ set (MSVC_LIKE TRUE)
+ message (">> MSVC-LIKE COMPILER DETECTED")
+endif ()
+
+if (DEFINED MSVC_LIKE)
+ add_compile_options (/W3)
+ cfg_compile_options (/GS- RELEASE)
+ cfg_compile_options (/Ot RELEASE)
+endif ()
+
+if (DEFINED GCXX_LIKE)
+ add_compile_options (-pedantic -Wall)
+endif ()
+
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (INSTALL_LOCAL TRUE)
- message ("installing locally")
-else (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- message ("installing to ${CMAKE_INSTALL_PREFIX}")
-endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ message (">> INSTALLING LOCALLY")
+else ()
+ message (">> INSTALLING TO ${CMAKE_INSTALL_PREFIX}")
+endif ()
add_executable (jigsaw-cmd jigsaw.cpp)
target_compile_definitions (jigsaw-cmd PRIVATE __cmd_jigsaw)
diff --git a/src/jig_read.hpp b/src/jig_read.hpp
index d147ab8..445eb91 100644
--- a/src/jig_read.hpp
+++ b/src/jig_read.hpp
@@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
- * Last updated: 10 April, 2019
+ * Last updated: 19 June, 2019
*
* Copyright 2013-2019
* Darren Engwirda
@@ -225,7 +225,8 @@
std::transform(__str.begin(), \
__str. end(), \
__str.begin(), \
- ::toupper ) ;
+ [](unsigned char c){ return \
+ (unsigned char)::toupper(c) ; } ) ;
/*---------------------------------- read "file" data */
#define __putFILE(__fun, __tok) \
@@ -364,7 +365,8 @@
std::transform(_stok[0].begin() ,
_stok[0]. end() ,
_stok[0].begin() ,
- ::toupper) ;
+ [](unsigned char c){ return
+ (unsigned char)::toupper(c); } ) ;
/*---------------------------- read MISC keywords */
if (_stok[0] == "VERBOSITY")
diff --git a/src/libcpp/rdel_mesh/rdel_create_init_2.inc b/src/libcpp/rdel_mesh/rdel_create_init_2.inc
index 660ead3..395c4b3 100644
--- a/src/libcpp/rdel_mesh/rdel_create_init_2.inc
+++ b/src/libcpp/rdel_mesh/rdel_create_init_2.inc
@@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
- * Last updated: 08 April, 2019
+ * Last updated: 21 June, 2019
*
* Copyright 2013-2019
* Darren Engwirda
@@ -299,7 +299,7 @@
_imid =*_iter ;
}
}
-
+
/*------------------------------ seed node from init. */
if (_imid > -1)
{
@@ -360,7 +360,7 @@
}
}
-
+
/*------------------------------ seed node from init. */
for (auto _iter = _iset.head();
_iter != _iset.tend();
@@ -459,11 +459,11 @@
_edat._tadj = _tadj ;
algorithms::isort (
- &_edat._node[0],
- &_edat._node[2],
+ _edat._node.head(),
+ _edat._node.tend(),
std::less()) ;
- _epro.push(_edat) ;
+ _epro.push(_edat) ;
}
else
@@ -478,7 +478,7 @@
_edat._part =
_iter->itag() ;
- _ebad.push(_edat) ;
+ _ebad.push(_edat) ;
}
diff --git a/src/libcpp/rdel_mesh/rdel_create_init_3.inc b/src/libcpp/rdel_mesh/rdel_create_init_3.inc
index 571a0d6..fae17a4 100644
--- a/src/libcpp/rdel_mesh/rdel_create_init_3.inc
+++ b/src/libcpp/rdel_mesh/rdel_create_init_3.inc
@@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
- * Last updated: 08 April, 2019
+ * Last updated: 21 June, 2019
*
* Copyright 2013-2019
* Darren Engwirda
@@ -660,11 +660,11 @@
_fdat._tadj = _tadj ;
algorithms::isort (
- &_fdat._node[0],
- &_fdat._node[3],
+ _fdat._node.head(),
+ _fdat._node.tend(),
std::less()) ;
- _fpro.push(_fdat) ;
+ _fpro.push(_fdat) ;
}
else
@@ -681,7 +681,7 @@
_fdat._part =
_iter->itag() ;
- _fbad.push(_fdat) ;
+ _fbad.push(_fdat) ;
}
diff --git a/src/liblib/init_msh_t.hpp b/src/liblib/init_msh_t.hpp
index ee0c815..b4266d5 100644
--- a/src/liblib/init_msh_t.hpp
+++ b/src/liblib/init_msh_t.hpp
@@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
- * Last updated: 19 January, 2019
+ * Last updated: 19 June, 2019
*
* Copyright 2013-2019
* Darren Engwirda
@@ -476,7 +476,7 @@
++_item )
{
_index->
- _data[_item] = (real_t) +0 ;
+ _data[_item] = (indx_t) +0 ;
}
}
diff --git a/src/liblib/load_msh_t.hpp b/src/liblib/load_msh_t.hpp
index 453c429..77c8b4f 100644
--- a/src/liblib/load_msh_t.hpp
+++ b/src/liblib/load_msh_t.hpp
@@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
- * Last updated: 19 January, 2019
+ * Last updated: 19 June, 2019
*
* Copyright 2013-2019
* Darren Engwirda
@@ -72,8 +72,8 @@
std::int32_t _ftag ;
jmsh_kind::
enum_data _kind ;
- std::int32_t _ndim ;
- std::int32_t _nval ;
+ std:: size_t _ndim ;
+ std:: size_t _nval ;
public :
__normal_call msht_reader (
@@ -113,7 +113,7 @@
}
/*-------------------------------- read NDIMS section */
__normal_call void_type push_ndims (
- std::int32_t _ndim
+ std:: size_t _ndim
)
{
this->_ndim = _ndim ;
@@ -483,7 +483,7 @@
if (_ipos < this->_jmsh->_value._size)
{
- for (auto _ival = +0;
+ for (auto _ival = +0u ;
_ival< this->_nval; ++_ival)
{
this->_jmsh->_value.
diff --git a/src/msh_read.hpp b/src/msh_read.hpp
index ce147f2..698c926 100644
--- a/src/msh_read.hpp
+++ b/src/msh_read.hpp
@@ -31,7 +31,7 @@
*
--------------------------------------------------------
*
- * Last updated: 19 January, 2019
+ * Last updated: 19 June, 2019
*
* Copyright 2013-2019
* Darren Engwirda
@@ -288,7 +288,7 @@
if (_stok.count() == +2)
{
this->
- _ndim = std::stol( _stok[1]);
+ _ndim = std::stoi( _stok[1]);
_dest.
push_ndims (this->_ndim) ;
@@ -1260,7 +1260,8 @@
std::transform(_line.begin() ,
_line. end() ,
_line.begin() ,
- ::toupper) ;
+ [](unsigned char c){ return
+ (unsigned char)::toupper(c); } ) ;
containers::
array _stok ;
diff --git a/src/msh_save.hpp b/src/msh_save.hpp
index 5d11f5c..f929284 100644
--- a/src/msh_save.hpp
+++ b/src/msh_save.hpp
@@ -31,9 +31,9 @@
*
--------------------------------------------------------
*
- * Last updated: 10 September, 2018
+ * Last updated: 18 June, 2019
*
- * Copyright 2013-2018
+ * Copyright 2013-2019
* Darren Engwirda
* de2363@columbia.edu
* https://github.com/dengwirda/
@@ -1882,14 +1882,13 @@
}
}
- iptr_type _last = +0;
for (auto _iter = _nmap.head();
_iter != _nmap.tend();
++_iter )
{
if ( *_iter >= +0)
{
- *_iter = _last ++ ;
+ *_iter = _nnum ++ ;
}
}
diff --git a/uni/CMakeLists.txt b/uni/CMakeLists.txt
index ab30981..afee926 100644
--- a/uni/CMakeLists.txt
+++ b/uni/CMakeLists.txt
@@ -3,10 +3,10 @@ project (JIGSAW_UNIT_TEST)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (INSTALL_LOCAL TRUE)
- message ("installing locally")
-else (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- message ("installing to ${CMAKE_INSTALL_PREFIX}")
-endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ message ( ">> INSTALLING LOCALLY" )
+else ()
+ message ( ">> INSTALLING TO ${CMAKE_INSTALL_PREFIX}" )
+endif ()
if (DEFINED INSTALL_LOCAL)
find_library (LIBJIGSAW jigsaw HINTS "${PROJECT_SOURCE_DIR}/../lib")
@@ -14,7 +14,7 @@ else ()
find_library (LIBJIGSAW jigsaw HINTS "${CMAKE_INSTALL_PREFIX}/lib")
endif ()
-message ("libjigsaw location: ${LIBJIGSAW}")
+message (">> LIBJIGSAW LOCATION: ${LIBJIGSAW}")
add_executable (test_1 test_1.c)
target_link_libraries (test_1 ${LIBJIGSAW})
diff --git a/version.txt b/version.txt
index 2628334..cccf296 100644
--- a/version.txt
+++ b/version.txt
@@ -13,6 +13,12 @@
# JIGSAW: an unstructured mesh generation library
#------------------------------------------------------------
+ * Version 0.9.11:
+ --------------
+
+ - cmake support for WIN32/64 via MSVC.
+
+
* Version 0.9.10:
--------------