The Data Model (Intermediate)

3. DX Topologies
The next topic covers the types of topologies that DX can handle. These include the following:

  • Scattered positions (no connections)
  • Fully regular positions and connections
  • Regular positions, irregular connections
  • Irregular positions, regular connections
    "deformed" positions
    "semi-regular" positions
  • Fully irregular positions and connections

Scattered positions are easy to describe. You simply need a list of the coordinate locations of the sample positions. You needn't worry about connections because there aren't any, by definition. Obviously, any dependent Components must be "position dependent". A typical data set would contain either columns or blocks of values for X, Y, Z (if 3D), and data. You can have more than one type of data for each spatial location, e.g., temperature and pressure (X, Y, Z, T, P).

Fully regular positions and connections are the simplest of the connected topologies and most common. These are used to describe the very common "array" type data that many researchers create. "Fully regular" spans all three of the most common dimensions. That is, a fully regular 1D grid is a line of points spaced with equal deltas lying along the X axis. A 2D regular grid is the typical "array" that we think of when we look at a piece of grid paper: regular in X and Y (the deltas may be different for the two dimensions, but are constant for each dimension). A 3D array is the logical extension of the 2D grid to 3D: Z also has a constant delta.

Fully regular positions can be described compactly with origin, deltas, and counts as we've discussed already. Fully regular connections can be described then very easily since the connectivity is regularly defined to connect sets of points. For 1D regular, the line segments connect successive pairs of points from start to finish. For 2D, the grid connections are often "quads" and it is presumably self-evident that DX would do pretty much the same thing you would do to connect the dots into squares (rectangles). Likewise, in 3D, DX connects groups of 8 points into cubic volumetric elements (voxels). There's nothing mysterious here.

Regular positions, irregular connections is somewhat related. Here, you can specify the positions the same as for fully regular. But the connections cannot be described succinctly; you have no alternative but to construct a "connections" Component containing an integer vector array. You will remember our discussion of what connections vectors look like, I hope. The "connections" Component Array is just a long list of these vectors.

At this point, I must mention an important rule of DX: all elements of any array must have the same data type and vector shape (if they aren't scalars). Finite element people often mix quads and triangles in their meshes. The quads cover large areas efficiently, but the triangles help trim out the edges to best fit the computational domain. Sorry: in DX, you have two alternatives: either you will have to convert your entire mesh to triangles (each quad is made up of 2 triangles), if you wish to preserve the edge triangles (or any interior ones, for that matter); or, you may choose to discard the edge triangles if they don't really affect the visual representation, and keep only the quads.

 

You cannot use a Multigrid to get around this problem since all members of this special type of grid must have the same "connections" type. A Multigrid may be useful, though, if you wish to have several computational meshes of different mesh resolution that span an area of interest. A powerful feature of Multigrids is that interpolation can be performed across group member boundaries. For example, two abutting Multigrid members can share a common isoline or streamline.

Irregular positions, regular connections is somewhat like Fully regular as well, except here the connections are trivially described, but you must list all the position coordinates in a "positions" list. As always, the "positions" component is of type float and vector in nature. This topology might be useful if your grid sampling points could not lie precisely on a regular grid, but (in 2D) four adjacent points still are to be connected into a quad.

 

Topology Example

If you did not know about DX's Rubbersheet tool, you might import a terrain elevation using irregular 3D positions connected regularly by quads. The positions are irregular even if they lie on straight latitude and longitude lines due to the irregularity in the Z or elevation values. If even one point cannot be described with the compact regular description, the whole positions array is irregular.

Fully irregular positions and connections are used in cases where neither Component can be compactly described. This includes CAD or architectural models as well as some finite element meshes.

There is a slight variation that falls into a crack between fully regular and fully irregular: semi-regular. This is the case where one or two dimensions can be described regularly, but the second or third cannot be. DX provides a facility for declaring the regular grid (let's say it's 2D), then listing all the irregular values for Z, then "multiplying" the 2D grid by the Z values to generate the semi-regular 3D grid (regular in X and Y, irregular in Z). This is called a "product array" in DX-speak.

 

You can read more about all of these topologies in the DX html documentation. Find the User's Guide Table of Contents, then Appendix B: Importing Data: File Formats, then B.2: Overview of the Native File Format and the Examples that follow the discussion. You'll see little squares littered throughout the html documentation: ignore them as they are simply some non-printing character that translated badly to html. The PDF version of the User Guide may be easier to read.

The examples are very helpful to begin to understand how you might construct a DX native file description to read in your data. As I've mentioned before, not everyone will need to construct DX native files: we still are going to learn to use the Data Prompter for simple array type files, or you may be able to use the ImportSpreadsheet module for some data. However, to really understand DX, you should study the native file format. It will come in handy sooner or later, you can bet on it.