salvus.mesh.data_structures.salvus_mesh.section
salvus.mesh.data_structures.salvus_mesh.section salvus mesh data_structures salvus_mesh section Section data structure for Salvus meshes.
Classes
Section
Sectionclass Section(builtins.object):
def __init__(
self, section: npt.NDArray, global_element_ids: npt.NDArray
) -> None: ...A section that relates global DOFs to local DOFs.
A local to global reduction can be performed as:
global_field = assemble(local_field, section, ...)
A global to local scatter can be performed as:
local_field = global_field[section]
Note that the global element IDs must be sorted and unique.
Parameters
sectionnpt.NDArray — The section as a [number_of_elements, number_of_points_per_element] array.global_element_idsnpt.NDArray — The global element id of each row in the section.
Methods
from_mesh_block()
from_mesh_block()def from_mesh_block(mesh_block: MeshBlock) -> Section: ...Construct a section from a mesh block.
Parameters
mesh_blockMeshBlock — The mesh block to construct the section from.
Returns Section — The constructed section.