Mesh Generation Tests


I've written a few small programs to generate and display a set of (x, y, z) points, and to display a Child mesh from discrete .nodes, .z, .edges, and .q files. I've created 8 different test meshes to be used as a topographic substrate for input to Child to see if the simulation results are significantly different for different triangulations of the same topography. In all cases below, the landscape is a smooth inclined plane 1000 x 1000 meters square (slightly deeper for the hexagonal meshes) with a Y slope of 1/100. Meshes were generated using a Child input file similar to this one. I am a little surprised that so many physical paramters were required just to create a mesh. The source code childmain.cpp was edited so that the program exited after generating a mesh and writing initial output files:

int main( int argc, char **argv )
{
...
   // Check command-line arguments
   tOption option( argc, argv );

   // Say hello
   option.version();

   // Open main input file
   tInputFile inputFile( option.inputFile );

   // Create a random number generator for the simulation itself
   tRand rand( inputFile );

   // Create and initialize objects:
   std::cout << "Creating mesh...\n";
   tMesh mesh( inputFile, option.checkMeshConsistency );

   std::cout << "Creating output files...\n";
   tLOutput output( &mesh, inputFile, &rand );

   if (1)
      {
      // Pre-emptive mesh output and exit
      // SC, 02/15/08
      std::cout << "Writing mesh files...\n";
      output.WriteOutput( 0. );
      return 0;
      }

Mesh types

  1. Rectangular grid.

    This is an example of how the claim 'the Delaunay triangulation of a set of points is unique' is wrong. Note that each of the subsquares of 4 points can be triangulated in 2 ways, so that for this grid of 25 x 25 subsquares, there are actually 2625 different equivalent triangulations. Child has chosen one of these, where all subsquares are partitioned the same way.

  2. Rectangular grid with uniform random ±2.5m perturbations to (x, y) points.

    If one slightly perturbs the points on the rectangular grid, then there is in general a 'preferred' solution to the triangulation.

  3. Random set of (x, y) points.

    Actually, Child refuses to produce a mesh for most inputs of this type, saying something like:

    44: ~/Projects/Lancaster/Child/Child_CU_STL_2006/Mesh_tests > ChildOSX Mesh003/Mesh003.in
    
    This is CHILD, version 2.3.0, April 2004 (compiled Feb 15 2008 10:08:21)
    
    Creating mesh...
    Warning: `TAUCD' chosen as match for keyword `TAUC'.
    In tLNode, reading 'BRPROPORTION1
    MakeMeshFromPoints
    finished reading in points
    creating supertri: min & max are (0,0) (1000,1000)
    Supertri coords: -3000,-3000  4000,-3000  500,4000
    1 NN: 3 (0)  NE: 6 NT: 1
    c4
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode(...): node coords out of bounds: 657.357 0
    tMesh::InsertNode()
    tMesh::InsertNode(...): node coords out of bounds: 0 260.975
    tMesh::InsertNode()
    tMesh::InsertNode(...): node coords out of bounds: 110.434 0
    tMesh::InsertNode()
    tMesh::InsertNode()
    ...
    tMesh::InsertNode(...): node coords out of bounds: 1000 218.27
    tMesh::InsertNode()
    tMesh::InsertNode(...): node coords out of bounds: 233.438 1000
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode()
    tMesh::InsertNode()
    
    2 NN: 576 (552) NE: 3444 NT: 1147
    3 NN: 573 (552) NE: 3388 NT: 1122
    The node list contains 551 elements but 'getActiveSize()' gives 552.
    Error in mesh consistency.
    That was a fatal error, my friend!
    (Set "CHILD_ABORT_ON_ERROR" to generate a crash.)
    

    But eventually a random set can be found which works. However, because of its nonuniformity, this kind of mesh is probably not a good one to test with. Other semi-random pointsets with more constrained uniformity would probably work better.

  4. Rectangular grid with uniform random ±5x10-11m perturbation to (x, y) points.

    One can 'trick' a program like Child into generating different partitions of the grid by making the perturbations very small.

  5. Same as above, but different random partition.

    By generating different triangulations of the regular grid, I want to see if they produce different results in the river simulation. Ideally, they should not.

  6. Hexagonal grid.

    This layout produces interior equilateral triangles of the same size, and is probably better for use in simulation than the rectangular grids above.

  7. Hexagonal grid with uniform random ±2.5m perturbation to (x, y) points.

    As with the rectangular grid, the points of a hexagonal grid can be perturbed, although this does not result in a different partition of the grid.

  8. Hexagonal grid with uniform random ±5x10-11m perturbation to (x, y) points.

    Using a very small perturbation, slightly different meshes (but still the same topology) can be tested to see if they have an effect on the simulation.

The next step is to create inlet and outlet nodes and to enable river flow between them, ideally without the use of storms, uplifting, or other random factors. If a river is created as a simple vertical column of nodes between inlet and outlet, and the rest of the environment is static, then there should be no change in the mesh at any subsequent step of the simulation, for any mesh used to represent the topograpy. Once this has been verified (or refuted!), one or more of the river nodes can be moved slightly to create an asymmetric flow and subsequent evolution of the geometry via meandering, and to observe the effects of different input meshes.


© Sky Coyote 2008.