pub struct ConstrainedSection<V, S: Storage<V>> { /* private fields */ }Expand description
Section wrapper that carries per-point constraints on DOF indices.
Implementations§
Source§impl<V, S> ConstrainedSection<V, S>where
S: Storage<V>,
impl<V, S> ConstrainedSection<V, S>where
S: Storage<V>,
Sourcepub fn new(section: Section<V, S>) -> Self
pub fn new(section: Section<V, S>) -> Self
Create a constrained section from an existing Section.
Sourcepub fn section_mut(&mut self) -> &mut Section<V, S>
pub fn section_mut(&mut self) -> &mut Section<V, S>
Mutable access to the underlying section.
Sourcepub fn into_section(self) -> Section<V, S>
pub fn into_section(self) -> Section<V, S>
Take ownership of the underlying section.
Sourcepub fn constraints(&self) -> &BTreeMap<PointId, Vec<DofConstraint<V>>>
pub fn constraints(&self) -> &BTreeMap<PointId, Vec<DofConstraint<V>>>
Borrow the constraint map.
Sourcepub fn constraints_mut(
&mut self,
) -> &mut BTreeMap<PointId, Vec<DofConstraint<V>>>
pub fn constraints_mut( &mut self, ) -> &mut BTreeMap<PointId, Vec<DofConstraint<V>>>
Mutable access to the constraint map.
Sourcepub fn hanging_constraints(&self) -> &HangingNodeConstraints<V>
pub fn hanging_constraints(&self) -> &HangingNodeConstraints<V>
Borrow hanging node constraints.
Sourcepub fn hanging_constraints_mut(&mut self) -> &mut HangingNodeConstraints<V>
pub fn hanging_constraints_mut(&mut self) -> &mut HangingNodeConstraints<V>
Mutable access to hanging node constraints.
Sourcepub fn insert_constraint(
&mut self,
point: PointId,
index: usize,
value: V,
) -> Result<(), MeshSieveError>
pub fn insert_constraint( &mut self, point: PointId, index: usize, value: V, ) -> Result<(), MeshSieveError>
Insert or update a single constraint for a point.
Sourcepub fn clear_constraints_for_point(&mut self, point: PointId)
pub fn clear_constraints_for_point(&mut self, point: PointId)
Remove all constraints for a point.
Sourcepub fn clear_constraints(&mut self)
pub fn clear_constraints(&mut self)
Remove all constraints.
Sourcepub fn remove_constraint(
&mut self,
point: PointId,
index: usize,
) -> Option<DofConstraint<V>>
pub fn remove_constraint( &mut self, point: PointId, index: usize, ) -> Option<DofConstraint<V>>
Remove a single constraint by index, if present.
Sourcepub fn apply_constraints_for_point(
&mut self,
point: PointId,
) -> Result<(), MeshSieveError>where
V: Clone,
pub fn apply_constraints_for_point(
&mut self,
point: PointId,
) -> Result<(), MeshSieveError>where
V: Clone,
Apply constraints for a single point to the underlying section.
Sourcepub fn apply_constraints(&mut self) -> Result<(), MeshSieveError>where
V: Clone,
pub fn apply_constraints(&mut self) -> Result<(), MeshSieveError>where
V: Clone,
Apply all stored constraints to the underlying section.
Sourcepub fn apply_hanging_constraints(&mut self) -> Result<(), MeshSieveError>
pub fn apply_hanging_constraints(&mut self) -> Result<(), MeshSieveError>
Apply hanging node constraints to the underlying section.
Sourcepub fn apply_all_constraints(&mut self) -> Result<(), MeshSieveError>
pub fn apply_all_constraints(&mut self) -> Result<(), MeshSieveError>
Apply hanging node constraints, then fixed DOF constraints.
Trait Implementations§
Source§impl<V: Clone, S: Clone + Storage<V>> Clone for ConstrainedSection<V, S>
impl<V: Clone, S: Clone + Storage<V>> Clone for ConstrainedSection<V, S>
Source§fn clone(&self) -> ConstrainedSection<V, S>
fn clone(&self) -> ConstrainedSection<V, S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<V, S> ConstraintSet<V> for ConstrainedSection<V, S>where
S: Storage<V>,
impl<V, S> ConstraintSet<V> for ConstrainedSection<V, S>where
S: Storage<V>,
Source§impl<V, S> FallibleMap<V> for ConstrainedSection<V, S>where
S: Storage<V>,
impl<V, S> FallibleMap<V> for ConstrainedSection<V, S>where
S: Storage<V>,
Source§fn try_get_mut(&mut self, p: PointId) -> Result<&mut [V], MeshSieveError>
fn try_get_mut(&mut self, p: PointId) -> Result<&mut [V], MeshSieveError>
Mutable access to
p’s slice.Source§impl<V, S> InvalidateCache for ConstrainedSection<V, S>where
S: Storage<V>,
impl<V, S> InvalidateCache for ConstrainedSection<V, S>where
S: Storage<V>,
Source§fn invalidate_cache(&mut self)
fn invalidate_cache(&mut self)
Invalidate all internal caches so future queries recompute correctly.
Auto Trait Implementations§
impl<V, S> Freeze for ConstrainedSection<V, S>where
S: Freeze,
impl<V, S> RefUnwindSafe for ConstrainedSection<V, S>where
S: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, S> Send for ConstrainedSection<V, S>
impl<V, S> Sync for ConstrainedSection<V, S>
impl<V, S> Unpin for ConstrainedSection<V, S>
impl<V, S> UnsafeUnpin for ConstrainedSection<V, S>where
S: UnsafeUnpin,
impl<V, S> UnwindSafe for ConstrainedSection<V, S>
Blanket Implementations§
Source§impl<T> AccumulatePathExt for T
impl<T> AccumulatePathExt for T
fn accumulate_path<O, I>(path: I) -> Owhere
O: Orientation,
I: IntoIterator<Item = O>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more