Download User Guide for DTFE
Transcript
User guide for the DTFE code NOTE: The DTFE function will return the Delaunay triangulation of the point set and will also interpolate the fields to grid (fields selected via the --field option). In the absence of the --field option the code will still interpolate the density to grid. If you don’t want that, than you can suppress this behavior by inserting the code userOption.field.density = false; after the call userOption.readOptions(...);. One can implement the above code directly in the main function (src/main.cpp) that comes with the DTFE distribution. In that case the code compiling and build should work without additional changes in the Makefile. When compiling the above code extract using the DTFE library, one needs to supply the path for the CGAL include files (using -I CGAL headers path ) and the CGAL libraries (using -L CGAL library path -lCGAL -lboost thread) - if these are not build at the default system path. The Delaunay triangulation is made of: Vertices: these are the graph nodes and correspond to the initial point set used to build the triangulation. Edges: these are lines that connect all the neighboring vertices. Faces: these are triangles and are formed by 3 edges. For the 2D case there are no higher dimensional components of the triangulation. Cells: these are the tetrahedra of triangulation and are bounded by 4 faces. They are defined only for 3 or higher dimensional triangulations. The DTFE code uses only the vertices and faces for 2D/cells for 3D of the triangulation. For practical purposes for the 2D code we rename the faces and the faces iterators as cell and cell iterators (the renaming is done in file src/CGAL include 2D.h). So pay attention that for the 2D case the cell represent triangles and not tetrahedra. The Delaunay triangulation returned by DTFE has some additional properties compared with the standard GCAL Delaunay triangulation. The tessellation vertices have a one to one correspondence to the point set used to create the triangulation, so each vertex keeps track of the point properties to which it corresponds. This can be accessed via the info() vertex member function which links directly to the vertexData class1 . The following gives an example of how to access the different data at each Delaunay triangulation vertex (in the following vh is a Delaunay vertex handle - similar to a vertex pointer2 ): Point vh->point(): Returns a CGAL::Point structure with the coordinates of the vertex. The coordinates of the point can be accessed via the [] operator with values from 0 to N − 1, with N the number of dimensions. 1 The vertexData class is defined in src/vertexData.h file and inherits from the Data structure class. The Data structure class contains the same information as Particle data class with the exception of the point position, i.e. the function Data structure::position() is not defined. Both the Data structure class and Particle data class are defined in src/particle data.h 2 You can define a Delaunay vertex handle via Vertex handle vh;. See the files src/CGAL include 2D.h and src/CGAL include 2D.h for all the CGAL::Delaunay triangulation type definitions. 51