Skip to main content

BoundaryConditions

Struct BoundaryConditions 

Source
pub struct BoundaryConditions<'m, L> { /* private fields */ }
Expand description

Degrees of freedom held fixed or at a value, chosen by node and component.

The components a layout has are the only ones that can be held, and an axis that a layout does not have is an error when compiling. The conditions borrow the sets they hold, such as those of the model they are for, so they cannot outlive them. Each is eliminated from the system unless it is made to be held by multipliers.

Implementations§

Source§

impl<'m, L> BoundaryConditions<'m, L>
where L: Layout,

Source

pub fn new() -> Self

Source

pub fn fix<C, I>(self, component: C, nodes: &'m NodeSet) -> Self
where C: Component<L, I>,

Holds a component of every node in a set at its initial value.

Source

pub fn fix_by<C, I>( self, enforcement: Enforcement, _: C, nodes: &'m NodeSet, ) -> Self
where C: Component<L, I>,

Holds a component of every node in a set at its initial value, the way given.

Source

pub fn fix_nodes<C, I>( self, component: C, nodes: impl IntoIterator<Item = usize>, ) -> Self
where C: Component<L, I>,

Holds a component of the listed nodes at its initial value.

Source

pub fn fix_nodes_by<C, I>( self, enforcement: Enforcement, _: C, nodes: impl IntoIterator<Item = usize>, ) -> Self
where C: Component<L, I>,

Holds a component of the listed nodes at its initial value, the way given.

Source

pub fn fix_node<C, I>(self, component: C, node: usize) -> Self
where C: Component<L, I>,

Holds a component of a node at its initial value.

Source

pub fn fix_node_by<C, I>( self, enforcement: Enforcement, _: C, node: usize, ) -> Self
where C: Component<L, I>,

Holds a component of a node at its initial value, the way given.

Source

pub fn prescribe<C, I>( self, component: C, nodes: &'m NodeSet, value: C::Value, ) -> Self
where C: Component<L, I> + Prescribable,

Holds a component of every node in a set at a value.

Source

pub fn prescribe_by<C, I>( self, enforcement: Enforcement, _: C, nodes: &'m NodeSet, value: C::Value, ) -> Self
where C: Component<L, I> + Prescribable,

Holds a component of every node in a set at a value, the way given.

Source

pub fn prescribe_nodes<C, I>( self, component: C, nodes: impl IntoIterator<Item = usize>, value: C::Value, ) -> Self
where C: Component<L, I> + Prescribable,

Holds a component of the listed nodes at a value.

Source

pub fn prescribe_nodes_by<C, I>( self, enforcement: Enforcement, _: C, nodes: impl IntoIterator<Item = usize>, value: C::Value, ) -> Self
where C: Component<L, I> + Prescribable,

Holds a component of the listed nodes at a value, the way given.

Source

pub fn prescribe_node<C, I>( self, component: C, node: usize, value: C::Value, ) -> Self
where C: Component<L, I> + Prescribable,

Holds a component of a node at a value.

Source

pub fn prescribe_node_by<C, I>( self, enforcement: Enforcement, _: C, node: usize, value: C::Value, ) -> Self
where C: Component<L, I> + Prescribable,

Holds a component of a node at a value, the way given.

Source

pub fn conditions(&self) -> &[BoundaryCondition<'m>]

The conditions, in the order they were made.

Source

pub fn constraint(&self) -> EqualityConstraints

The constraints holding the degrees of freedom, one for each condition.

A condition eliminated at its initial values is fixed, with the indices in ascending order and without repeats, and any other eliminated is prescribed. One held by multipliers has the indices as they are.

Trait Implementations§

Source§

impl<L> Default for BoundaryConditions<'_, L>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'m, L> Freeze for BoundaryConditions<'m, L>

§

impl<'m, L> RefUnwindSafe for BoundaryConditions<'m, L>
where L: RefUnwindSafe,

§

impl<'m, L> Send for BoundaryConditions<'m, L>
where L: Send,

§

impl<'m, L> Sync for BoundaryConditions<'m, L>
where L: Sync,

§

impl<'m, L> Unpin for BoundaryConditions<'m, L>
where L: Unpin,

§

impl<'m, L> UnsafeUnpin for BoundaryConditions<'m, L>

§

impl<'m, L> UnwindSafe for BoundaryConditions<'m, L>
where L: UnwindSafe,

Blanket Implementations§

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<A, B, C, I> Component<Coupled<A, B>, Left<I>> for C
where A: Layout, B: Layout, C: Component<A, I>,

Source§

const OFFSET: usize = const OFFSET: usize = C::OFFSET;

Source§

impl<A, B, C, I> Component<Coupled<A, B>, Right<I>> for C
where A: Layout, B: Layout, C: Component<B, I>,

Source§

const OFFSET: usize = const OFFSET: usize = A::STRIDE + C::OFFSET;

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> Is<T> for T

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.