📄 readme
字号:
gridgenOrthogonal Grid GeneratorVersion 1.45Copyright 2001 CSIRO Marine ResearchGPO 1538 HobartTAS 7001AustraliaPlease send comments and bugs to Pavel.Sakov@marine.auThere is no warranty whatsoever. Use at your own risk. These code may be freely redistributed under the condition that the copyright notices are not removed. 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 CSIRO, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS.1. Build and installThe code is being developed and used under Linux/gcc/i386 platform and essentially uses the C99 complex arithmetics available on this platform.To compile it `gridgen', run:./configuremake(make install)2. PortabilityThis code should compile an all platforms with gcc. It is known to compile on Linux/gcc/i386, Cygwin/gcc/i386, Djgpp/gcc/i386, and SunOS/gcc/sparc.On Linux/gcc/ia64 you may need to remove the optimisation flag -O2.Make sure that you use GNU make.Beware that the configure script currently does not do much more than a coupleof checks. It should be viewed rather as a prototype for the future than amulti-platform configuration tool.3. DocumentationAt the moment, there is not much documentation with `gridgen'.To get familiar with it, I would suggest the following sequence: 1. Read this file 2. Compile `gridgen' 3. Read examples/README 4. Reproduce examples 5. Read output after running "gridgen -a" and "gridgen -h" 6. There are a number of real-life grid examples on http://www.marine.csiro.au/~sakov4. Features.Following is a list of some particular features of `gridgen', to indicate what it can do and what it can not. 1. `gridgen' generates a grid based on the domain boundary and the designated locations of the grid corners. 2. `gridgen' can handle simply connected regions only. If you have a region with an island or re-connecting channels, you have to use masking. 3. Unlike many other generators, `gridgen' allows multiple corners (rather than just 4 corners) in grid space. This gives one a great flexibility in regard to generating grids for complicated regions. 4. Unlike many other generators, `gridgen' does not allow to specify cell size explicitely. One can influence the cell density by: A. Changing positions of the corners. Compare grids for examples 1 and 2 from the package; they demonstrate how the cell density may be changed via the positions of the grid corners. B. By specifying node coordinates in grid space. This is done via the entry `grid' in the parameter file. This entry points at the file that contains node coordinates in index space scaled to 1x1 square. Two examples of using this technique may be seen at http://www.marine.csiro.au/~sakov/fitzroy.pdf (note elongated cells in the river); and http://www.marine.csiro.au/~sakov/torres.pdf (note the elongated cells in the narrowing). Also, see example 6. Despite the flexibility of `gridgen', I still find it difficult or impossible at times to achieve some specific grid characteristics for regions far from the boundary. This particularly refers to the alignment of the grid cells in a certain (flow) direction or to obtainining the desired cell density. 5. Because `gridgen' is based on the (exact) Schwarz-Christoffel formula, it performs fast and is numerically robust. 6. Beware that each boundary vertex represents a singularity in the Scwartz-Christoffel transform. To generate a smoother grid, for a section of the boundary without corners (which will become a strait line in the grid space), avoid putting big deviations from the strait angle (this may result in a big deviation from orthogonality); try making sharp turns by using a few smaller turns rather than one big turn; or move the boundary polyline a away from the water. Also, try to make the angles in the boundary polyline at the location of designated corners close to the right angle. 7. To generate a grid with aspect ratio close to 1, look at the value of "conformal modulus" reported in the log generated by `gridgen' with "-v" option, and make the ratio (ny - 1) / (nx - 1) close to this number.5. Acknowledgments`gridgen' uses the following public code/algorithms: 1. CRDT algorithm by Tobin D. Driscoll and Stephen A. Vavasis -- for conformal mapping. 2. `Triangle' by Jonathan Richard Shewchuk -- for Delaunay triangulation. 3. `SCPACK' by Lloyd N. Trefethen -- for Schwarz-Christoffel transform. 4. `DOPRI8' by E. Hairer, S.P. Norsett, G. Wanner -- for solving ODEs. 5. `libavl' by Brad Appleton -- for AVL binary tree code. 6. Shamos-Hoey algorithm implementation by softSurfer -- for testing a polyline on self-intersections.Please acknowledge the use of this software in publications, e.g.:"Orthogonal grid generation software was provided by Pavel Sakov andis available at URL: http://www.marine.csiro.au/~sakov/gridgen.tar.gz".Good luck!Pavel Sakov
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -