• Keine Ergebnisse gefunden

Partitioning the Study Area

Im Dokument Grid Infrastructures (Seite 89-93)

Hydrodynamic Simulation

6.2. A Methodology for Parallel Mesh Generation in the Grid

6.2.2. Partitioning the Study Area

The study area (model domain) is a region delineated by a boundary polygon. This polygon constrains, in the first place, the outer mesh boundary. In the second place, it determines the relevant area of the DEM for assigning elevation information to the mesh and for the detection of structural terrain features in this area. A partition of the boundary polygon into smaller polygonal parts (tiles) determines the units of work for the parallel mesh generation process. For the purpose of this prototype, two geometric partitioning algorithms have been developed. They will be compared with respect to

1http://www.tu-harburg.de/wb

Figure6.3.:Gaja3Dpar internal geoprocessing workflows of pre-processing tasks.

the total amount of overlap of the study area boundary polygon and balance of the partition.

The tiles will not necessarily be aligned to a regular Cartesian grid or even be rectangular.

All tiles together completely cover the study area. The two partitioning strategies prefer

“compact” tiles of similar area. Compactness means that the difference between a tile and its bounding box area should be small. This optimization criterion is equivalent to the minimization of the total area of all bounding boxes. The minimization problem for a given boundary polygonPinto a given numberiof tilesPi, withSPi = P, whereSis the geometry union operator, can thus be specified as∑EPi, whereEPi is the area of the bounding box ofPi. The second algorithm to be presented will allow that the bounding box for a tile is rotated to better align with the corresponding tile boundary polygon. It will be shown that this algorithm is better suited to fulfill the optimization criterion.

The study area boundary polygon is a set of simply connected regions, i. e. closed, not

(a)The study area boundary polygon. (b)The corresponding mesh for the poly-gon with its hole excluded.

(c)Simple partition of the boundary poly-gon from the first algorithm.

(d)Regular bounding boxes of the tile poly-gons.

(e)Improved partition of the boundary polygon from the second algorithm.

(f)Rotated bounding boxes (identical to the tile boundaries).

Figure6.4.:Demonstration of partitioning and meshing a small, artificial study area boundary polygon (58km2) containing a hole.

self-intersecting vertex chains. One of these regions delineates the exterior boundary of the model domain. All other regions are contained in the exterior boundary and represent holes in that domain (see Figure 6.4a). These regions shall be excluded from the generated mesh (see Figure6.4b). The figures show a possible final result of the meshing process. This mesh has been triangulated without consideration of breaklines, but with30° minimum angle and0.5km2maximum triangle area conditions.

Figure6.4c and Figure6.4d show a simple partition, according to the first algorithm, and the respective bounding boxes for the artificial boundary polygon. The result of applying the second algorithm to the simple boundary can be found in Figure6.4e and Figure6.4f.

Real-world model boundaries imposed by domains of rivers, coastal areas, and the hinterland that have to be meshed, typically, have a very irregular shape, which leads to complications in deciding for a suitable partition. An example for such a complex study area boundary is the Elbe river. An overview map showing the complete partition of this study area using both algorithms is included in Appendix B on page141.

Practical Considerations for the Meshing Process

A raster DEM is required for the derivation of breaklines. Instead of using one single raster for the whole model domain, smaller rasters are created for each tile of the partition. Each raster is then bounded by a bounding box of the respective tile. In contrast to the tiles, DEM rasters are always rectangular grids. For this reason, the rasters are, typically, going to extend over the tile boundary polygons. It is allowed, and required for the breakline detection process, that adjacent rasters have an additional overlap. This means the each raster is a little larger than a tile’s bounding box. In the overlapping parts, the detected breaklines should be the same.

The parallel efficiency of the meshing process depends on the partitioning strategy, the tile shape and size (or number of tiles), and the amount of redundancy due to raster overlap over the boundary. A balanced partition helps to distribute the computational work equally among a number of computing resources. It is easier to distribute the work equally among these resources if the number of work units is much larger than the number of resources. However, it is not an option to create a large number of very small tiles — to compensate for an imbalance of the partition — because the overlap between tiles would predominate the total relevant tile area.

The optimal tile size highly depends on the computer architecture (e. g. available memory, number of computing resources, and caching strategies) and is best discovered by test runs. For good performance, it is required that the complete data for a tile fits into the computing resource’s main memory and enough memory remains for the

breakline detection algorithms. These algorithms produce intermediate rasters of the same size as the original raster. Generally, three intermediate double precision rasters (smoothed terrain, slope in X and Y direction) and one boolean raster to store the breakpoints are created during breakline detection.

For a rectangular model with an area of 100 km2 and a raster resolution of 1 m (10000by10000cells) the memory requirement for a complete Gaja3Dpar data set is about3.1GB. This is roughly at the limit of what a typical current desktop computer with a 64 bit architecture can handle. A limit to the raster size, where algorithms perform efficiently on a single computing resource, has been found to be between around1000by1000and2000by2000cells, so a partitioning of the model domain into mostly rectangular tiles of this size results in a good overall performance of the parallel program.

Im Dokument Grid Infrastructures (Seite 89-93)