Topologies

A Topology determines the ordering and connections between elements of a mesh. Space-filling curve element ordering for a cubed sphere mesh

Types

ClimaCore.Topologies.Topology2DType
Topology2D(mesh::AbstractMesh2D, elemorder=Mesh.elements(mesh))

This is a distributed topology for 2D meshes. elemorder is a vector or other linear ordering of the Mesh.elements(mesh). elempid is a sorted vector of the same length as elemorder, each element of which contains the pid of the owning process.

Internally, we can refer to elements in several different ways:

  • elem: an element of the mesh. Often a CartesianIndex object.
  • gidx: "global index": an enumeration of all elements:
    • elemorder[gidx] == elem
    • orderindex[elem] == gidx
  • lidx: "local index": an enumeration of local elements.
    • local_elem_gidx[lidx] == gidx
  • sidx: "send index": an index into the send buffer of a local element. A single local element may have multiple sidxs if it needs to be send to multiple processes.
    • send_elem_lidx[sidx] == lidx
  • ridx: "receive index": an index into the receive buffer of a ghost element.
    • recv_elem_gidx[ridx] == gidx
source
ClimaCore.Topologies.spacefillingcurveFunction
spacefillingcurve(mesh::Meshes.AbstractCubedSphere)

Generate element ordering, elemorder, based on a space filling curve for a CubedSphere mesh.

source
spacefillingcurve(mesh::Meshes.RectilinearMesh)

Generate element ordering, elemorder, based on a space filling curve for a Rectilinear mesh.

source
ClimaCore.Topologies.ghost_facesFunction
ghost_faces(topology::AbstractTopology)

An iterator over the ghost faces of topology. Each element of the iterator is a 5-tuple the form

(elem1, face1, elem2, face2, reversed)

where elemX, faceX are the element and face numbers, and reversed indicates whether they have opposing orientations.

source

Interfaces

ClimaCore.Topologies.opposing_faceFunction
(opelem, opface, reversed) = opposing_face(topology, elem, face)

The opposing face of face number face of element elem in topology.

  • opelem is the opposing element number, 0 for a boundary, negative for a ghost element
  • opface is the opposite face number, or boundary face number if a boundary
  • reversed indicates whether the opposing face has the opposite orientation.
source
ClimaCore.Topologies.interior_facesFunction
interior_faces(topology::AbstractTopology)

An iterator over the interior faces of topology. Each element of the iterator is a 5-tuple the form

(elem1, face1, elem2, face2, reversed)

where elemX, faceX are the element and face numbers, and reversed indicates whether they have opposing orientations.

source
ClimaCore.Topologies.boundary_tagsFunction
boundary_tags(topology)

A Tuple or NamedTuple of the boundary tags of the topology. A boundary tag is an integer that uniquely identifies a boundary.

source
ClimaCore.Topologies.boundary_tagFunction
boundary_tag(topology, name::Symbol)

The boundary tag of the topology for boundary name name. A boundary tag is an integer that uniquely identifies a boundary.

source
ClimaCore.Topologies.boundary_facesFunction
boundary_faces(topology, boundarytag)

An iterator over the faces of topology which face the boundary with tag boundarytag. Each element of the iterator is an (elem, face) pair.

source
ClimaCore.Topologies.local_neighboring_elementsFunction
local_neighboring_elements(topology::AbstractTopology, lidx::Integer)

An iterator of the local element indices (lidx) of the local elements which are neighbors of the local element lidx in topology (excluding lidx itself).

source