Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
de97ac80
Commit
de97ac80
authored
22 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
Update Triangle to version 1.4. Add some installation notes in the README.
parent
fd56fda0
No related branches found
No related tags found
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Triangle/Makefile
+3
-25
3 additions, 25 deletions
Triangle/Makefile
Triangle/README
+24
-149
24 additions, 149 deletions
Triangle/README
Triangle/triangle.c
+7008
-4312
7008 additions, 4312 deletions
Triangle/triangle.c
Triangle/triangle.h
+4
-6
4 additions, 6 deletions
Triangle/triangle.h
with
7039 additions
and
4492 deletions
Triangle/Makefile
+
3
−
25
View file @
de97ac80
# $Id: Makefile,v 1.8 2002-05-18 16:31:17 geuzaine Exp $
#
# Makefile for "libGmshTriangle.a"
#
# If yours is not a Unix system, use the -DNO_TIMER switch to eliminate the
# Unix-specific timer code.
#
# If you are modifying Triangle, I recommend using the -DSELF_CHECK switch
# while you are debugging. Defining the SELF_CHECK symbol causes
# Triangle to include self-checking code. Triangle will execute more
# slowly, however, so be sure to remove this switch before compiling a
# production version.
#
# If the size of the Triangle binary is important to you, you may wish to
# generate a reduced version of Triangle. The -DREDUCED switch gets rid
# of all features that are primarily of research interest. Specifically,
# defining the REDUCED symbol eliminates the -i, -F, -s, and -C switches.
# The -DCDT_ONLY switch gets rid of all meshing algorithms above and beyond
# constrained Delaunay triangulation. Specifically, defining the CDT_ONLY
# symbol eliminates the -r, -q, -a, -S, and -s switches. The REDUCED and
# CDT_ONLY symbols may be particularly attractive when Triangle is called
# by another program that does not need all of Triangle's features; in
# this case, these switches should appear as part of "TRILIBDEFS" below.
# $Id: Makefile,v 1.9 2003-02-10 23:07:05 geuzaine Exp $
CC
=
gcc
AR
=
ar ruvs
RM
=
rm
RANLIB
=
ranlib
RMFLAGS
=
-f
LIB
=
../lib/libGmshTriangle.a
# Do not optimize Triangle: it fucks up on Linux
RMFLAGS
=
-f
# Do not optimize: it crashed on Linux
CFLAGS
=
-O0
$(
OS_FLAGS
)
-DTRILIBRARY
SRC
=
triangle.c
...
...
This diff is collapsed.
Click to expand it.
Triangle/README
+
24
−
149
View file @
de97ac80
If you want to use Jonathan Shewchuk's Triangle as an alternative
isotropic 2D mesh generator in Gmsh, please download Triangle from the
author's web site at http://www.cs.cmu.edu/~quake/triangle.html,
unpack the archive and copy the two files triangle.c and triangle.h in
this directory. Then run configure and rebuild Gmsh.
Note that by doing so, you agree to Triangle's licencing requirements
stated below. (Most notably, you can only redistribute the software if
no compensation is received.)
==============================================================================
Triangle
A Two-Dimensional Quality Mesh Generator and Delaunay Triangulator.
Version 1.3
Show Me
A Display Program for Meshes and More.
Version 1.3
Version 1.4
Copyright 1996 Jonathan Richard Shewchuk
School of Computer Science
Carnegie Mellon University
5000 Forbes Avenue
Pittsburgh, Pennsylvania 15213-3891
Please send bugs and comments to jrs@cs.cmu.edu
Copyright 1993, 1995, 1997, 1998, 2002 Jonathan Richard Shewchuk
2360 Woolsey #H
Berkeley, California 94705-1927
Please send bugs and comments to jrs@cs.berkeley.edu
Created as part of the Archimedes project (tools for parallel FEM).
Supported in part by NSF Grant CMS-9318163 and an NSERC 1967 Scholarship.
There is no warranty whatsoever. Use at your own risk.
Triangle generates exact Delaunay triangulations, constrained
Delaunay
triangulations, and quality conforming Delaunay
triangulations. The
latter can be generated with no small angles
, and are thus suitable for
finite element analysis. Show Me graphically
displays the contents of
the geometric files used by Triangle. Show Me can
also write images in
PostScript form.
Triangle generates exact Delaunay triangulations,
exact
constrained
Delaunay
triangulations,
Voronoi diagrams,
and quality conforming Delaunay
triangulations. The
latter can be generated with no small angles
or large,
and are thus suitable for
finite element analysis. Show Me graphically
displays the contents of
the geometric files used by Triangle. Show Me can
also write images in
PostScript form.
Information on the algorithms used by Triangle, including complete
references, can be found in the comments at the beginning of the triangle.c
...
...
@@ -47,135 +54,3 @@ 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.)
------------------------------------------------------------------------------
The files included in this distribution are:
README The file you're reading now.
triangle.c Complete C source code for Triangle.
showme.c Complete C source code for Show Me.
triangle.h Include file for calling Triangle from another program.
tricall.c Sample program that calls Triangle.
makefile Makefile for compiling Triangle and Show Me.
A.poly A sample data file.
Triangle and Show Me are each a single portable C file. The easiest way to
compile them is to edit and use the included makefile. Before compiling,
read the makefile, which describes your options, and edit it accordingly.
You should specify:
The source and binary directories.
The C compiler and level of optimization.
Do you want single precision or double? Do you want to leave out some of
Triangle's features to reduce the size of the executable file?
The "correct" directories for include files (especially X include files),
if necessary.
Once you've done this, type "make" to compile the programs. Alternatively,
the files are usually easy to compile without a makefile:
cc -O -o triangle triangle.c -lm
cc -O -o showme showme.c -lX11
On some systems, the C compiler won't be able to find the X include files
or libraries, and you'll need to specify an include path or library path:
cc -O -I/usr/local/include -o showme showme.c -L/usr/local/lib -lX11
However, on other systems (like my workstation), the latter incantation
will cause the wrong files to be read, and the Show Me mouse buttons won't
work properly in the main window. Hence, try the "-I" and "-L" switches
ONLY if the compiler fails without it. (If you're using the makefile, you
may edit it to add this switch.)
Some processors, possibly including Intel x86 family and Motorola 68xxx
family chips, are IEEE conformant but have extended length internal
floating-point registers that may defeat Triangle's exact arithmetic
routines by failing to cause enough roundoff error! Typically, there is
a way to set these internal registers so that they are rounded off to
IEEE single or double precision format. If you have such a processor,
you should check your C compiler or system manuals to find out how to
configure these internal registers to the precision you are using.
Otherwise, the exact arithmetic routines won't be exact at all.
Unfortunately, I don't have access to any such systems, and can't give
advice on how to configure them. These problems don't occur on any
workstations I am aware of. However, Triangle's exact arithmetic hasn't
a hope of working on machines like the Cray C90 or Y-MP, which are not
IEEE conformant and have inaccurate rounding.
Triangle and Show Me both produce their own documentation. Complete
instructions are printed by invoking each program with the `-h' switch:
triangle -h
showme -h
The instructions are long; you'll probably want to pipe the output to
`more' or `lpr' or redirect it to a file. Both programs give a short list
of command line options if they are invoked without arguments (that is,
just type `triangle' or `showme'). Alternatively, you may want to read
the instructions on the World Wide Web. The appropriate URLs are:
http://www.cs.cmu.edu/~quake/triangle.html
http://www.cs.cmu.edu/~quake/showme.html
Try out Triangle on the enclosed sample file, A.poly:
triangle -p A
showme A.poly &
Triangle will read the Planar Straight Line Graph defined by A.poly, and
write its constrained Delaunay triangulation to A.1.node and A.1.ele.
Show Me will display the figure defined by A.poly. There are two buttons
marked "ele" in the Show Me window; click on the top one. This will cause
Show Me to load and display the triangulation.
For contrast, try running
triangle -pq A
Now, click on the same "ele" button. A new triangulation will be loaded;
this one having no angles smaller than 20 degrees.
To see a Voronoi diagram, try this:
cp A.poly A.node
triangle -v A
Click the "ele" button again. You will see the Delaunay triangulation of
the points in A.poly, without the segments. Now click the top "voro" button.
You will see the Voronoi diagram corresponding to that Delaunay triangulation.
Click the "Reset" button to see the full extent of the diagram.
------------------------------------------------------------------------------
If you wish to call Triangle from another program, instructions for doing
so are contained in the file `triangle.h' (but read Triangle's regular
instructions first!). Also look at `tricall.c', which provides an example.
Type "make trilibrary" to create triangle.o, a callable object file.
Alternatively, the object file is usually easy to compile without a
makefile:
cc -DTRILIBRARY -O -c triangle.c
------------------------------------------------------------------------------
If you use Triangle, and especially if you use it to accomplish real
work, I would like very much to hear from you. A short letter or email
(to jrs@cs.cmu.edu) describing how you use Triangle will mean a lot to
me. The more people I know are using this program, the more easily I can
justify spending time on improvements and on the three-dimensional
successor to Triangle, which in turn will benefit you. Also, I can put
you on a list to receive email whenever a new version of Triangle is
available.
If you use a mesh generated by Triangle or plotted by Show Me in a
publication, please include an acknowledgment as well.
Jonathan Richard Shewchuk
July 20, 1996
This diff is collapsed.
Click to expand it.
Triangle/triangle.c
+
7008
−
4312
View file @
de97ac80
This diff is collapsed.
Click to expand it.
Triangle/triangle.h
+
4
−
6
View file @
de97ac80
...
...
@@ -4,16 +4,14 @@
/* */
/* Include file for programs that call Triangle. */
/* */
/* Accompanies Triangle Version 1.3
*/
/* Accompanies Triangle Version
s
1.3
and 1.4
*/
/* July 19, 1996 */
/* */
/* Copyright 1996 */
/* Jonathan Richard Shewchuk */
/* School of Computer Science */
/* Carnegie Mellon University */
/* 5000 Forbes Avenue */
/* Pittsburgh, Pennsylvania 15213-3891 */
/* jrs@cs.cmu.edu */
/* 2360 Woolsey #H */
/* Berkeley, California 94705-1927 */
/* jrs@cs.berkeley.edu */
/* */
/*****************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment