pub struct LocalToGlobalMap { /* private fields */ }Expand description
Mapping from local point/DOF pairs to unique global indices.
Implementations§
Source§impl LocalToGlobalMap
impl LocalToGlobalMap
Build a global numbering map using explicit communication tags and ownership data.
Sourcepub fn from_section_with_ownership<V, S, C>(
section: &Section<V, S>,
overlap: &Overlap,
ownership: &PointOwnership,
comm: &C,
my_rank: usize,
) -> Result<Self, MeshSieveError>
pub fn from_section_with_ownership<V, S, C>( section: &Section<V, S>, overlap: &Overlap, ownership: &PointOwnership, comm: &C, my_rank: usize, ) -> Result<Self, MeshSieveError>
Build a global numbering map using ownership metadata and a legacy default tag (0xBEEF).
Sourcepub fn from_section_with_constraints_and_ownership<V, S, C, CS>(
section: &Section<V, S>,
constraints: &CS,
overlap: &Overlap,
ownership: &PointOwnership,
comm: &C,
my_rank: usize,
tags: SectionCommTags,
) -> Result<Self, MeshSieveError>
pub fn from_section_with_constraints_and_ownership<V, S, C, CS>( section: &Section<V, S>, constraints: &CS, overlap: &Overlap, ownership: &PointOwnership, comm: &C, my_rank: usize, tags: SectionCommTags, ) -> Result<Self, MeshSieveError>
Build a global numbering map using a section, constraints, and ownership data.
Build a global numbering map using a multi-section and ownership data.
Sourcepub fn from_multi_section_with_ownership<V, S, C>(
section: &MultiSection<V, S>,
overlap: &Overlap,
ownership: &PointOwnership,
comm: &C,
my_rank: usize,
) -> Result<Self, MeshSieveError>
pub fn from_multi_section_with_ownership<V, S, C>( section: &MultiSection<V, S>, overlap: &Overlap, ownership: &PointOwnership, comm: &C, my_rank: usize, ) -> Result<Self, MeshSieveError>
Build a global numbering map for a multi-section using a legacy default tag (0xBEEF).
Sourcepub fn global_offset(&self, point: PointId) -> Result<u64, MeshSieveError>
pub fn global_offset(&self, point: PointId) -> Result<u64, MeshSieveError>
Return the global offset (start index) for a point.
Sourcepub fn global_index(
&self,
point: PointId,
dof: usize,
) -> Result<u64, MeshSieveError>
pub fn global_index( &self, point: PointId, dof: usize, ) -> Result<u64, MeshSieveError>
Return the global index for a local point/DOF pair.
Sourcepub fn global_range(&self, point: PointId) -> Result<Range<u64>, MeshSieveError>
pub fn global_range(&self, point: PointId) -> Result<Range<u64>, MeshSieveError>
Return the global DOF range [start, end) for a point.
Sourcepub fn remap_points<I>(&self, new_to_old: I) -> Result<Self, MeshSieveError>
pub fn remap_points<I>(&self, new_to_old: I) -> Result<Self, MeshSieveError>
Return a copy of this numbering with point IDs remapped.
new_to_old maps each point in the returned map to the corresponding
point in this map. Offsets and DOF lengths are preserved, which is useful
for compact submeshes that must keep parent global numbering semantics.
Sourcepub fn total_dofs(&self) -> u64
pub fn total_dofs(&self) -> u64
Total number of globally owned DOFs across all ranks.
Trait Implementations§
Source§impl Clone for LocalToGlobalMap
impl Clone for LocalToGlobalMap
Source§fn clone(&self) -> LocalToGlobalMap
fn clone(&self) -> LocalToGlobalMap
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more