Mesh Sources and Transformations

Sundance Mesh Basics

Sundance solves PDEs on geometric domains that have been discretized to meshes. With a few simple exceptions, Sundance does not create meshes itself; usually, one will mesh a domain using an external meshing program such as Cubit or Triangle and then read the results into Sundance.

A mesh is represented in Sundance as a Mesh object. A Mesh is injected into a Sundance simulation by means of an object called a MeshSource. MeshSource is an abstract, extensible interface for mesh readers and mesh generators; several subtypes (listed below) have been implemented. Once created, an existing mesh can be transformed into another by means of a MeshTransformation object.

In the following example, we use a MeshSource to read an Exodus file and produce a Mesh

MeshSource reader = new ExodusNetCDFMeshReader("wing.ncdf");
Mesh mesh = reader.getMesh();

Mesh Readers

Currently, the following MeshReader subtypes exist

Mesh Generators

The internal mesh generation capability of Sundance is used primarily for generating test problems and is limited to lines and rectangles. Both of these MeshSource subtypes produce structured, uniform meshes with a number of elements controlled by constructor arguments. Both can produce distributed meshes when Sundance is run in parallel.

Simple 3D regions can be generated from these by extrusion.

Mesh Transformations

Distributed Meshes

Sundance is a fully parallel code. To do a parallel run, however, one must have a distributed mesh. A distributed mesh can be created in one of two ways: by building it distributed from the start, or by partitioning an existing mesh.

Building Distributed Meshes

As noted above, Sundance's mesh generation capability is limited to lines in 1D and rectangular domains in 2D; however, both the PartitionedLineMesher and PartitionedRectangleMesher are able to produce distributed meshes.

Partitioning Meshes

Sundance has no built-in capability for mesh partitioning. As a convenience, we supply several Python scripts for partitioning Triangle and Exodus files, and writing the results to a partitioned set of Triangle files. A distributed mesh created in this way can then be read in with a TriangleMeshReader.

Site Contact