atlas::mesh::actions::ReorderHilbert class

Reorder implementation that reorders nodes of a mesh following a Hilbert Space-filling curve. Cells and edges are reordered to follow lowest node index.

Usage: auto reorder = Reorder{ option::type("hilbert") | config }; reorder( mesh );

The optional extra config can contain:

- "recursion"    : <int>  (default=30)   // Recursion of hilbert space-filling curve,
                                        // needs to be large enough to provide unique node indices.
  • "ghost_at_end" : <bool> (default=true) // Determines if ghost nodes should be reordered in between // internal nodes or added/remain at the end

Base classes

class ReorderImpl
Base class for reordering the mesh nodes and elements.

Public static functions

static void reorderNodes(Mesh& mesh, const std::vector<idx_t>& order)
static void reorderCellsUsingNodes(Mesh& mesh)
Reorder the cells by lowest node local index within each cell.
static void reorderEdgesUsingNodes(Mesh& mesh)
Reorder the edges by lowest node local index within each edge.

Constructors, destructors, conversion operators

ReorderHilbert(const eckit::Parametrisation& config = util::NoConfig())

Public functions

auto computeNodesOrder(Mesh&) -> std::vector<idx_t> override
void operator()(Mesh&) virtual

Function documentation

static void atlas::mesh::actions::ReorderHilbert::reorderNodes(Mesh& mesh, const std::vector<idx_t>& order)

Reorder the nodes in the given mesh using a given order

  • All fields in mesh.nodes() are reordered.
  • mesh.cells().node_connectivity() gets updated
  • mesh.edges().node_connectivity() gets updated

static void atlas::mesh::actions::ReorderHilbert::reorderCellsUsingNodes(Mesh& mesh)

Reorder the cells by lowest node local index within each cell.

static void atlas::mesh::actions::ReorderHilbert::reorderEdgesUsingNodes(Mesh& mesh)

Reorder the edges by lowest node local index within each edge.

void atlas::mesh::actions::ReorderHilbert::operator()(Mesh&) virtual

Reorder the nodes in the given mesh using the order computed with the computeNodesOrder function Then apply reorderCellsUsingNodes and reorderEdgesUsingNodes