update to v1.6

This commit is contained in:
张壹 2021-11-02 09:36:25 +08:00
parent 6c27405c79
commit 212df7eb0c
12 changed files with 24015 additions and 15553 deletions

View File

@ -1,15 +1,15 @@
cmake_minimum_required(VERSION 3.15.2)
#
project(TETGEN)
project(Tetgen VERSION 1.6)
#
include(CMakePackageConfigHelpers)
message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
#set(CMAKE_C_COMPILER gcc)
#set(CMAKE_CXX_COMPILER g++)
set(CMAKE_INSTALL_PREFIX D:/Library)
endif()
# CMake WindowsC:/Program\ Files/${Project_Name} Linux/Unix/usr/local
message(STATUS "Install prefix: " ${CMAKE_INSTALL_PREFIX})
# CMake
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
#
add_subdirectory(src/)

33
README
View File

@ -1,4 +1,4 @@
This is TetGen version 1.5.1 (released on August, 2018)
This is TetGen version 1.6.0 (released on August 31, 2020)
Please see the documentation of TetGen for compiling and using TetGen.
It is available at the following link:
@ -13,7 +13,6 @@ For more information on this product, contact :
Mohrenstr. 39
10117 Berlin, Germany
Phone: +49 (0) 30-20372-446 Fax: +49 (0) 30-2044975
EMail: <si@wias-berlin.de>
Web Site: http://www.wias-berlin.de/~si
@ -22,34 +21,4 @@ For more information on this product, contact :
BEFORE INTALLING OR USING TetGen(R) READ the
GENERAL LICENSE TERMS AND CONDITIONS
-------------------------------------------------------------------
This package is organized and distributed by Dr. Yi Zhang.
It is distributed under the TetGen License
Phone: +86 180-7279-5431
E-mail: zhangyiss@icloud.com
Address: Yuquan Campus, Zhejiang University,
38 Zheda Road, Hangzhou 310027, China
Installation
We use the CMake program to compile and install the package, and
the Stow program to create symlinks to the target directory.
1. Install CMake and Stow
2. ./config.sh configure
3. ./config.sh install
This will install the tetgen package into the /opt/stow/tetgen directory.
Symlinks are created in the /usr/local directory according to the sub-directories
of the installed package. Directories of the installation and target directories
could be changed by editing the config.sh file.
------------------- IMPORTANCE NOTICE -----------------------------
Note that source files in the lib/ and tool/ directories are identical
to each other except that the tetgen.h file in the lib/ directory has
the TETLIBRARY macro defined.
-------------------------------------------------------------------

15
TetgenConfig.cmake.in Normal file
View File

@ -0,0 +1,15 @@
@PACKAGE_INIT@
set(@PROJECT_NAME@_Version "@PROJECT_VERSION@")
set_and_check(@PROJECT_NAME@_INSTALL_PREFIX "${PACKAGE_PREFIX_DIR}")
set_and_check(@PROJECT_NAME@_INC_DIR "${PACKAGE_PREFIX_DIR}/include")
set_and_check(@PROJECT_NAME@_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")
set_and_check(@PROJECT_NAME@_LIB_DIR "${PACKAGE_PREFIX_DIR}/lib")
set_and_check(@PROJECT_NAME@_LIBRARY_DIR "${PACKAGE_PREFIX_DIR}/lib")
set(@PROJECT_NAME@_LIB tetgen)
set(@PROJECT_NAME@_LIBRARY tetgen)
set(@PROJECT_NAME@_FOUND 1)
# include target information
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")

BIN
manual.pdf Normal file

Binary file not shown.

View File

@ -1,7 +1,7 @@
#
aux_source_directory(lib TETGENLIB_SRC)
#
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
#
#
@ -17,18 +17,36 @@ set_target_properties(tetlib_static PROPERTIES OUTPUT_NAME "tetgen")
set_target_properties(tetlib PROPERTIES CLEAN_DIRECT_OUTPUT 1)
set_target_properties(tetlib_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
#
set_target_properties(tetlib PROPERTIES VERSION 1.5.1 SOVERSION 1.5.1)
set_target_properties(tetlib PROPERTIES VERSION 1.6 SOVERSION 1.6)
#
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
set(CONFIG_FILE_PATH lib/cmake/${PROJECT_NAME})
configure_package_config_file(${PROJECT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION ${CONFIG_FILE_PATH}
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
write_basic_package_version_file(${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion)
#
if(WIN32)
install(TARGETS tetlib DESTINATION lib)
install(TARGETS tetlib_static DESTINATION lib)
else()
install(TARGETS tetlib tetlib_static
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
EXPORT ${PROJECT_NAME}Targets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(EXPORT ${PROJECT_NAME}Targets
DESTINATION ${CONFIG_FILE_PATH})
install(FILES
${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake
${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
DESTINATION ${CONFIG_FILE_PATH})
endif()
#
install(FILES lib/tetgen.h DESTINATION include)

View File

@ -399,7 +399,7 @@ static REAL ispstaticfilter;
// http://www.math.utah.edu/~beebe/software/ieee/
// The original program was "fpinfo2.c".
double fppow2(int n)
static double fppow2(int n)
{
double x, power;
x = (n < 0) ? ((double)1.0/(double)2.0) : (double)2.0;
@ -412,12 +412,12 @@ double fppow2(int n)
#ifdef SINGLE
float fstore(float x)
static float fstore(float x)
{
return (x);
}
int test_float(int verbose)
static int test_float(int verbose)
{
float x;
int pass = 1;
@ -467,12 +467,12 @@ int test_float(int verbose)
# else
double dstore(double x)
static double dstore(double x)
{
return (x);
}
int test_double(int verbose)
static int test_double(int verbose)
{
double x;
int pass = 1;
@ -881,7 +881,7 @@ int expansion_sum_zeroelim2(int elen, REAL *e, int flen, REAL *f, REAL *h)
/* */
/*****************************************************************************/
int fast_expansion_sum(int elen, REAL *e, int flen, REAL *f, REAL *h)
static int fast_expansion_sum(int elen, REAL *e, int flen, REAL *f, REAL *h)
/* h cannot be e or f. */
{
REAL Q;
@ -953,7 +953,7 @@ int fast_expansion_sum(int elen, REAL *e, int flen, REAL *f, REAL *h)
/* properties. */
/* */
/*****************************************************************************/
static
int fast_expansion_sum_zeroelim(int elen, REAL *e, int flen, REAL *f, REAL *h)
/* h cannot be e or f. */
{
@ -1165,7 +1165,7 @@ int linear_expansion_sum_zeroelim(int elen, REAL *e, int flen, REAL *f,
/* will h.) */
/* */
/*****************************************************************************/
static
int scale_expansion(int elen, REAL *e, REAL b, REAL *h)
/* e and h cannot be the same. */
{
@ -1211,7 +1211,7 @@ int scale_expansion(int elen, REAL *e, REAL b, REAL *h)
/* will h.) */
/* */
/*****************************************************************************/
static
int scale_expansion_zeroelim(int elen, REAL *e, REAL b, REAL *h)
/* e and h cannot be the same. */
{
@ -1263,7 +1263,7 @@ int scale_expansion_zeroelim(int elen, REAL *e, REAL b, REAL *h)
/* nonadjacent expansion. */
/* */
/*****************************************************************************/
static
int compress(int elen, REAL *e, REAL *h)
/* e and h may be the same. */
{
@ -1306,7 +1306,7 @@ int compress(int elen, REAL *e, REAL *h)
/* See either version of my paper for details. */
/* */
/*****************************************************************************/
static
REAL estimate(int elen, REAL *e)
{
REAL Q;
@ -1344,7 +1344,7 @@ REAL estimate(int elen, REAL *e)
/* nearly so. */
/* */
/*****************************************************************************/
static
REAL orient2dfast(REAL *pa, REAL *pb, REAL *pc)
{
REAL acx, bcx, acy, bcy;
@ -1356,6 +1356,7 @@ REAL orient2dfast(REAL *pa, REAL *pb, REAL *pc)
return acx * bcy - acy * bcx;
}
//static
REAL orient2dexact(REAL *pa, REAL *pb, REAL *pc)
{
INEXACT REAL axby1, axcy1, bxcy1, bxay1, cxay1, cxby1;
@ -4181,7 +4182,7 @@ REAL insphere(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
/* See my Robust Predicates paper for details. */
/* */
/*****************************************************************************/
//static
REAL orient4dexact(REAL* pa, REAL* pb, REAL* pc, REAL* pd, REAL* pe,
REAL aheight, REAL bheight, REAL cheight, REAL dheight,
REAL eheight)
@ -4397,6 +4398,7 @@ REAL orient4dexact(REAL* pa, REAL* pb, REAL* pc, REAL* pd, REAL* pe,
return deter[deterlen - 1];
}
static
REAL orient4dadapt(REAL* pa, REAL* pb, REAL* pc, REAL* pd, REAL* pe,
REAL aheight, REAL bheight, REAL cheight, REAL dheight,
REAL eheight, REAL permanent)
@ -4700,3 +4702,9 @@ REAL orient4d(REAL* pa, REAL* pb, REAL* pc, REAL* pd, REAL* pe,
//==============================================================================

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -399,7 +399,7 @@ static REAL ispstaticfilter;
// http://www.math.utah.edu/~beebe/software/ieee/
// The original program was "fpinfo2.c".
double fppow2(int n)
static double fppow2(int n)
{
double x, power;
x = (n < 0) ? ((double)1.0/(double)2.0) : (double)2.0;
@ -412,12 +412,12 @@ double fppow2(int n)
#ifdef SINGLE
float fstore(float x)
static float fstore(float x)
{
return (x);
}
int test_float(int verbose)
static int test_float(int verbose)
{
float x;
int pass = 1;
@ -467,12 +467,12 @@ int test_float(int verbose)
# else
double dstore(double x)
static double dstore(double x)
{
return (x);
}
int test_double(int verbose)
static int test_double(int verbose)
{
double x;
int pass = 1;
@ -881,7 +881,7 @@ int expansion_sum_zeroelim2(int elen, REAL *e, int flen, REAL *f, REAL *h)
/* */
/*****************************************************************************/
int fast_expansion_sum(int elen, REAL *e, int flen, REAL *f, REAL *h)
static int fast_expansion_sum(int elen, REAL *e, int flen, REAL *f, REAL *h)
/* h cannot be e or f. */
{
REAL Q;
@ -953,7 +953,7 @@ int fast_expansion_sum(int elen, REAL *e, int flen, REAL *f, REAL *h)
/* properties. */
/* */
/*****************************************************************************/
static
int fast_expansion_sum_zeroelim(int elen, REAL *e, int flen, REAL *f, REAL *h)
/* h cannot be e or f. */
{
@ -1165,7 +1165,7 @@ int linear_expansion_sum_zeroelim(int elen, REAL *e, int flen, REAL *f,
/* will h.) */
/* */
/*****************************************************************************/
static
int scale_expansion(int elen, REAL *e, REAL b, REAL *h)
/* e and h cannot be the same. */
{
@ -1211,7 +1211,7 @@ int scale_expansion(int elen, REAL *e, REAL b, REAL *h)
/* will h.) */
/* */
/*****************************************************************************/
static
int scale_expansion_zeroelim(int elen, REAL *e, REAL b, REAL *h)
/* e and h cannot be the same. */
{
@ -1263,7 +1263,7 @@ int scale_expansion_zeroelim(int elen, REAL *e, REAL b, REAL *h)
/* nonadjacent expansion. */
/* */
/*****************************************************************************/
static
int compress(int elen, REAL *e, REAL *h)
/* e and h may be the same. */
{
@ -1306,7 +1306,7 @@ int compress(int elen, REAL *e, REAL *h)
/* See either version of my paper for details. */
/* */
/*****************************************************************************/
static
REAL estimate(int elen, REAL *e)
{
REAL Q;
@ -1344,7 +1344,7 @@ REAL estimate(int elen, REAL *e)
/* nearly so. */
/* */
/*****************************************************************************/
static
REAL orient2dfast(REAL *pa, REAL *pb, REAL *pc)
{
REAL acx, bcx, acy, bcy;
@ -1356,6 +1356,7 @@ REAL orient2dfast(REAL *pa, REAL *pb, REAL *pc)
return acx * bcy - acy * bcx;
}
//static
REAL orient2dexact(REAL *pa, REAL *pb, REAL *pc)
{
INEXACT REAL axby1, axcy1, bxcy1, bxay1, cxay1, cxby1;
@ -4181,7 +4182,7 @@ REAL insphere(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
/* See my Robust Predicates paper for details. */
/* */
/*****************************************************************************/
//static
REAL orient4dexact(REAL* pa, REAL* pb, REAL* pc, REAL* pd, REAL* pe,
REAL aheight, REAL bheight, REAL cheight, REAL dheight,
REAL eheight)
@ -4397,6 +4398,7 @@ REAL orient4dexact(REAL* pa, REAL* pb, REAL* pc, REAL* pd, REAL* pe,
return deter[deterlen - 1];
}
static
REAL orient4dadapt(REAL* pa, REAL* pb, REAL* pc, REAL* pd, REAL* pe,
REAL aheight, REAL bheight, REAL cheight, REAL dheight,
REAL eheight, REAL permanent)
@ -4700,3 +4702,9 @@ REAL orient4d(REAL* pa, REAL* pb, REAL* pc, REAL* pd, REAL* pe,
//==============================================================================

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.