Skip to main content

ConstrainedSection

Struct ConstrainedSection 

Source
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>,

Source

pub fn new(section: Section<V, S>) -> Self

Create a constrained section from an existing Section.

Source

pub fn section(&self) -> &Section<V, S>

Access the underlying section.

Source

pub fn section_mut(&mut self) -> &mut Section<V, S>

Mutable access to the underlying section.

Source

pub fn into_section(self) -> Section<V, S>

Take ownership of the underlying section.

Source

pub fn constraints(&self) -> &BTreeMap<PointId, Vec<DofConstraint<V>>>

Borrow the constraint map.

Source

pub fn constraints_mut( &mut self, ) -> &mut BTreeMap<PointId, Vec<DofConstraint<V>>>

Mutable access to the constraint map.

Source

pub fn hanging_constraints(&self) -> &HangingNodeConstraints<V>

Borrow hanging node constraints.

Source

pub fn hanging_constraints_mut(&mut self) -> &mut HangingNodeConstraints<V>

Mutable access to hanging node constraints.

Source

pub fn insert_constraint( &mut self, point: PointId, index: usize, value: V, ) -> Result<(), MeshSieveError>

Insert or update a single constraint for a point.

Source

pub fn clear_constraints_for_point(&mut self, point: PointId)

Remove all constraints for a point.

Source

pub fn clear_constraints(&mut self)

Remove all constraints.

Source

pub fn remove_constraint( &mut self, point: PointId, index: usize, ) -> Option<DofConstraint<V>>

Remove a single constraint by index, if present.

Source

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.

Source

pub fn apply_constraints(&mut self) -> Result<(), MeshSieveError>
where V: Clone,

Apply all stored constraints to the underlying section.

Source

pub fn apply_hanging_constraints(&mut self) -> Result<(), MeshSieveError>
where V: Clone + Default + AddAssign + Mul<Output = V>,

Apply hanging node constraints to the underlying section.

Source

pub fn apply_all_constraints(&mut self) -> Result<(), MeshSieveError>
where V: Clone + Default + AddAssign + Mul<Output = V>,

Apply hanging node constraints, then fixed DOF constraints.

Trait Implementations§

Source§

impl<V: Clone, S: Clone + Storage<V>> Clone for ConstrainedSection<V, S>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<V, S> ConstraintSet<V> for ConstrainedSection<V, S>
where S: Storage<V>,

Source§

fn points(&self) -> Box<dyn Iterator<Item = PointId> + '_>

Returns an iterator over points with constraints.
Source§

fn constraints_for(&self, point: PointId) -> Option<&[DofConstraint<V>]>

Returns the constraints for a point, if any.
Source§

impl<V: Debug, S: Debug + Storage<V>> Debug for ConstrainedSection<V, S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<V, S> FallibleMap<V> for ConstrainedSection<V, S>
where S: Storage<V>,

Source§

fn try_get(&self, p: PointId) -> Result<&[V], MeshSieveError>

Immutable access to p’s slice.
Source§

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>,

Source§

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>

§

impl<V, S> Send for ConstrainedSection<V, S>
where S: Send, V: Send,

§

impl<V, S> Sync for ConstrainedSection<V, S>
where S: Sync, V: Sync,

§

impl<V, S> Unpin for ConstrainedSection<V, S>
where S: Unpin, V: Unpin,

§

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

Source§

fn accumulate_path<O, I>(path: I) -> O
where O: Orientation, I: IntoIterator<Item = O>,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PayloadLike for T
where T: Clone,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.