Skip to content

salvus.mesh.data_structures.salvus_mesh.algorithms.section

salvus.mesh.data_structures.salvus_mesh.algorithms.section salvus mesh data_structures salvus_mesh algorithms section

Construct a section from an embedding.

Functions

construct_section()

def construct_section(mesh: Mesh, n: types.int_) -> Section: ...

Construct a section that pulls global degrees of freedom to local.

When considering a 1st order GLL basis, a section on a mesh is identical to its connectivity. Sections at higher order can be related to the connectivity of “sub-elements”, which are sometimes useful for linear visualizations of fields on higher-order meshes.

Note that this function does not create a true local <-> global mapping as it it is independent of the solution space defined at each DOF. For a scalar equation the section produced here does happen to be the same as the mapping, but for vector / tensor spaces additional indexing is needed.

Operates directly on mesh.connectivity (native, global point ids) rather than round-tripping through UnstructuredMesh, unless DMPlex bindings are unavailable, in which case it falls back to the previous UnstructuredMesh-based implementation. The ordering of the global DOFs in that fallback case is not guaranteed to be consistent with the ordering produced by DMPlex, but the section will still be valid.

Parameters
  • mesh Mesh — The mesh.
  • n types.int_ — The polynomial order of the GLL basis assigned to each element.
Returns Section — The section as a [n_elm, n_pnt_per_elm] array.