atlas::mesh::TriangularMeshBuilder class

Constructors, destructors, conversion operators

TriangularMeshBuilder(const eckit::Configuration& config = util::NoConfig())

Public functions

auto operator()(size_t nb_nodes, const gidx_t node_global_index[], const double x[], const double y[], const double lon[], const double lat[], size_t nb_triags, const gidx_t triangle_global_index[], const gidx_t triangle_nodes_global_index[]) const -> Mesh
C-interface to construct a Triangular Mesh from external connectivity data.

Function documentation

Mesh atlas::mesh::TriangularMeshBuilder::operator()(size_t nb_nodes, const gidx_t node_global_index[], const double x[], const double y[], const double lon[], const double lat[], size_t nb_triags, const gidx_t triangle_global_index[], const gidx_t triangle_nodes_global_index[]) const

C-interface to construct a Triangular Mesh from external connectivity data.

The inputs x, y, lons, lats, ghost, global_index, remote_index, and partition are vectors of size nb_nodes, ranging over the nodes locally owned by (or in the ghost nodes of) the MPI task. The global index is a uniform labeling of the nodes across all MPI tasks; the remote index is a remote_index_base-based vector index for the node on its owning task.

The triangle connectivities (boundary_nodes and global_index) are vectors ranging over the cells owned by the MPI task. Each cell is defined by a list of nodes defining its boundary; note that each boundary node must be locally known (whether as an owned of ghost node on the MPI task), in other words, must be an element of the node global_indices. The boundary nodes are ordered node-varies-fastest, element-varies-slowest order. The cell global index is, here also, a uniform labeling over the of the cells across all MPI tasks.