Abstract. OceanMesh2D is a set of MATLAB functions with preprocessing and post-processing
utilities to generate two-dimensional (2-D) unstructured meshes for coastal
ocean circulation models. Mesh resolution is controlled according to a
variety of feature-driven geometric and topo-bathymetric functions. Mesh
generation is achieved through a force balance algorithm to locate vertices
and a number of topological improvement strategies aimed at improving the
worst-case triangle quality. The placement of vertices along the mesh
boundary is adapted automatically according to the mesh size function,
eliminating the need for contour simplification algorithms. The software
expresses the mesh design and generation process via an objected-oriented
framework that facilitates efficient workflows that are flexible and
automatic. This paper illustrates the various capabilities of the software
and demonstrates its utility in realistic applications by producing
high-quality, multiscale, unstructured meshes.